diff options
-rw-r--r-- | src/metadata-widget.c | 54 | ||||
-rw-r--r-- | src/player-item.vala | 6 |
2 files changed, 2 insertions, 58 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c index 29ac627..ac8355c 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -216,60 +216,6 @@ metadata_image_expose (GtkWidget *metadata, GdkEventExpose *event, gpointer user return TRUE; } - -/* -static void -draw_gradient (cairo_t* cr, - GtkAllocation alloc, - CairoColorRGB rgba_start, - CairoColorRGB rgba_end) -{ - cairo_pattern_t* pattern = NULL; - cairo_rectangle (cr, - alloc.x, alloc.y, - alloc.width, alloc.height); - - cairo_clip(cr); - - cairo_move_to (cr, alloc.x , alloc.y); - cairo_line_to(cr, alloc.x + alloc.width, - alloc.y); - cairo_line_to(cr, alloc.x + alloc.width, - alloc.y + alloc.height); - cairo_line_to(cr, alloc.x, alloc.y + alloc.height); - cairo_line_to(cr, alloc.x, alloc.y); - - cairo_close_path (cr); - - cairo_set_line_width (cr, 3.0); - CairoColorRGB darkened_top_color; - CairoColorRGB light_bottom_color; - - _color_shade (&rgba_start, 0.6, &darkened_top_color); - _color_shade (&rgba_end, 0.7, &light_bottom_color); - - pattern = cairo_pattern_create_linear (alloc.x, - alloc.y, - alloc.x, - alloc.y + alloc.height); - - cairo_pattern_add_color_stop_rgba (pattern, - 0.4f, - darkened_top_color.r, - darkened_top_color.g, - darkened_top_color.b, - 1.0f); - cairo_pattern_add_color_stop_rgba (pattern, - 1.0f, - light_bottom_color.r, - light_bottom_color.g, - light_bottom_color.b, - 1.0f); - cairo_set_source (cr, pattern); - cairo_stroke (cr); - cairo_pattern_destroy (pattern); -}*/ - static void draw_album_border(GtkWidget *metadata, gboolean selected) { diff --git a/src/player-item.vala b/src/player-item.vala index 68ae6ef..51471d1 100644 --- a/src/player-item.vala +++ b/src/player-item.vala @@ -87,9 +87,7 @@ public class PlayerItem : Dbusmenu.Menuitem this.property_set_bool(property, v.get_boolean()); } } - if(this.property_get_bool(MENUITEM_PROP_VISIBLE) == false){ - this.property_set_bool(MENUITEM_PROP_VISIBLE, true); - } + this.property_set_bool(MENUITEM_PROP_VISIBLE, populated(attributes)); } public bool populated(HashSet<string> attrs) @@ -97,8 +95,8 @@ public class PlayerItem : Dbusmenu.Menuitem foreach(string prop in attrs){ debug("populated ? - prop: %s", prop); int value_int = property_get_int(prop); - debug("populated ? - prop %s and value %i", prop, value_int); if(property_get_int(prop) != EMPTY){ + debug("populated - prop %s and value %i", prop, value_int); return true; } } |