[Xfce4-commits] <xfce4-panel:master> Launcher: small=FALSE in deskbar mode with label visible.

Nick Schermer noreply at xfce.org
Fri Feb 24 16:38:01 CET 2012


Updating branch refs/heads/master
         to 6df7c6339ee5aba39a075dc8cf0a1ef21f689a87 (commit)
       from cfd0a3ba28a537746e6aa683d98d8b4062811f77 (commit)

commit 6df7c6339ee5aba39a075dc8cf0a1ef21f689a87
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Mon Feb 6 11:57:04 2012 +0900

    Launcher: small=FALSE in deskbar mode with label visible.
    
    Regression fix. This error has been triggered by commit:
    f362692 panel-itembar: Removed item size checks.
    
    This commit should be harmless. It can be used without commit f362692
    and may speed up itembar layout a bit.

 plugins/launcher/launcher.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index d68d21a..f159d37 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1709,10 +1709,18 @@ launcher_plugin_button_update (LauncherPlugin *plugin)
   if (G_LIKELY (plugin->items != NULL))
     item = GARCON_MENU_ITEM (plugin->items->data);
 
+  mode = xfce_panel_plugin_get_mode (XFCE_PANEL_PLUGIN (plugin));
+
+  /* disable the "small" property in the deskbar mode and the label visible */
+  if (G_UNLIKELY (plugin->show_label && mode == XFCE_PANEL_PLUGIN_MODE_DESKBAR))
+    xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (plugin), FALSE);
+  else
+    xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (plugin), TRUE);
+
   if (G_UNLIKELY (plugin->show_label))
     {
       panel_return_if_fail (GTK_IS_LABEL (plugin->child));
-      mode = xfce_panel_plugin_get_mode (XFCE_PANEL_PLUGIN (plugin));
+
       gtk_label_set_angle (GTK_LABEL (plugin->child),
                            (mode == XFCE_PANEL_PLUGIN_MODE_VERTICAL) ? 270 : 0);
       gtk_label_set_text (GTK_LABEL (plugin->child),


More information about the Xfce4-commits mailing list