From c5d35e84d1b2b8c3df8406fdaf4c35b605792421 Mon Sep 17 00:00:00 2001 From: yetist Date: Fri, 19 Jun 2015 22:00:00 +0800 Subject: Gtk3: fixed build warning --- mate-panel/panel-properties-dialog.c | 4 +++- mate-panel/panel-run-dialog.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c index 412371de..c1f5c76e 100644 --- a/mate-panel/panel-properties-dialog.c +++ b/mate-panel/panel-properties-dialog.c @@ -394,7 +394,7 @@ panel_properties_dialog_image_changed (PanelPropertiesDialog *dialog) /* FIXME: This is an ugly workaround for GTK+ bug #327243. * FIXME: Note that GTK+ 2.12 and file-set signal might help. */ - if (!dialog->selection_emitted < 2 && !image) { + if (! (dialog->selection_emitted < 2) && !image) { dialog->selection_emitted++; return; } @@ -749,6 +749,7 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog, &new_color); } +#if !GTK_CHECK_VERSION(3, 0, 0) static void panel_properties_dialog_update_background_opacity (PanelPropertiesDialog *dialog, gint opacity) @@ -760,6 +761,7 @@ panel_properties_dialog_update_background_opacity (PanelPropertiesDialog *dialog if ((int) gtk_range_get_value (GTK_RANGE (dialog->opacity_scale)) != (int) percentage) gtk_range_set_value (GTK_RANGE (dialog->opacity_scale), percentage); } +#endif static void panel_properties_dialog_update_background_image (PanelPropertiesDialog *dialog, diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c index 9da6ce03..ce246e5e 100644 --- a/mate-panel/panel-run-dialog.c +++ b/mate-panel/panel-run-dialog.c @@ -362,7 +362,9 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, const char *command, const char *locale_command) { +#if !GTK_CHECK_VERSION (3, 0, 0) GdkScreen *screen; +#endif gboolean result; GError *error = NULL; char **argv; @@ -372,8 +374,6 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, if (!command_is_executable (locale_command, &argc, &argv)) return FALSE; - screen = gtk_window_get_screen (GTK_WINDOW (dialog->run_dialog)); - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->terminal_checkbox))) mate_desktop_prepend_terminal_to_vector (&argc, &argv); @@ -387,6 +387,8 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog, &pid, &error); #else + screen = gtk_window_get_screen (GTK_WINDOW (dialog->run_dialog)); + result = gdk_spawn_on_screen (screen, NULL, /* working directory */ argv, -- cgit v1.2.1