[Xfce4-commits] <xfce4-panel:master> Showdesktop: Set the small property.

Nick Schermer noreply at xfce.org
Sat Dec 24 13:10:11 CET 2011


Updating branch refs/heads/master
         to 0bbdda534d4f3343788dbb583bea87b75929a730 (commit)
       from d542b93d0504c869460d85f186175f1d730c5be1 (commit)

commit 0bbdda534d4f3343788dbb583bea87b75929a730
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Sun Dec 11 16:49:53 2011 +0100

    Showdesktop: Set the small property.

 plugins/showdesktop/showdesktop.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/plugins/showdesktop/showdesktop.c b/plugins/showdesktop/showdesktop.c
index b7d7388..656c422 100644
--- a/plugins/showdesktop/showdesktop.c
+++ b/plugins/showdesktop/showdesktop.c
@@ -31,6 +31,7 @@
 
 static void     show_desktop_plugin_screen_changed          (GtkWidget              *widget,
                                                              GdkScreen              *previous_screen);
+static void     show_desktop_plugin_construct               (XfcePanelPlugin        *panel_plugin);
 static void     show_desktop_plugin_free_data               (XfcePanelPlugin        *panel_plugin);
 static gboolean show_desktop_plugin_size_changed            (XfcePanelPlugin        *panel_plugin,
                                                              gint                    size);
@@ -73,6 +74,7 @@ show_desktop_plugin_class_init (ShowDesktopPluginClass *klass)
   XfcePanelPluginClass *plugin_class;
 
   plugin_class = XFCE_PANEL_PLUGIN_CLASS (klass);
+  plugin_class->construct = show_desktop_plugin_construct;
   plugin_class->free_data = show_desktop_plugin_free_data;
   plugin_class->size_changed = show_desktop_plugin_size_changed;
 }
@@ -110,6 +112,14 @@ show_desktop_plugin_init (ShowDesktopPlugin *plugin)
 
 
 static void
+show_desktop_plugin_construct (XfcePanelPlugin *panel_plugin)
+{
+  xfce_panel_plugin_set_small (panel_plugin, TRUE);
+}
+
+
+
+static void
 show_desktop_plugin_screen_changed (GtkWidget *widget,
                                     GdkScreen *previous_screen)
 {
@@ -172,6 +182,7 @@ show_desktop_plugin_size_changed (XfcePanelPlugin *panel_plugin,
   panel_return_val_if_fail (XFCE_IS_SHOW_DESKTOP_PLUGIN (panel_plugin), FALSE);
 
   /* keep the button squared */
+  size /= xfce_panel_plugin_get_nrows (panel_plugin);
   gtk_widget_set_size_request (GTK_WIDGET (panel_plugin), size, size);
 
   return TRUE;


More information about the Xfce4-commits mailing list