From 4a7c7f5d2242ae8d2d977ed8fe19854831689fc7 Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Sun, 7 Dec 2014 00:48:06 +0100 Subject: [PATCH] Correctly the panel's autohide modes (bug #11359) Instead of blocking the panel's autohiding when showing the properties-dialog (which most other panel plugins don't do) it should block the autohiding when the calendar is shown. --- panel-plugin/datetime-dialog.c | 3 --- panel-plugin/datetime.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/panel-plugin/datetime-dialog.c b/panel-plugin/datetime-dialog.c index ede858f..f9c4277 100644 --- a/panel-plugin/datetime-dialog.c +++ b/panel-plugin/datetime-dialog.c @@ -317,7 +317,6 @@ datetime_dialog_response(GtkWidget *dlg, int response, t_datetime *dt) g_object_set_data(G_OBJECT(dt->plugin), "dialog", NULL); gtk_widget_destroy(dlg); - xfce_panel_plugin_unblock_menu(dt->plugin); datetime_write_rc_file(dt->plugin, dt); } } @@ -347,8 +346,6 @@ datetime_properties_dialog(XfcePanelPlugin *plugin, t_datetime * datetime) xfce_textdomain (GETTEXT_PACKAGE, LOCALEDIR, "UTF-8"); - xfce_panel_plugin_block_menu(plugin); - dlg = xfce_titled_dialog_new_with_buttons(_("Datetime"), NULL, /* or: GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(plugin))), */ GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, diff --git a/panel-plugin/datetime.c b/panel-plugin/datetime.c index 8cbb2b6..02253d0 100644 --- a/panel-plugin/datetime.c +++ b/panel-plugin/datetime.c @@ -259,6 +259,7 @@ static gboolean close_calendar_window(t_datetime *datetime) gtk_widget_destroy(datetime->cal); datetime->cal = NULL; + xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (datetime->plugin), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(datetime->button), FALSE); return TRUE; @@ -311,6 +312,7 @@ static GtkWidget * pop_calendar_window(t_datetime *datetime, int orientation) datetime); gtk_widget_show_all(window); + xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (datetime->plugin), TRUE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(datetime->button), TRUE); return window; -- 1.9.1