diff -Nru ptyxis-48.3/data/org.gnome.Ptyxis.metainfo.xml.in.in ptyxis-48.4/data/org.gnome.Ptyxis.metainfo.xml.in.in --- ptyxis-48.3/data/org.gnome.Ptyxis.metainfo.xml.in.in 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/data/org.gnome.Ptyxis.metainfo.xml.in.in 2025-05-27 13:50:29.000000000 -0400 @@ -43,6 +43,17 @@ @APP_ID@.desktop + + + This is a bug fix release. + + Fix incorrect use of mnemonics in the new-terminal menu + Don't add additional tabs with --new-window when restoring session + Fix session restore directory URI for tabs which have never been visited + + + + diff -Nru ptyxis-48.3/debian/changelog ptyxis-48.4/debian/changelog --- ptyxis-48.3/debian/changelog 2025-05-08 12:49:02.000000000 -0400 +++ ptyxis-48.4/debian/changelog 2025-06-01 08:34:27.000000000 -0400 @@ -1,3 +1,10 @@ +ptyxis (48.4-1) unstable; urgency=medium + + * New upstream bugfix release + * Use Terminal branding instead of Ptyxis for Ubuntu + + -- Jeremy Bícha Sun, 01 Jun 2025 08:34:27 -0400 + ptyxis (48.3-1) unstable; urgency=medium [ Jeremy Bícha ] diff -Nru ptyxis-48.3/debian/rules ptyxis-48.4/debian/rules --- ptyxis-48.3/debian/rules 2025-05-08 12:49:02.000000000 -0400 +++ ptyxis-48.4/debian/rules 2025-06-01 08:34:27.000000000 -0400 @@ -6,6 +6,14 @@ %: dh $@ +# Use Terminal branding instead of Ptyxis for Ubuntu +override_dh_auto_configure: +ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes)) + dh_auto_configure -- -Dgeneric=terminal +else + dh_auto_configure +endif + execute_before_dh_installgsettings: ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes)) cp debian/gsettings-override.Ubuntu debian/gsettings-override diff -Nru ptyxis-48.3/meson.build ptyxis-48.4/meson.build --- ptyxis-48.3/meson.build 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/meson.build 2025-05-27 13:50:29.000000000 -0400 @@ -1,5 +1,5 @@ project('ptyxis', 'c', - version: '48.3', + version: '48.4', meson_version: '>= 1.0.0', default_options: [ 'warning_level=2', 'werror=false', 'c_std=gnu11', ], ) diff -Nru ptyxis-48.3/NEWS ptyxis-48.4/NEWS --- ptyxis-48.3/NEWS 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/NEWS 2025-05-27 13:50:29.000000000 -0400 @@ -1,3 +1,9 @@ +# Ptyxis 48.4 + + * Fix incorrect use of mnemonics in the new-terminal menu + * Don't add additional tabs with --new-window when restoring session + * Fix session restore directory URI for tabs which have never been visited + # Ptyxis 48.3 * New build to work around GNOME CI infrastructure issue diff -Nru ptyxis-48.3/src/ptyxis-application.c ptyxis-48.4/src/ptyxis-application.c --- ptyxis-48.3/src/ptyxis-application.c 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-application.c 2025-05-27 13:50:29.000000000 -0400 @@ -609,8 +609,24 @@ { g_autoptr(PtyxisProfile) profile = ptyxis_application_dup_default_profile (self); PtyxisWindow *window = get_current_window (self); - PtyxisTab *tab = ptyxis_tab_new (profile); - PtyxisTerminal *terminal = ptyxis_tab_get_terminal (tab); + PtyxisTerminal *terminal; + PtyxisTab *tab; + + /* If the request to create a new-window was not combined with other + * actions above, and we restored a session, then we will consider the + * request satistfied and not try to add another tab. + * + * This can happen when `--new-window` is used as a keybinding to ensure + * a new window is added whether or not there is an existing instance. + */ + if (window != NULL && did_restore) + { + gtk_window_present (GTK_WINDOW (window)); + return EXIT_SUCCESS; + } + + tab = ptyxis_tab_new (profile); + terminal = ptyxis_tab_get_terminal (tab); if (window == NULL || !did_restore) { diff -Nru ptyxis-48.3/src/ptyxis-container-menu.c ptyxis-48.4/src/ptyxis-container-menu.c --- ptyxis-48.3/src/ptyxis-container-menu.c 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-container-menu.c 2025-05-27 13:50:29.000000000 -0400 @@ -83,6 +83,7 @@ PtyxisContainerMenu *self = PTYXIS_CONTAINER_MENU (model); g_autoptr(PtyxisIpcContainer) container = NULL; g_autoptr(GIcon) icon = NULL; + g_autofree char *label_escaped = NULL; const char *icon_name; const char *label; const char *id; @@ -103,10 +104,12 @@ if ((icon_name = ptyxis_ipc_container_get_icon_name (container))) icon = g_themed_icon_new (icon_name); + label_escaped = ptyxis_escape_underline (label); + ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_variant_unref); g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_ACTION), g_variant_ref_sink (g_variant_new_string ("win.new-terminal"))); g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_TARGET), g_variant_ref_sink (g_variant_new ("(ss)", "", id))); - g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_LABEL), g_variant_ref_sink (g_variant_new_string (label))); + g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_LABEL), g_variant_ref_sink (g_variant_new_string (label_escaped))); if (icon != NULL) g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_ICON), g_icon_serialize (icon)); diff -Nru ptyxis-48.3/src/ptyxis-profile-menu.c ptyxis-48.4/src/ptyxis-profile-menu.c --- ptyxis-48.3/src/ptyxis-profile-menu.c 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-profile-menu.c 2025-05-27 13:50:29.000000000 -0400 @@ -23,6 +23,7 @@ #include "ptyxis-profile.h" #include "ptyxis-profile-menu.h" +#include "ptyxis-util.h" struct _PtyxisProfileMenu { @@ -84,6 +85,7 @@ PtyxisProfileMenu *self = PTYXIS_PROFILE_MENU (model); g_autoptr(PtyxisProfile) profile = NULL; g_autofree char *label = NULL; + g_autofree char *label_escaped = NULL; const char *uuid; GHashTable *ht; @@ -97,11 +99,12 @@ uuid = self->uuids[position]; profile = ptyxis_profile_new (uuid); label = ptyxis_profile_dup_label (profile); + label_escaped = ptyxis_escape_underline (label); ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_variant_unref); g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_ACTION), g_variant_ref_sink (g_variant_new_string ("win.new-terminal"))); g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_TARGET), g_variant_ref_sink (g_variant_new ("(ss)", uuid, ""))); - g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_LABEL), g_variant_ref_sink (g_variant_new_string (label))); + g_hash_table_insert (ht, g_strdup (G_MENU_ATTRIBUTE_LABEL), g_variant_ref_sink (g_variant_new_string (label_escaped))); *attributes = ht; } diff -Nru ptyxis-48.3/src/ptyxis-session.c ptyxis-48.4/src/ptyxis-session.c --- ptyxis-48.3/src/ptyxis-session.c 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-session.c 2025-05-27 13:50:29.000000000 -0400 @@ -105,6 +105,13 @@ cwd = ptyxis_terminal_dup_current_directory_uri (terminal); zoom = ptyxis_tab_get_zoom (tab); + /* If we had an initial directory and we've never got an update, + * it could be that the tab has never spawned to process the + * directory state updates. + */ + if (cwd == NULL) + cwd = ptyxis_tab_dup_previous_working_directory_uri (tab); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS window_title = vte_terminal_get_window_title (VTE_TERMINAL (terminal)); G_GNUC_END_IGNORE_DEPRECATIONS diff -Nru ptyxis-48.3/src/ptyxis-tab.c ptyxis-48.4/src/ptyxis-tab.c --- ptyxis-48.3/src/ptyxis-tab.c 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-tab.c 2025-05-27 13:50:29.000000000 -0400 @@ -1505,6 +1505,15 @@ g_set_str (&self->initial_working_directory_uri, initial_working_directory_uri); } +char * +ptyxis_tab_dup_previous_working_directory_uri (PtyxisTab *self) +{ + g_return_val_if_fail (PTYXIS_IS_TAB (self), NULL); + + return g_strdup (self->previous_working_directory_uri); +} + + void ptyxis_tab_set_previous_working_directory_uri (PtyxisTab *self, const char *previous_working_directory_uri) diff -Nru ptyxis-48.3/src/ptyxis-tab.h ptyxis-48.4/src/ptyxis-tab.h --- ptyxis-48.3/src/ptyxis-tab.h 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-tab.h 2025-05-27 13:50:29.000000000 -0400 @@ -87,6 +87,7 @@ void ptyxis_tab_set_title_prefix (PtyxisTab *self, const char *title_prefix); char *ptyxis_tab_dup_current_directory_uri (PtyxisTab *self); +char *ptyxis_tab_dup_previous_working_directory_uri (PtyxisTab *self); void ptyxis_tab_set_previous_working_directory_uri (PtyxisTab *self, const char *previous_working_directory_uri); PtyxisTabProgress ptyxis_tab_get_progress (PtyxisTab *self); diff -Nru ptyxis-48.3/src/ptyxis-util.c ptyxis-48.4/src/ptyxis-util.c --- ptyxis-48.3/src/ptyxis-util.c 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-util.c 2025-05-27 13:50:29.000000000 -0400 @@ -453,3 +453,28 @@ return ptyxis_is_default (); } + +char * +ptyxis_escape_underline (const char *str) +{ + GString *gstr; + + if (str == NULL) + return NULL; + + gstr = g_string_new (NULL); + + for (const char *c = str; + *c != 0; + c = g_utf8_next_char (c)) + { + gunichar ch = g_utf8_get_char (c); + + if (ch == '_') + g_string_append_c (gstr, '_'); + + g_string_append_unichar (gstr, ch); + } + + return g_string_free (gstr, FALSE); +} diff -Nru ptyxis-48.3/src/ptyxis-util.h ptyxis-48.4/src/ptyxis-util.h --- ptyxis-48.3/src/ptyxis-util.h 2025-05-07 14:28:03.000000000 -0400 +++ ptyxis-48.4/src/ptyxis-util.h 2025-05-27 13:50:29.000000000 -0400 @@ -59,6 +59,7 @@ guint timeout); gboolean ptyxis_is_default (void); gboolean ptyxis_make_default (void); +char *ptyxis_escape_underline (const char *str); static inline void ptyxis_take_str (char **out_str,
This is a bug fix release.