[Xfce4-commits] [xfce/xfce4-power-manager] 09/09: Battery plugin: Allow markup in scalemenuitem description label

noreply at xfce.org noreply at xfce.org
Sun Jul 27 13:20:58 CEST 2014


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

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 580c893832d83c63b58a4bfb7c0645993bc231a3
Author: Harald Judt <h.judt at gmx.at>
Date:   Sat Jul 26 22:59:32 2014 +0200

    Battery plugin: Allow markup in scalemenuitem description label
---
 panel-plugins/battery/battery-button.c |    2 +-
 panel-plugins/battery/scalemenuitem.c  |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/panel-plugins/battery/battery-button.c b/panel-plugins/battery/battery-button.c
index af02b3b..65f5e94 100644
--- a/panel-plugins/battery/battery-button.c
+++ b/panel-plugins/battery/battery-button.c
@@ -922,7 +922,7 @@ battery_button_show_menu (BatteryButton *button)
             gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(mi), img);
         }
 
-        scale_menu_item_set_description_label (SCALE_MENU_ITEM(mi), _("Display brightness"));
+        scale_menu_item_set_description_label (SCALE_MENU_ITEM(mi), _("<b>Display brightness</b>"));
 
         /* range slider */
         button->priv->range = scale_menu_item_get_scale (SCALE_MENU_ITEM (mi));
diff --git a/panel-plugins/battery/scalemenuitem.c b/panel-plugins/battery/scalemenuitem.c
index 9c6bebc..0ae37af 100644
--- a/panel-plugins/battery/scalemenuitem.c
+++ b/panel-plugins/battery/scalemenuitem.c
@@ -501,12 +501,14 @@ scale_menu_item_set_description_label (ScaleMenuItem *menuitem,
 
   if (priv->description_label && label)
     {
-      gtk_label_set_text (GTK_LABEL (priv->description_label), label);
+      gtk_label_set_markup (GTK_LABEL (priv->description_label), label);
     }
   else if(label)
     {
       /* create label */
-      priv->description_label = gtk_label_new (label);
+      priv->description_label = gtk_label_new (NULL);
+      gtk_label_set_markup (GTK_LABEL (priv->description_label), label);
+
       /* align left */
       gtk_misc_set_alignment (GTK_MISC(priv->description_label), 0, 0);
     }

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


More information about the Xfce4-commits mailing list