diffstat for ptyxis-48.4 ptyxis-48.5

 NEWS                                     |    9 +++++++++
 agent/ptyxis-session-container.c         |    3 ++-
 data/org.gnome.Ptyxis.metainfo.xml.in.in |    9 +++++++++
 debian/changelog                         |   29 +++++++++++++++++++++++++++++
 debian/control                           |    4 ++--
 debian/gbp.conf                          |    4 ++--
 meson.build                              |    2 +-
 src/ptyxis-session.c                     |    3 ++-
 src/ptyxis-tab.c                         |    8 ++++++++
 src/ptyxis-tab.h                         |    1 +
 src/ptyxis-theme-selector.c              |    4 +---
 src/ptyxis-window.c                      |   17 +++++++----------
 12 files changed, 73 insertions(+), 20 deletions(-)

diff -Nru ptyxis-48.4/agent/ptyxis-session-container.c ptyxis-48.5/agent/ptyxis-session-container.c
--- ptyxis-48.4/agent/ptyxis-session-container.c	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/agent/ptyxis-session-container.c	2025-07-08 03:19:27.000000000 +0100
@@ -100,7 +100,8 @@
    * come from another container that isn't the same or at a path
    * that is not accessible to the user (say from a sudo shell).
    */
-  if (cwd[0] == 0 || !g_file_test (cwd, G_FILE_TEST_IS_DIR))
+  if (cwd[0] == 0 || !g_file_test (cwd, G_FILE_TEST_IS_DIR) ||
+      !g_file_test (cwd, G_FILE_TEST_IS_EXECUTABLE))
     cwd = g_get_home_dir ();
 
   env = g_get_environ ();
diff -Nru ptyxis-48.4/data/org.gnome.Ptyxis.metainfo.xml.in.in ptyxis-48.5/data/org.gnome.Ptyxis.metainfo.xml.in.in
--- ptyxis-48.4/data/org.gnome.Ptyxis.metainfo.xml.in.in	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/data/org.gnome.Ptyxis.metainfo.xml.in.in	2025-07-08 03:19:27.000000000 +0100
@@ -43,6 +43,15 @@
   <launchable type="desktop-id">@APP_ID@.desktop</launchable>
 
   <releases>
+    <release version="48.5" date="2025-07-07">
+      <description>
+        <p>This is a bug fix release.</p>
+        <ul>
+          <li>Improve restoring of session state</li>
+          <li>Fix a potential crash when changing interface styling</li>
+        </ul>
+      </description>
+    </release>
     <release version="48.4" date="2025-05-27">
       <description>
         <p>This is a bug fix release.</p>
