From d51892aff7ea9fd49a29e6bc24333753083e798a Mon Sep 17 00:00:00 2001 From: infirit Date: Sat, 17 May 2014 04:20:10 +0200 Subject: Drop support for gtk+ < 2.24 --- cut-n-paste/smclient/eggdesktopfile.c | 8 -------- cut-n-paste/smclient/eggsmclient-xsmp.c | 4 ---- cut-n-paste/toolbar-editor/egg-editable-toolbar.c | 21 --------------------- 3 files changed, 33 deletions(-) (limited to 'cut-n-paste') diff --git a/cut-n-paste/smclient/eggdesktopfile.c b/cut-n-paste/smclient/eggdesktopfile.c index 1f432adc..d50a1bcf 100644 --- a/cut-n-paste/smclient/eggdesktopfile.c +++ b/cut-n-paste/smclient/eggdesktopfile.c @@ -909,7 +909,6 @@ parse_link (EggDesktopFile *desktop_file, return TRUE; } -#if GTK_CHECK_VERSION (2, 12, 0) static char * start_startup_notification (GdkDisplay *display, EggDesktopFile *desktop_file, @@ -1020,7 +1019,6 @@ set_startup_notification_timeout (GdkDisplay *display, g_timeout_add_seconds (EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH, startup_notification_timeout, sn_data); } -#endif /* GTK 2.12 */ static GPtrArray * array_putenv (GPtrArray *env, char *variable) @@ -1207,7 +1205,6 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file, } g_free (command); -#if GTK_CHECK_VERSION (2, 12, 0) startup_id = start_startup_notification (display, desktop_file, argv[0], screen_num, workspace, launch_time); @@ -1218,9 +1215,6 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file, env = array_putenv (env, startup_id_env); g_free (startup_id_env); } -#else - startup_id = NULL; -#endif /* GTK 2.12 */ if (env != NULL) g_ptr_array_add (env, NULL); @@ -1238,7 +1232,6 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file, if (startup_id) { -#if GTK_CHECK_VERSION (2, 12, 0) if (current_success) { set_startup_notification_timeout (display, startup_id); @@ -1249,7 +1242,6 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file, g_free (startup_id); } else -#endif /* GTK 2.12 */ g_free (startup_id); } else if (ret_startup_id) diff --git a/cut-n-paste/smclient/eggsmclient-xsmp.c b/cut-n-paste/smclient/eggsmclient-xsmp.c index 8d6e9f7c..78ecbaea 100644 --- a/cut-n-paste/smclient/eggsmclient-xsmp.c +++ b/cut-n-paste/smclient/eggsmclient-xsmp.c @@ -369,11 +369,7 @@ sm_client_xsmp_startup (EggSMClient *client, free (ret_client_id); gdk_threads_enter (); -#if GTK_CHECK_VERSION (2, 24, 0) gdk_x11_set_sm_client_id (xsmp->client_id); -#else - gdk_set_sm_client_id (xsmp->client_id); -#endif gdk_threads_leave (); g_debug ("Got client ID \"%s\"", xsmp->client_id); diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c index bd66f6c6..c290ef56 100644 --- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c +++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c @@ -202,11 +202,7 @@ drag_begin_cb (GtkWidget *widget, gtk_widget_hide (widget); -#if GTK_CHECK_VERSION (2, 16, 0) action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (widget)); -#else - action = gtk_widget_get_action (widget); -#endif if (action == NULL) return; @@ -233,11 +229,7 @@ drag_end_cb (GtkWidget *widget, { gtk_widget_show (widget); -#if GTK_CHECK_VERSION (2, 16, 0) action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (widget)); -#else - action = gtk_widget_get_action (widget); -#endif if (action == NULL) return; @@ -547,11 +539,7 @@ configure_item_tooltip (GtkToolItem *item) { GtkAction *action; -#if GTK_CHECK_VERSION (2, 16, 0) action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (item)); -#else - action = gtk_widget_get_action (GTK_WIDGET (item)); -#endif if (action != NULL) { @@ -922,11 +910,7 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar) priv->visibility_id = gtk_ui_manager_new_merge_id (priv->manager); -#if GTK_CHECK_VERSION(2,20,0) showing = gtk_widget_get_visible (GTK_WIDGET (etoolbar)); -#else - showing = GTK_WIDGET_VISIBLE (etoolbar); -#endif n_toolbars = egg_toolbars_model_n_toolbars (priv->model); for (i = 0; i < n_toolbars; i++) @@ -1008,13 +992,8 @@ toolbar_visibility_refresh (EggEditableToolbar *etoolbar) gtk_action_set_visible (GTK_ACTION (action), (egg_toolbars_model_get_flags (priv->model, i) & EGG_TB_MODEL_NOT_REMOVABLE) == 0); gtk_action_set_sensitive (GTK_ACTION (action), showing); -#if GTK_CHECK_VERSION(2,20,0) gtk_toggle_action_set_active (action, gtk_widget_get_visible (get_dock_nth (etoolbar, i))); -#else - gtk_toggle_action_set_active (action, GTK_WIDGET_VISIBLE - (get_dock_nth (etoolbar, i))); -#endif for (list = priv->visibility_paths; list != NULL; list = g_list_next (list)) { -- cgit v1.2.1