[Xfce4-commits] [apps/xfce4-terminal] 01/01: Silence GtkAction-related deprecation warnings
noreply at xfce.org
noreply at xfce.org
Wed Feb 15 11:06:18 CET 2017
This is an automated email from the git hooks/post-receive script.
f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.
commit 59d8bb9a77c3a8ae2e4858d2892378473d348cb2
Author: Igor <f2404 at yandex.ru>
Date: Wed Feb 15 13:06:12 2017 +0300
Silence GtkAction-related deprecation warnings
---
configure.ac.in | 2 +-
terminal/terminal-encoding-action.c | 6 +++
terminal/terminal-window-dropdown.c | 52 +++++++++++++++++-------
terminal/terminal-window.c | 80 ++++++++++++++++++++++++++++++++-----
4 files changed, 116 insertions(+), 24 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 3df3af6..c153ee5 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -93,7 +93,7 @@ dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.16.0])
XDT_CHECK_PACKAGE([VTE], [vte-2.91], [0.38])
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.26.0])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.32.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.10.0])
dnl ***********************************
diff --git a/terminal/terminal-encoding-action.c b/terminal/terminal-encoding-action.c
index 2c44400..202007f 100644
--- a/terminal/terminal-encoding-action.c
+++ b/terminal/terminal-encoding-action.c
@@ -145,7 +145,9 @@ static GQuark encoding_action_quark = 0;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
G_DEFINE_TYPE (TerminalEncodingAction, terminal_encoding_action, GTK_TYPE_ACTION)
+G_GNUC_END_IGNORE_DEPRECATIONS
@@ -158,7 +160,9 @@ terminal_encoding_action_class_init (TerminalEncodingActionClass *klass)
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = terminal_encoding_action_finalize;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtkaction_class = GTK_ACTION_CLASS (klass);
+G_GNUC_END_IGNORE_DEPRECATIONS
gtkaction_class->create_menu_item = terminal_encoding_action_create_menu_item;
encoding_action_quark = g_quark_from_static_string ("encoding-action-quark");
@@ -203,7 +207,9 @@ terminal_encoding_action_create_menu_item (GtkAction *action)
terminal_return_val_if_fail (TERMINAL_IS_ENCODING_ACTION (action), NULL);
/* let GtkAction allocate the menu item */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
item = (*GTK_ACTION_CLASS (terminal_encoding_action_parent_class)->create_menu_item) (action);
+G_GNUC_END_IGNORE_DEPRECATIONS
/* associate an empty submenu with the item (will be filled when shown) */
menu = gtk_menu_new ();
diff --git a/terminal/terminal-window-dropdown.c b/terminal/terminal-window-dropdown.c
index 2fd51e8..25e279f 100644
--- a/terminal/terminal-window-dropdown.c
+++ b/terminal/terminal-window-dropdown.c
@@ -251,8 +251,9 @@ terminal_window_dropdown_init (TerminalWindowDropdown *dropdown)
terminal_window_notebook_show_tabs (window);
/* actions we don't want */
- action = terminal_window_get_action (window, "show-borders");
- gtk_action_set_visible (action, FALSE);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_action_set_visible (terminal_window_get_action (window, "show-borders"), FALSE);
+G_GNUC_END_IGNORE_DEPRECATIONS
/* notebook buttons */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
@@ -278,17 +279,23 @@ terminal_window_dropdown_init (TerminalWindowDropdown *dropdown)
button = gtk_button_new ();
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_set_tooltip_text (button, gtk_action_get_tooltip (action));
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
#if GTK_CHECK_VERSION (3,20,0)
gtk_widget_set_focus_on_click (button, FALSE);
#else
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
#endif
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_action_activate), action);
+G_GNUC_END_IGNORE_DEPRECATIONS
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
img = gtk_action_create_icon (action, GTK_ICON_SIZE_MENU);
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_container_add (GTK_CONTAINER (button), img);
/* connect bindings */
@@ -535,6 +542,7 @@ terminal_window_dropdown_status_icon_popup_menu (GtkStatusIcon *status_
TerminalWindowDropdown *dropdown)
{
GtkWidget *menu;
+ GtkWidget *menu_item;
GtkAction *action;
menu = gtk_menu_new ();
@@ -542,15 +550,18 @@ terminal_window_dropdown_status_icon_popup_menu (GtkStatusIcon *status_
G_CALLBACK (gtk_widget_destroy), NULL);
action = terminal_window_get_action (TERMINAL_WINDOW (dropdown), "preferences");
- gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- gtk_action_create_menu_item (action));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ menu_item = gtk_action_create_menu_item (action);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- gtk_separator_menu_item_new ());
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());
action = terminal_window_get_action (TERMINAL_WINDOW (dropdown), "close-window");
- gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- gtk_action_create_menu_item (action));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ menu_item = gtk_action_create_menu_item (action);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_show_all (menu);
#if GTK_CHECK_VERSION (3, 22, 0)
@@ -570,10 +581,10 @@ terminal_window_dropdown_animate_down (gpointer data)
{
TerminalWindowDropdown *dropdown = TERMINAL_WINDOW_DROPDOWN (data);
TerminalWindow *window = TERMINAL_WINDOW (data);
- GtkToggleAction *action_fullscreen;
GtkRequisition req1;
GdkRectangle rect;
gint step_size, vbox_h;
+ gboolean fullscreen;
/* get window size */
#if GTK_CHECK_VERSION (3, 22, 0)
@@ -585,8 +596,10 @@ terminal_window_dropdown_animate_down (gpointer data)
gdk_screen_get_monitor_geometry (dropdown->screen, dropdown->monitor_num, &rect);
#endif
- action_fullscreen = GTK_TOGGLE_ACTION (terminal_window_get_action (window, "fullscreen"));
- if (!gtk_toggle_action_get_active (action_fullscreen))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ fullscreen = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (terminal_window_get_action (window, "fullscreen")));
+G_GNUC_END_IGNORE_DEPRECATIONS
+ if (!fullscreen)
{
/* calculate width/height if not fullscreen */
rect.width *= dropdown->rel_width;
@@ -613,7 +626,7 @@ terminal_window_dropdown_animate_down (gpointer data)
return TRUE;
/* restore the fullscreen state */
- if (gtk_toggle_action_get_active (action_fullscreen))
+ if (fullscreen)
gtk_window_fullscreen (GTK_WINDOW (window));
/* animation complete */
@@ -630,6 +643,7 @@ terminal_window_dropdown_animate_up (gpointer data)
GtkRequisition req1;
GdkRectangle rect;
gint step_size, vbox_h, min_size;
+ gboolean fullscreen;
/* get window size */
#if GTK_CHECK_VERSION (3, 22, 0)
@@ -640,7 +654,11 @@ terminal_window_dropdown_animate_up (gpointer data)
#else
gdk_screen_get_monitor_geometry (dropdown->screen, dropdown->monitor_num, &rect);
#endif
- if (!gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (terminal_window_get_action (window, "fullscreen"))))
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ fullscreen = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (terminal_window_get_action (window, "fullscreen")));
+G_GNUC_END_IGNORE_DEPRECATIONS
+ if (!fullscreen)
{
/* calculate width/height if not fullscreen */
rect.width *= dropdown->rel_width;
@@ -724,6 +742,7 @@ terminal_window_dropdown_show (TerminalWindowDropdown *dropdown,
gboolean visible;
gint vbox_h;
TerminalDirection old_animation_dir = ANIMATION_DIR_NONE;
+ gboolean fullscreen;
#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display;
GdkMonitor *monitor;
@@ -771,7 +790,10 @@ terminal_window_dropdown_show (TerminalWindowDropdown *dropdown,
gtk_window_set_screen (GTK_WINDOW (dropdown), dropdown->screen);
/* correct padding with notebook size */
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (terminal_window_get_action (window, "fullscreen"))))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ fullscreen = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (terminal_window_get_action (window, "fullscreen")));
+G_GNUC_END_IGNORE_DEPRECATIONS
+ if (fullscreen)
{
/* don't fullscreen during animation*/
if (dropdown->animation_time > 0)
@@ -968,6 +990,7 @@ terminal_window_dropdown_new (const gchar *role,
terminal_window_dropdown_set_property (G_OBJECT (window),
PROP_DROPDOWN_STATUS_ICON, &value, NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* setup full screen */
action = terminal_window_get_action (window, "fullscreen");
if (fullscreen && gtk_action_is_sensitive (action))
@@ -989,6 +1012,7 @@ terminal_window_dropdown_new (const gchar *role,
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), show_toolbar);
g_signal_connect_swapped (action, "activate",
G_CALLBACK (terminal_window_dropdown_update_geometry), window);
+G_GNUC_END_IGNORE_DEPRECATIONS
return GTK_WIDGET (window);
}
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 847c041..a82233e 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -441,6 +441,7 @@ terminal_window_init (TerminalWindow *window)
/* required for vte transparency support: see https://bugzilla.gnome.org/show_bug.cgi?id=729884 */
gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
window->priv->action_group = gtk_action_group_new ("terminal-window");
gtk_action_group_set_translation_domain (window->priv->action_group,
GETTEXT_PACKAGE);
@@ -452,6 +453,7 @@ terminal_window_init (TerminalWindow *window)
toggle_action_entries,
G_N_ELEMENTS (toggle_action_entries),
GTK_WIDGET (window));
+G_GNUC_END_IGNORE_DEPRECATIONS
window->priv->ui_manager = gtk_ui_manager_new ();
gtk_ui_manager_insert_action_group (window->priv->ui_manager, window->priv->action_group, 0);
@@ -510,7 +512,9 @@ terminal_window_init (TerminalWindow *window)
/* create encoding action */
window->priv->encoding_action = terminal_encoding_action_new ("set-encoding", _("Set _Encoding"));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_action_group_add_action (window->priv->action_group, window->priv->encoding_action);
+G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect (G_OBJECT (window->priv->encoding_action), "encoding-changed",
G_CALLBACK (terminal_window_action_set_encoding), window);
@@ -539,7 +543,11 @@ terminal_window_init (TerminalWindow *window)
{
/* setup fullscreen mode */
if (!gdk_x11_screen_supports_net_wm_hint (screen, gdk_atom_intern ("_NET_WM_STATE_FULLSCREEN", FALSE)))
- gtk_action_set_sensitive (window->priv->action_fullscreen, FALSE);
+ {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_action_set_sensitive (window->priv->action_fullscreen, FALSE);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ }
}
#endif
}
@@ -621,8 +629,10 @@ terminal_window_state_event (GtkWidget *widget,
&& gtk_widget_get_visible (widget))
{
fullscreen = (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (window->priv->action_fullscreen)) != fullscreen)
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (window->priv->action_fullscreen), fullscreen);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
if (GTK_WIDGET_CLASS (terminal_window_parent_class)->window_state_event != NULL)
@@ -685,8 +695,11 @@ terminal_window_map_event (GtkWidget *widget,
GdkEventAny *event)
{
TerminalWindow *window = TERMINAL_WINDOW (widget);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gboolean fullscreen = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (window->priv->action_fullscreen));
+G_GNUC_END_IGNORE_DEPRECATIONS
- if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (window->priv->action_fullscreen)))
+ if (fullscreen)
gtk_window_fullscreen (GTK_WINDOW (widget));
return FALSE;
@@ -857,11 +870,13 @@ terminal_window_accel_activate (GtkAccelGroup *accel_group,
/* pretend we handled the accelerator if the event matches one of
* the insensitive actions, so we don't send weird key events to vte
* see http://bugzilla.xfce.org/show_bug.cgi?id=3715 */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (!gtk_action_is_sensitive (actions[n])
&& gtk_accel_map_lookup_entry (gtk_action_get_accel_path (actions[n]), &key)
&& key.accel_key == accel_key
&& key.accel_mods == accel_mods)
return TRUE;
+G_GNUC_END_IGNORE_DEPRECATIONS
}
return FALSE;
@@ -884,12 +899,14 @@ terminal_window_update_actions (TerminalWindow *window)
/* "Detach Tab", "Close Other Tabs" and move tab actions are only sensitive
* if we have at least two pages */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_action_set_sensitive (window->priv->action_detach_tab, (n_pages > 1));
gtk_action_set_sensitive (window->priv->action_close_other_tabs, n_pages > 1);
gtk_action_set_sensitive (window->priv->action_move_tab_left, n_pages > 1);
gtk_action_set_sensitive (window->priv->action_move_tab_right, n_pages > 1);
gtk_action_set_sensitive (window->priv->action_undo_close_tab, !g_queue_is_empty (window->priv->closed_tabs_list));
+G_GNUC_END_IGNORE_DEPRECATIONS
/* update the actions for the current terminal screen */
if (G_LIKELY (window->priv->active != NULL))
@@ -900,6 +917,7 @@ terminal_window_update_actions (TerminalWindow *window)
"misc-cycle-tabs", &cycle_tabs,
NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_action_set_sensitive (window->priv->action_prev_tab,
(cycle_tabs && n_pages > 1) || (page_num > 0));
gtk_action_set_sensitive (window->priv->action_next_tab,
@@ -916,6 +934,7 @@ terminal_window_update_actions (TerminalWindow *window)
action = g_object_get_qdata (G_OBJECT (window->priv->active), tabs_menu_action_quark);
if (G_LIKELY (action != NULL))
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), TRUE);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
}
@@ -1688,12 +1707,17 @@ static void
terminal_window_action_show_toolbar (GtkToggleAction *action,
TerminalWindow *window)
{
+ gboolean show;
+
terminal_return_if_fail (GTK_IS_UI_MANAGER (window->priv->ui_manager));
terminal_return_if_fail (GTK_IS_ACTION_GROUP (window->priv->action_group));
terminal_window_size_push (window);
- if (gtk_toggle_action_get_active (action))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ show = gtk_toggle_action_get_active (action);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ if (show)
{
if (window->priv->toolbar == NULL)
{
@@ -1720,8 +1744,11 @@ static void
terminal_window_action_show_borders (GtkToggleAction *action,
TerminalWindow *window)
{
- gtk_window_set_decorated (GTK_WINDOW (window),
- gtk_toggle_action_get_active (action));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gboolean decorated = gtk_toggle_action_get_active (action);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
+ gtk_window_set_decorated (GTK_WINDOW (window), decorated);
}
@@ -1730,9 +1757,14 @@ static void
terminal_window_action_fullscreen (GtkToggleAction *action,
TerminalWindow *window)
{
+ gboolean fullscreen;
+
if (gtk_widget_get_visible (GTK_WIDGET (window)))
{
- if (gtk_toggle_action_get_active (action))
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ fullscreen = gtk_toggle_action_get_active (action);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ if (fullscreen)
gtk_window_fullscreen (GTK_WINDOW (window));
else
{
@@ -1755,9 +1787,11 @@ terminal_window_action_readonly (GtkToggleAction *action,
terminal_return_if_fail (window->priv->active != NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
input_enabled = !gtk_toggle_action_get_active (action);
gtk_action_set_sensitive (terminal_window_get_action (window, "reset"), input_enabled);
gtk_action_set_sensitive (terminal_window_get_action (window, "reset-and-clear"), input_enabled);
+G_GNUC_END_IGNORE_DEPRECATIONS
terminal_screen_set_input_enabled (window->priv->active, input_enabled);
}
@@ -1853,12 +1887,14 @@ terminal_window_action_goto_tab (GtkRadioAction *action,
terminal_return_if_fail (GTK_IS_NOTEBOOK (notebook));
terminal_return_if_fail (GTK_IS_RADIO_ACTION (action));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)))
{
/* switch to the new page */
page = gtk_radio_action_get_current_value (action);
gtk_notebook_set_current_page (notebook, page);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
}
@@ -2029,8 +2065,10 @@ terminal_window_action_search_response (GtkWidget *dialog,
/* update actions */
can_search = terminal_screen_search_has_gregex (window->priv->active);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_action_set_sensitive (window->priv->action_search_next, can_search);
gtk_action_set_sensitive (window->priv->action_search_prev, can_search);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
@@ -2203,6 +2241,7 @@ terminal_window_zoom_update_screens (TerminalWindow *window)
/* update zoom actions */
action = terminal_window_get_action (window, "zoom-in");
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (window->zoom == TERMINAL_ZOOM_LEVEL_MAXIMUM)
gtk_action_set_sensitive (action, FALSE);
else if (!gtk_action_is_sensitive (action))
@@ -2213,6 +2252,7 @@ terminal_window_zoom_update_screens (TerminalWindow *window)
gtk_action_set_sensitive (action, FALSE);
else if (!gtk_action_is_sensitive (action))
gtk_action_set_sensitive (action, TRUE);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
@@ -2287,7 +2327,9 @@ terminal_window_menubar_deactivate (GtkWidget *widget,
terminal_return_if_fail (TERMINAL_IS_WINDOW (window));
action = terminal_window_get_action (window, "show-menubar");
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
terminal_window_action_show_menubar (GTK_TOGGLE_ACTION (action), window);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
@@ -2323,6 +2365,7 @@ terminal_window_new (const gchar *role,
"misc-borders-default", &show_borders,
NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* setup full screen */
if (fullscreen && gtk_action_is_sensitive (window->priv->action_fullscreen))
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (window->priv->action_fullscreen), TRUE);
@@ -2345,6 +2388,7 @@ terminal_window_new (const gchar *role,
show_borders = (borders == TERMINAL_VISIBILITY_SHOW);
action = terminal_window_get_action (window, "show-borders");
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), show_borders);
+G_GNUC_END_IGNORE_DEPRECATIONS
/* property that is not suitable for init */
g_object_bind_property (G_OBJECT (window->priv->preferences), "misc-tab-position",
@@ -2498,6 +2542,7 @@ terminal_window_get_restart_command (TerminalWindow *window)
if (G_LIKELY (role != NULL))
result = g_slist_prepend (result, g_strdup_printf ("--role=%s", role));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (window->priv->action_fullscreen)))
result = g_slist_prepend (result, g_strdup ("--fullscreen"));
@@ -2518,6 +2563,7 @@ terminal_window_get_restart_command (TerminalWindow *window)
result = g_slist_prepend (result, g_strdup ("--show-toolbar"));
else
result = g_slist_prepend (result, g_strdup ("--hide-toolbar"));
+G_GNUC_END_IGNORE_DEPRECATIONS
if (window->zoom != TERMINAL_ZOOM_LEVEL_DEFAULT)
result = g_slist_prepend (result, g_strdup_printf ("--zoom=%d", window->zoom));
@@ -2624,7 +2670,9 @@ GtkAction*
terminal_window_get_action (TerminalWindow *window,
const gchar *action_name)
{
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gtk_action_group_get_action (window->priv->action_group, action_name);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
@@ -2715,7 +2763,11 @@ terminal_window_rebuild_tabs_menu (TerminalWindow *window)
/* drop all the old accels from the action group */
for (lp = window->priv->tabs_menu_actions; lp != NULL; lp = lp->next)
- gtk_action_group_remove_action (window->priv->action_group, GTK_ACTION (lp->data));
+ {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_action_group_remove_action (window->priv->action_group, GTK_ACTION (lp->data));
+G_GNUC_END_IGNORE_DEPRECATIONS
+ }
g_slist_free (window->priv->tabs_menu_actions);
window->priv->tabs_menu_actions = NULL;
@@ -2734,6 +2786,7 @@ terminal_window_rebuild_tabs_menu (TerminalWindow *window)
g_snprintf (name, sizeof (name), "goto-tab-%d", n + 1);
/* create action */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
radio_action = gtk_radio_action_new (name, NULL, NULL, NULL, n);
gtk_action_set_sensitive (GTK_ACTION (radio_action), npages > 1);
g_object_bind_property (G_OBJECT (page), "title",
@@ -2742,6 +2795,7 @@ terminal_window_rebuild_tabs_menu (TerminalWindow *window)
gtk_radio_action_set_group (radio_action, group);
group = gtk_radio_action_get_group (radio_action);
gtk_action_group_add_action (window->priv->action_group, GTK_ACTION (radio_action));
+G_GNUC_END_IGNORE_DEPRECATIONS
g_signal_connect (G_OBJECT (radio_action), "activate",
G_CALLBACK (terminal_window_action_goto_tab), window->priv->notebook);
@@ -2765,7 +2819,11 @@ terminal_window_rebuild_tabs_menu (TerminalWindow *window)
/* set an accelerator path */
g_snprintf (name, sizeof (name), "<Actions>/terminal-window/goto-tab-%d", n + 1);
if (gtk_accel_map_lookup_entry (name, &key) && key.accel_key != 0)
- gtk_action_set_accel_path (GTK_ACTION (radio_action), name);
+ {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_action_set_accel_path (GTK_ACTION (radio_action), name);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ }
/* store */
window->priv->tabs_menu_actions = g_slist_prepend (window->priv->tabs_menu_actions, radio_action);
@@ -2783,9 +2841,13 @@ void
terminal_window_action_show_menubar (GtkToggleAction *action,
TerminalWindow *window)
{
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gboolean show = gtk_toggle_action_get_active (action);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
terminal_window_size_push (window);
- if (gtk_toggle_action_get_active (action))
+ if (show)
gtk_widget_show (window->priv->menubar);
else
gtk_widget_hide (window->priv->menubar);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list