diff -Nru ptyxis-48.4/debian/changelog ptyxis-48.5/debian/changelog
--- ptyxis-48.4/debian/changelog	2025-06-01 13:34:27.000000000 +0100
+++ ptyxis-48.5/debian/changelog	2025-08-18 15:40:46.000000000 +0100
@@ -1,3 +1,32 @@
+ptyxis (48.5-1~deb13u1) trixie; urgency=medium
+
+  * Team upload
+  * d/control, d/gbp.conf: Set branches for trixie stable updates
+
+ -- Simon McVittie <smcv@debian.org>  Mon, 18 Aug 2025 15:40:46 +0100
+
+ptyxis (48.5-1) unstable; urgency=medium
+
+  * Team upload
+  * New upstream bugfix release
+    - When saving tab state, if the terminal does not have a title, save the
+      tab's initial title instead
+      (ptyxis#428 upstream)
+    - Use the same code for menu -> Show Open Tabs -> New Tab that was already
+      used for Menu -> New Tab, fixing propagation of zoom settings to the
+      newly created tab
+      (ptyxis#435 upstream)
+    - Don't try to chdir() to a working directory that does not have +x
+      permission
+    - Use g_set_str() for less error-prone property setting
+    - Ensure that interface-style action isn't freed prematurely, and
+      explicitly remove it when the window is destroyed, fixing a
+      possible use-after-free when switching between dark and light modes
+      (ptyxis#440 upstream)
+  * Standards-Version: 4.7.2 (no changes required)
+
+ -- Simon McVittie <smcv@debian.org>  Mon, 28 Jul 2025 10:09:31 +0100
+
 ptyxis (48.4-1) unstable; urgency=medium
 
   * New upstream bugfix release
diff -Nru ptyxis-48.4/debian/control ptyxis-48.5/debian/control
--- ptyxis-48.4/debian/control	2025-06-01 13:34:27.000000000 +0100
+++ ptyxis-48.5/debian/control	2025-08-18 15:40:46.000000000 +0100
@@ -15,10 +15,10 @@
                libportal-gtk4-dev,
                libvte-2.91-gtk4-dev (>= 0.79),
                meson
-Standards-Version: 4.7.0
+Standards-Version: 4.7.2
 Homepage: https://devsuite.app/ptyxis/
 Vcs-Browser: https://salsa.debian.org/gnome-team/ptyxis
-Vcs-Git: https://salsa.debian.org/gnome-team/ptyxis.git
+Vcs-Git: https://salsa.debian.org/gnome-team/ptyxis.git -b debian/trixie
 
 Package: ptyxis
 Architecture: any
diff -Nru ptyxis-48.4/debian/gbp.conf ptyxis-48.5/debian/gbp.conf
--- ptyxis-48.4/debian/gbp.conf	2025-06-01 13:34:27.000000000 +0100
+++ ptyxis-48.5/debian/gbp.conf	2025-08-18 15:40:46.000000000 +0100
@@ -1,7 +1,7 @@
 [DEFAULT]
 pristine-tar = True
-debian-branch = debian/latest
-upstream-branch = upstream/latest
+debian-branch = debian/trixie
+upstream-branch = upstream/48.x
 
 [buildpackage]
 sign-tags = True
diff -Nru ptyxis-48.4/meson.build ptyxis-48.5/meson.build
--- ptyxis-48.4/meson.build	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/meson.build	2025-07-08 03:19:27.000000000 +0100
@@ -1,5 +1,5 @@
 project('ptyxis', 'c',
-          version: '48.4',
+          version: '48.5',
     meson_version: '>= 1.0.0',
   default_options: [ 'warning_level=2', 'werror=false', 'c_std=gnu11', ],
 )
diff -Nru ptyxis-48.4/NEWS ptyxis-48.5/NEWS
--- ptyxis-48.4/NEWS	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/NEWS	2025-07-08 03:19:27.000000000 +0100
@@ -1,3 +1,12 @@
+# Ptyxis 48.5
+
+ * Check for X_OK before potential chdir()
+ * restore initial title when tab has not been visited
+ * re-use existing new-tab option from overview so consistent
+   styling/container/directory is applied
+ * remove interface-style action when disposing window to workaround
+   a crash in action muxing inside GTK
+
 # Ptyxis 48.4
 
  * Fix incorrect use of mnemonics in the new-terminal menu
diff -Nru ptyxis-48.4/src/ptyxis-session.c ptyxis-48.5/src/ptyxis-session.c
--- ptyxis-48.4/src/ptyxis-session.c	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/src/ptyxis-session.c	2025-07-08 03:19:27.000000000 +0100
@@ -113,7 +113,8 @@
                     cwd = ptyxis_tab_dup_previous_working_directory_uri (tab);
 
                   G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-                  window_title = vte_terminal_get_window_title (VTE_TERMINAL (terminal));
+                  if (!(window_title = vte_terminal_get_window_title (VTE_TERMINAL (terminal))))
+                    window_title = ptyxis_tab_get_initial_title (tab);
                   G_GNUC_END_IGNORE_DEPRECATIONS
 
                   if (container != NULL)
diff -Nru ptyxis-48.4/src/ptyxis-tab.c ptyxis-48.5/src/ptyxis-tab.c
--- ptyxis-48.4/src/ptyxis-tab.c	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/src/ptyxis-tab.c	2025-07-08 03:19:27.000000000 +0100
@@ -1966,6 +1966,14 @@
   self->command = copy;
 }
 
+const char *
+ptyxis_tab_get_initial_title (PtyxisTab *self)
+{
+  g_return_val_if_fail (PTYXIS_IS_TAB (self), NULL);
+
+  return self->initial_title;
+}
+
 void
 ptyxis_tab_set_initial_title (PtyxisTab  *self,
                               const char *initial_title)
diff -Nru ptyxis-48.4/src/ptyxis-tab.h ptyxis-48.5/src/ptyxis-tab.h
--- ptyxis-48.4/src/ptyxis-tab.h	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/src/ptyxis-tab.h	2025-07-08 03:19:27.000000000 +0100
@@ -111,6 +111,7 @@
 gboolean            ptyxis_tab_has_foreground_process             (PtyxisTab            *self,
                                                                    GPid                 *pid,
                                                                    char                **cmdline);
+const char         *ptyxis_tab_get_initial_title                  (PtyxisTab            *self);
 void                ptyxis_tab_set_initial_title                  (PtyxisTab            *self,
                                                                    const char           *initial_title);
 void                ptyxis_tab_set_initial_working_directory_uri  (PtyxisTab            *self,
diff -Nru ptyxis-48.4/src/ptyxis-theme-selector.c ptyxis-48.5/src/ptyxis-theme-selector.c
--- ptyxis-48.4/src/ptyxis-theme-selector.c	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/src/ptyxis-theme-selector.c	2025-07-08 03:19:27.000000000 +0100
@@ -226,10 +226,8 @@
 {
   g_return_if_fail (PTYXIS_IS_THEME_SELECTOR (self));
 
-  if (g_strcmp0 (action_name, self->action_name) != 0)
+  if (g_set_str (&self->action_name, action_name))
     {
-      g_free (self->action_name);
-      self->action_name = g_strdup (action_name);
       gtk_actionable_set_action_name (GTK_ACTIONABLE (self->dark), action_name);
       gtk_actionable_set_action_name (GTK_ACTIONABLE (self->light), action_name);
       gtk_actionable_set_action_name (GTK_ACTIONABLE (self->follow), action_name);
diff -Nru ptyxis-48.4/src/ptyxis-window.c ptyxis-48.5/src/ptyxis-window.c
--- ptyxis-48.4/src/ptyxis-window.c	2025-05-27 18:50:29.000000000 +0100
+++ ptyxis-48.5/src/ptyxis-window.c	2025-07-08 03:19:27.000000000 +0100
@@ -69,6 +69,7 @@
   GSignalGroup          *selected_page_signals;
   PtyxisWindowDressing  *dressing;
   GtkBox                *visual_bell;
+  GPropertyAction       *interface_style_action;
 
   guint                  visual_bell_source;
   guint                  focus_active_tab_source;
@@ -567,17 +568,10 @@
 ptyxis_window_tab_overview_create_tab_cb (PtyxisWindow   *self,
                                           AdwTabOverview *tab_overview)
 {
-  g_autoptr(PtyxisProfile) profile = NULL;
-  PtyxisTab *tab;
-
   g_assert (PTYXIS_IS_WINDOW (self));
   g_assert (ADW_IS_TAB_OVERVIEW (tab_overview));
 
-  profile = ptyxis_window_dup_profile_for_param (self, "default");
-  tab = ptyxis_tab_new (profile);
-
-  ptyxis_window_add_tab (self, tab);
-  ptyxis_window_set_active_tab (self, tab);
+  gtk_widget_activate_action (GTK_WIDGET (tab_overview), "win.new-tab", "(ss)", "", "");
 
   return adw_tab_view_get_selected_page (self->tab_view);
 }
@@ -1460,8 +1454,8 @@
   g_assert (PTYXIS_IS_WINDOW (self));
 
   settings = ptyxis_application_get_settings (PTYXIS_APPLICATION_DEFAULT);
-  interface_style = g_property_action_new ("interface-style", settings, "interface-style");
-  g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (interface_style));
+  self->interface_style_action = g_property_action_new ("interface-style", settings, "interface-style");
+  g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (self->interface_style_action));
 
   popover = gtk_menu_button_get_popover (self->primary_menu_button);
   selector = g_object_new (PTYXIS_TYPE_THEME_SELECTOR,
@@ -1654,6 +1648,8 @@
 
   self->disposed = TRUE;
 
+  g_action_map_remove_action (G_ACTION_MAP (self), "interface-style");
+
   gtk_widget_dispose_template (GTK_WIDGET (self), PTYXIS_TYPE_WINDOW);
 
   g_signal_group_set_target (self->active_tab_signals, NULL);
@@ -1662,6 +1658,7 @@
   g_signal_group_set_target (self->selected_page_signals, NULL);
   g_clear_handle_id (&self->focus_active_tab_source, g_source_remove);
   g_clear_object (&self->parking_lot);
+  g_clear_object (&self->interface_style_action);
 
   G_OBJECT_CLASS (ptyxis_window_parent_class)->dispose (object);
 }
