terminal_window_menu_add_section.patch 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. diff -Nuar a/terminal/terminal-window.c b/terminal/terminal-window.c
  2. --- a/terminal/terminal-window.c 2022-05-22 12:06:41.000000000 +0300
  3. +++ b/terminal/terminal-window.c 2023-04-19 02:15:36.271821967 +0300
  4. @@ -1459,22 +1459,22 @@
  5. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_NEW_TAB), G_OBJECT (window), GTK_MENU_SHELL (context_menu));
  6. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_NEW_WINDOW), G_OBJECT (window), GTK_MENU_SHELL (context_menu));
  7. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu));
  8. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu));
  9. terminal_window_menu_add_section (window, context_menu, MENU_SECTION_COPY | MENU_SECTION_PASTE, FALSE);
  10. 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));
  11. 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));
  12. 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));
  13. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu));
  14. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu));
  15. terminal_window_menu_add_section (window, context_menu, MENU_SECTION_ZOOM | MENU_SECTION_SIGNAL, TRUE);
  16. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SAVE_CONTENTS), G_OBJECT (window), GTK_MENU_SHELL (context_menu));
  17. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu));
  18. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu));
  19. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_PREFERENCES), G_OBJECT (window), GTK_MENU_SHELL (context_menu));
  20. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (context_menu));
  21. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (context_menu));
  22. /* hide labels */
  23. children = gtk_container_get_children (GTK_CONTAINER (context_menu));
  24. @@ -3094,7 +3094,7 @@
  25. if (sections & MENU_SECTION_SIGNAL)
  26. {
  27. - AS_SUBMENU ("Send Signal")
  28. + AS_SUBMENU (_("Send Signal"))
  29. for (int i = 1; i < n_signal_names; i++)
  30. {
  31. gchar *label;
  32. @@ -3106,52 +3106,52 @@
  33. g_signal_connect_data (G_OBJECT (item), "activate", G_CALLBACK (terminal_window_action_send_signal), p, terminal_util_free_data, G_CONNECT_SWAPPED);
  34. gtk_menu_shell_append (GTK_MENU_SHELL (insert_to_menu), item);
  35. }
  36. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  37. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  38. }
  39. if (sections & MENU_SECTION_ZOOM)
  40. {
  41. - AS_SUBMENU ("Zoom");
  42. + AS_SUBMENU (_("Zoom"));
  43. 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));
  44. gtk_widget_set_sensitive (item, window->priv->zoom != TERMINAL_ZOOM_LEVEL_MAXIMUM);
  45. 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));
  46. gtk_widget_set_sensitive (item, window->priv->zoom != TERMINAL_ZOOM_LEVEL_MINIMUM);
  47. 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));
  48. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  49. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  50. }
  51. if (sections & MENU_SECTION_COPY)
  52. {
  53. - AS_SUBMENU ("Copy");
  54. + AS_SUBMENU (_("Copy"));
  55. 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));
  56. gtk_widget_set_sensitive (item, terminal_screen_has_selection (window->priv->active));
  57. 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));
  58. gtk_widget_set_sensitive (item, terminal_screen_has_selection (window->priv->active));
  59. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  60. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  61. }
  62. if (sections & MENU_SECTION_PASTE)
  63. {
  64. - AS_SUBMENU ("Paste");
  65. + AS_SUBMENU (_("Paste"));
  66. 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));
  67. gtk_widget_set_sensitive (item, terminal_screen_get_input_enabled (window->priv->active));
  68. 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));
  69. gtk_widget_set_sensitive (item, terminal_screen_get_input_enabled (window->priv->active));
  70. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  71. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  72. }
  73. if (sections & MENU_SECTION_VIEW)
  74. {
  75. - AS_SUBMENU ("View Options");
  76. + AS_SUBMENU (_("View Options"));
  77. 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));
  78. 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));
  79. 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));
  80. 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));
  81. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  82. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  83. }
  84. #undef AS_SUBMENU
  85. @@ -3179,10 +3179,10 @@
  86. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_NEW_WINDOW), G_OBJECT (window), GTK_MENU_SHELL (menu));
  87. 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));
  88. gtk_widget_set_sensitive (item, !g_queue_is_empty (window->priv->closed_tabs_list));
  89. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  90. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  91. item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_DETACH_TAB), G_OBJECT (window), GTK_MENU_SHELL (menu));
  92. gtk_widget_set_sensitive (item, n_pages > 1);
  93. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  94. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  95. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_CLOSE_TAB), G_OBJECT (window), GTK_MENU_SHELL (menu));
  96. 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));
  97. gtk_widget_set_sensitive (item, n_pages > 1);
  98. @@ -3202,9 +3202,9 @@
  99. terminal_window_menu_clean (GTK_MENU (menu));
  100. terminal_window_menu_add_section (window, menu, MENU_SECTION_COPY | MENU_SECTION_PASTE, FALSE);
  101. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SELECT_ALL), G_OBJECT (window), GTK_MENU_SHELL (menu));
  102. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  103. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  104. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_COPY_INPUT), G_OBJECT (window), GTK_MENU_SHELL (menu));
  105. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  106. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  107. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_PREFERENCES), G_OBJECT (window), GTK_MENU_SHELL (menu));
  108. #if LIBXFCE4UI_CHECK_VERSION (4, 17, 2)
  109. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SHORTCUTS), G_OBJECT (window), GTK_MENU_SHELL (menu));
  110. @@ -3242,25 +3242,25 @@
  111. terminal_window_menu_clean (GTK_MENU (menu));
  112. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SET_TITLE), G_OBJECT (window), GTK_MENU_SHELL (menu));
  113. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SET_TITLE_COLOR), G_OBJECT (window), GTK_MENU_SHELL (menu));
  114. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  115. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  116. can_search = terminal_screen_search_has_gregex (window->priv->active);
  117. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SEARCH), G_OBJECT (window), GTK_MENU_SHELL (menu));
  118. item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SEARCH_NEXT), G_OBJECT (window), GTK_MENU_SHELL (menu));
  119. gtk_widget_set_sensitive (item, can_search);
  120. item = xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SEARCH_PREV), G_OBJECT (window), GTK_MENU_SHELL (menu));
  121. gtk_widget_set_sensitive (item, can_search);
  122. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  123. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  124. /* Set Encoding uses the TerminalAction, GtkAction, therefore it is deprecated */
  125. G_GNUC_BEGIN_IGNORE_DEPRECATIONS
  126. gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_action_create_menu_item (window->priv->encoding_action));
  127. G_GNUC_END_IGNORE_DEPRECATIONS
  128. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  129. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  130. 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));
  131. 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));
  132. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  133. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  134. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_SAVE_CONTENTS), G_OBJECT (window), GTK_MENU_SHELL (menu));
  135. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  136. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  137. terminal_window_menu_add_section (window, menu, MENU_SECTION_SIGNAL, TRUE);
  138. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_RESET), G_OBJECT (window), GTK_MENU_SHELL (menu));
  139. xfce_gtk_menu_item_new_from_action_entry (get_action_entry (TERMINAL_WINDOW_ACTION_RESET_AND_CLEAR), G_OBJECT (window), GTK_MENU_SHELL (menu));
  140. @@ -3301,7 +3301,7 @@
  141. gtk_widget_set_sensitive (item, can_go_right);
  142. 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));
  143. gtk_widget_set_sensitive (item, window->priv->last_active != NULL);
  144. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  145. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  146. 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));
  147. gtk_widget_set_sensitive (item, can_go_left);
  148. 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));
  149. diff -Nuar a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
  150. --- a/terminal/terminal-window-dropdown.c 2022-05-22 12:06:41.000000000 +0300
  151. +++ b/terminal/terminal-window-dropdown.c 2023-04-19 02:14:16.798815517 +0300
  152. @@ -550,9 +550,9 @@
  153. G_CALLBACK (gtk_widget_destroy), NULL);
  154. 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));
  155. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  156. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  157. 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));
  158. - xfce_gtk_menu_append_seperator (GTK_MENU_SHELL (menu));
  159. + xfce_gtk_menu_append_separator (GTK_MENU_SHELL (menu));
  160. gtk_widget_show_all (menu);
  161. gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);