[Xfce4-commits] r30405 - xfce4-session/trunk/panel-plugin

Brian Tarricone kelnos at xfce.org
Mon Jul 27 08:36:50 CEST 2009


Author: kelnos
Date: 2009-07-27 06:36:50 +0000 (Mon, 27 Jul 2009)
New Revision: 30405

Modified:
   xfce4-session/trunk/panel-plugin/xfsm-logout-plugin.c
Log:
returning TRUE for size-changed has the same effect

Modified: xfce4-session/trunk/panel-plugin/xfsm-logout-plugin.c
===================================================================
--- xfce4-session/trunk/panel-plugin/xfsm-logout-plugin.c	2009-07-27 05:58:56 UTC (rev 30404)
+++ xfce4-session/trunk/panel-plugin/xfsm-logout-plugin.c	2009-07-27 06:36:50 UTC (rev 30405)
@@ -340,19 +340,6 @@
 }
 
 static void
-xfsm_logout_plugin_size_changed(XfcePanelPlugin *plugin,
-                                gint size,
-                                gpointer user_data)
-{
-    GtkWidget *menubar = user_data;
-
-    if(xfce_panel_plugin_get_orientation(plugin) == GTK_ORIENTATION_HORIZONTAL)
-        gtk_widget_set_size_request(menubar, -1, size);
-    else
-        gtk_widget_set_size_request(menubar, size, -1);
-}
-
-static void
 xfsm_logout_plugin_free_data(XfcePanelPlugin *plugin,
                              gpointer user_data)
 {
@@ -423,10 +410,9 @@
     submenu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(mi));
     xfce_panel_plugin_register_menu(plugin, GTK_MENU(submenu));
 
-    /* annoyingly, handling size-changed is required even if we don't
-     * do anything special.  otherwise we get truncated. */
-    g_signal_connect(plugin, "size-changed",
-                     G_CALLBACK(xfsm_logout_plugin_size_changed), menubar);
+    /* returning TRUE from size-changed disables the panel's size
+     * handling code for the plugin */
+    g_signal_connect(plugin, "size-changed", G_CALLBACK(gtk_true), NULL);
     g_signal_connect(plugin, "free-data",
                      G_CALLBACK(xfsm_logout_plugin_free_data), logout_plugin);
 




More information about the Xfce4-commits mailing list