From ad2d160888f2614ab6629d7079be29635374bff2 Mon Sep 17 00:00:00 2001 From: Rmys Date: Wed, 19 Apr 2023 02:26:04 +0300 Subject: [PATCH] xfce4-terminal --- desktop/xfce/base/xfce4-terminal/actions.py | 3 + ...es_size_when_the_window_is_maximized.patch | 26 --- .../terminal_window_menu_add_section.patch | 181 ++++++++++++++++++ desktop/xfce/base/xfce4-terminal/pspec.xml | 2 +- 4 files changed, 185 insertions(+), 27 deletions(-) delete mode 100644 desktop/xfce/base/xfce4-terminal/files/Menubar_changes_size_when_the_window_is_maximized.patch create mode 100644 desktop/xfce/base/xfce4-terminal/files/terminal_window_menu_add_section.patch diff --git a/desktop/xfce/base/xfce4-terminal/actions.py b/desktop/xfce/base/xfce4-terminal/actions.py index 5280f891e1..6bedb07695 100644 --- a/desktop/xfce/base/xfce4-terminal/actions.py +++ b/desktop/xfce/base/xfce4-terminal/actions.py @@ -6,10 +6,13 @@ from pisi.actionsapi import autotools from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools from pisi.actionsapi import get def setup(): pisitools.cflags.add("-Wno-deprecated-declarations") + autotools.autoreconf("-fiv") + # shelltools.system("NOCONFIGURE=1 ./autogen.sh") autotools.configure("--disable-static") def build(): diff --git a/desktop/xfce/base/xfce4-terminal/files/Menubar_changes_size_when_the_window_is_maximized.patch b/desktop/xfce/base/xfce4-terminal/files/Menubar_changes_size_when_the_window_is_maximized.patch deleted file mode 100644 index 661866d68b..0000000000 --- a/desktop/xfce/base/xfce4-terminal/files/Menubar_changes_size_when_the_window_is_maximized.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 020a2c8267f88568dcba4848ed826c4d9c34f063 Mon Sep 17 00:00:00 2001 -From: Sergios - Anestis Kefalidis -Date: Mon, 27 Dec 2021 20:08:18 +0200 -Subject: Fix regression: Menubar changes size when the window is maximized - (Issue #156) - ---- - terminal/terminal-window.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c -index b4532a92..45951ee0 100644 ---- a/terminal/terminal-window.c -+++ b/terminal/terminal-window.c -@@ -535,7 +535,7 @@ terminal_window_init (TerminalWindow *window) - g_signal_connect (G_OBJECT (window->priv->notebook), "scroll-event", - G_CALLBACK (terminal_window_notebook_scroll_event), window); - -- gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->menubar, TRUE, TRUE, 0); -+ gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->menubar, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->toolbar, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (window->priv->vbox), window->priv->notebook, TRUE, TRUE, 0); - gtk_widget_show_all (window->priv->vbox); --- -cgit v1.2.3 - diff --git a/desktop/xfce/base/xfce4-terminal/files/terminal_window_menu_add_section.patch b/desktop/xfce/base/xfce4-terminal/files/terminal_window_menu_add_section.patch new file mode 100644 index 0000000000..cc8175717d --- /dev/null +++ b/desktop/xfce/base/xfce4-terminal/files/terminal_window_menu_add_section.patch @@ -0,0 +1,181 @@ +diff -Nuar a/terminal/terminal-window.c b/terminal/terminal-window.c +--- a/terminal/terminal-window.c 2022-05-22 12:06:41.000000000 +0300 ++++ b/terminal/terminal-window.c 2023-04-19 02:15:36.271821967 +0300 +@@ -1459,22 +1459,22 @@ + + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_NEW_TAB), G_OBJECT (window), GTK_MENU_SHELL (context_menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_NEW_WINDOW), G_OBJECT (window), GTK_MENU_SHELL (context_menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu)); + + terminal_window_menu_add_section (window, context_menu, MENU_SECTION_COPY | MENU_SECTION_PASTE, FALSE); + + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SHOW_MENUBAR), G_OBJECT (window), gtk_widget_is_visible (window->menubar), GTK_MENU_SHELL (context_menu)); + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_FULLSCREEN), G_OBJECT (window), window->is_fullscreen, GTK_MENU_SHELL (context_menu)); + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_READ_ONLY), G_OBJECT (window), !terminal_screen_get_input_enabled (window->priv->active), GTK_MENU_SHELL (context_menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu)); + + terminal_window_menu_add_section (window, context_menu, MENU_SECTION_ZOOM | MENU_SECTION_SIGNAL, TRUE); + + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SAVE_CONTENTS), G_OBJECT (window), GTK_MENU_SHELL (context_menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu)); + + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_PREFERENCES), G_OBJECT (window), GTK_MENU_SHELL (context_menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu)); + + /* hide labels */ + children = gtk_container_get_children (GTK_CONTAINER (context_menu)); +@@ -3094,7 +3094,7 @@ + + if (sections & MENU_SECTION_SIGNAL) + { +- AS_SUBMENU ("Send Signal") ++ AS_SUBMENU (_("Send Signal")) + for (int i = 1; i < n_signal_names; i++) + { + gchar *label; +@@ -3106,52 +3106,52 @@ + g_signal_connect_data (G_OBJECT (item), "activate", G_CALLBACK (terminal_window_action_send_signal), p, terminal_util_free_data, G_CONNECT_SWAPPED); + gtk_menu_shell_append (GTK_MENU_SHELL (insert_to_menu), item); + } +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + } + + if (sections & MENU_SECTION_ZOOM) + { +- AS_SUBMENU ("Zoom"); ++ AS_SUBMENU (_("Zoom")); + + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_ZOOM_IN), G_OBJECT (window), GTK_MENU_SHELL (insert_to_menu)); + gtk_widget_set_sensitive (item, window->priv->zoom != TERMINAL_ZOOM_LEVEL_MAXIMUM); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_ZOOM_OUT), G_OBJECT (window), GTK_MENU_SHELL (insert_to_menu)); + gtk_widget_set_sensitive (item, window->priv->zoom != TERMINAL_ZOOM_LEVEL_MINIMUM); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_ZOOM_RESET), G_OBJECT (window), GTK_MENU_SHELL (insert_to_menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + } + + if (sections & MENU_SECTION_COPY) + { +- AS_SUBMENU ("Copy"); ++ AS_SUBMENU (_("Copy")); + + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_COPY), G_OBJECT (window), GTK_MENU_SHELL (insert_to_menu)); + gtk_widget_set_sensitive (item, terminal_screen_has_selection (window->priv->active)); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_COPY_HTML), G_OBJECT (window), GTK_MENU_SHELL (insert_to_menu)); + gtk_widget_set_sensitive (item, terminal_screen_has_selection (window->priv->active)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + } + + if (sections & MENU_SECTION_PASTE) + { +- AS_SUBMENU ("Paste"); ++ AS_SUBMENU (_("Paste")); + + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_PASTE), G_OBJECT (window), GTK_MENU_SHELL (insert_to_menu)); + gtk_widget_set_sensitive (item, terminal_screen_get_input_enabled (window->priv->active)); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_PASTE_SELECTION), G_OBJECT (window), GTK_MENU_SHELL (insert_to_menu)); + gtk_widget_set_sensitive (item, terminal_screen_get_input_enabled (window->priv->active)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + } + + if (sections & MENU_SECTION_VIEW) + { +- AS_SUBMENU ("View Options"); ++ AS_SUBMENU (_("View Options")); + + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SHOW_MENUBAR), G_OBJECT (window), gtk_widget_is_visible (window->menubar), GTK_MENU_SHELL (insert_to_menu)); + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SHOW_TOOLBAR), G_OBJECT (window), gtk_widget_is_visible (window->toolbar), GTK_MENU_SHELL (insert_to_menu)); + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SHOW_BORDERS), G_OBJECT (window), gtk_window_get_decorated (GTK_WINDOW (window)), GTK_MENU_SHELL (insert_to_menu)); + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_FULLSCREEN), G_OBJECT (window), window->is_fullscreen, GTK_MENU_SHELL (insert_to_menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + } + + #undef AS_SUBMENU +@@ -3179,10 +3179,10 @@ + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_NEW_WINDOW), G_OBJECT (window), GTK_MENU_SHELL (menu)); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_UNDO_CLOSE_TAB), G_OBJECT (window), GTK_MENU_SHELL (menu)); + gtk_widget_set_sensitive (item, !g_queue_is_empty (window->priv->closed_tabs_list)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_DETACH_TAB), G_OBJECT (window), GTK_MENU_SHELL (menu)); + gtk_widget_set_sensitive (item, n_pages > 1); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_CLOSE_TAB), G_OBJECT (window), GTK_MENU_SHELL (menu)); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_CLOSE_OTHER_TABS), G_OBJECT (window), GTK_MENU_SHELL (menu)); + gtk_widget_set_sensitive (item, n_pages > 1); +@@ -3202,9 +3202,9 @@ + terminal_window_menu_clean (GTK_MENU (menu)); + terminal_window_menu_add_section (window, menu, MENU_SECTION_COPY | MENU_SECTION_PASTE, FALSE); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SELECT_ALL), G_OBJECT (window), GTK_MENU_SHELL (menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_COPY_INPUT), G_OBJECT (window), GTK_MENU_SHELL (menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_PREFERENCES), G_OBJECT (window), GTK_MENU_SHELL (menu)); + #if LIBXFCE4UI_CHECK_VERSION (4, 17, 2) + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SHORTCUTS), G_OBJECT (window), GTK_MENU_SHELL (menu)); +@@ -3242,25 +3242,25 @@ + terminal_window_menu_clean (GTK_MENU (menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SET_TITLE), G_OBJECT (window), GTK_MENU_SHELL (menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SET_TITLE_COLOR), G_OBJECT (window), GTK_MENU_SHELL (menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + can_search = terminal_screen_search_has_gregex (window->priv->active); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SEARCH), G_OBJECT (window), GTK_MENU_SHELL (menu)); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SEARCH_NEXT), G_OBJECT (window), GTK_MENU_SHELL (menu)); + gtk_widget_set_sensitive (item, can_search); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SEARCH_PREV), G_OBJECT (window), GTK_MENU_SHELL (menu)); + gtk_widget_set_sensitive (item, can_search); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + + /* Set Encoding uses the TerminalAction, GtkAction, therefore it is deprecated */ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_action_create_menu_item (window->priv->encoding_action)); + G_GNUC_END_IGNORE_DEPRECATIONS +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_READ_ONLY), G_OBJECT (window), !terminal_screen_get_input_enabled (window->priv->active), GTK_MENU_SHELL (menu)); + xfce_gtk_toggle_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SCROLL_ON_OUTPUT), G_OBJECT (window), terminal_screen_get_scroll_on_output (window->priv->active), GTK_MENU_SHELL (menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SAVE_CONTENTS), G_OBJECT (window), GTK_MENU_SHELL (menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + terminal_window_menu_add_section (window, menu, MENU_SECTION_SIGNAL, TRUE); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_RESET), G_OBJECT (window), GTK_MENU_SHELL (menu)); + xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_RESET_AND_CLEAR), G_OBJECT (window), GTK_MENU_SHELL (menu)); +@@ -3301,7 +3301,7 @@ + gtk_widget_set_sensitive (item, can_go_right); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_LAST_ACTIVE_TAB), G_OBJECT (window), GTK_MENU_SHELL (menu)); + gtk_widget_set_sensitive (item, window->priv->last_active != NULL); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_MOVE_TAB_LEFT), G_OBJECT (window), GTK_MENU_SHELL (menu)); + gtk_widget_set_sensitive (item, can_go_left); + item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_MOVE_TAB_RIGHT), G_OBJECT (window), GTK_MENU_SHELL (menu)); +diff -Nuar a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c +--- a/terminal/terminal-window-dropdown.c 2022-05-22 12:06:41.000000000 +0300 ++++ b/terminal/terminal-window-dropdown.c 2023-04-19 02:14:16.798815517 +0300 +@@ -550,9 +550,9 @@ + G_CALLBACK (gtk_widget_destroy), NULL); + + xfce_gtk_menu_item_new_from_action_entry (terminal_window_get_action_entry (window, TERMINAL_WINDOW_ACTION_PREFERENCES), G_OBJECT (window), GTK_MENU_SHELL (menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + xfce_gtk_menu_item_new_from_action_entry (terminal_window_get_action_entry (window, TERMINAL_WINDOW_ACTION_CLOSE_WINDOW), G_OBJECT (window), GTK_MENU_SHELL (menu)); +- xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu)); ++ xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu)); + + gtk_widget_show_all (menu); + gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL); diff --git a/desktop/xfce/base/xfce4-terminal/pspec.xml b/desktop/xfce/base/xfce4-terminal/pspec.xml index 8448be0c5c..46fe012f49 100644 --- a/desktop/xfce/base/xfce4-terminal/pspec.xml +++ b/desktop/xfce/base/xfce4-terminal/pspec.xml @@ -26,7 +26,7 @@ libxfce4ui-devel - + terminal_window_menu_add_section.patch