[Xfce4-commits] [panel-plugins/xfce4-datetime-plugin] 01/01: Correctly the panel's autohide modes (bug #11359)

noreply at xfce.org noreply at xfce.org
Sun Dec 7 01:12:26 CET 2014


This is an automated email from the git hooks/post-receive script.

andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-datetime-plugin.

commit 6f92135840663b464e4de38b2f6999224344fa79
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sun Dec 7 00:48:06 2014 +0100

    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;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list