[Xfce4-commits] <xfce4-panel:devel> Allow hiding the tasklist icon when lucency is set to 0.
Nick Schermer
noreply at xfce.org
Sat Nov 28 21:02:05 CET 2009
Updating branch refs/heads/devel
to fccbc7211a0ac4ca8384dfa431eb17cf768ec766 (commit)
from 0e68a038d765d86ef3c0949d2ef7cd6420b765dd (commit)
commit fccbc7211a0ac4ca8384dfa431eb17cf768ec766
Author: Nick Schermer <nick at xfce.org>
Date: Sat Nov 28 18:37:03 2009 +0100
Allow hiding the tasklist icon when lucency is set to 0.
docs/README.gtkrc-2.0 | 3 ++-
plugins/tasklist/tasklist-widget.c | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/docs/README.gtkrc-2.0 b/docs/README.gtkrc-2.0
index be89722..fcde77a 100644
--- a/docs/README.gtkrc-2.0
+++ b/docs/README.gtkrc-2.0
@@ -18,7 +18,8 @@ style "xfce-tasklist-style"
# Ellipsizing used in the task list button label.
XfceTasklist::ellipsize-mode = PANGO_ELLIPSIZE_END
- # Lucency of minimized icons. Valid values are between 0 and 100.
+ # Lucency of minimized icons. Valid values are between 0 (completely
+ # hide the icon) and 100 (don't lighten the icon).
XfceTasklist::minimized-icon-lucency = 50
}
class "XfceTasklist" style "xfce-tasklist-style"
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index 4543f64..a55b6d6 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -1248,6 +1248,10 @@ tasklist_button_icon_changed (WnckWindow *window,
GdkPixbuf *pixbuf;
GdkPixbuf *lucent;
+ /* leave when lucency is set to 0 */
+ if (child->tasklist->minimized_icon_lucency == 0)
+ return;
+
/* get the application icon */
if (child->tasklist->show_labels)
pixbuf = wnck_window_get_mini_icon (window);
@@ -1533,7 +1537,8 @@ xfce_tasklist_button_new (XfceTasklistChild *child)
gtk_box_pack_start (GTK_BOX (child->box), child->icon, FALSE, TRUE, 0);
else
gtk_box_pack_start (GTK_BOX (child->box), child->icon, TRUE, TRUE, 0);
- gtk_widget_show (child->icon);
+ if (child->tasklist->minimized_icon_lucency > 0)
+ gtk_widget_show (child->icon);
child->label = gtk_label_new (NULL);
gtk_box_pack_start (GTK_BOX (child->box), child->label, TRUE, TRUE, 0);
More information about the Xfce4-commits
mailing list