[gnome-settings-daemon] media-keys: Remove home-made eject symbol drawing



commit 8d4b52ba3e1815549033527d9892d4dd885b101c
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Jan 12 20:40:02 2013 +0100

    media-keys: Remove home-made eject symbol drawing
    
    We really want to use the symbolic icons here.

 plugins/media-keys/gsd-osd-window.c |   35 +----------------------------------
 1 files changed, 1 insertions(+), 34 deletions(-)
---
diff --git a/plugins/media-keys/gsd-osd-window.c b/plugins/media-keys/gsd-osd-window.c
index c87d01a..247240f 100644
--- a/plugins/media-keys/gsd-osd-window.c
+++ b/plugins/media-keys/gsd-osd-window.c
@@ -336,34 +336,6 @@ load_pixbuf (GsdOsdDrawContext *ctx,
 }
 
 static void
-draw_eject (cairo_t *cr,
-            GdkRectangle *icon_box)
-{
-        int box_height;
-        int tri_height;
-        int separation;
-
-        box_height = icon_box->height * 0.2;
-        separation = box_height / 3;
-        tri_height = icon_box->height - box_height - separation;
-
-        cairo_rectangle (cr, icon_box->x, icon_box->y + icon_box->height - box_height,
-                         icon_box->width, box_height);
-
-        cairo_move_to (cr, icon_box->x, icon_box->y + tri_height);
-        cairo_rel_line_to (cr, icon_box->width, 0);
-        cairo_rel_line_to (cr, -icon_box->width / 2, -tri_height);
-        cairo_rel_line_to (cr, -icon_box->width / 2, tri_height);
-        cairo_close_path (cr);
-        cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, FG_ALPHA);
-        cairo_fill_preserve (cr);
-
-        cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, FG_ALPHA / 2);
-        cairo_set_line_width (cr, 2);
-        cairo_stroke (cr);
-}
-
-static void
 draw_waves (cairo_t *cr,
             double   cx,
             double   cy,
@@ -714,7 +686,6 @@ static void
 draw_action_custom (GsdOsdDrawContext  *ctx,
                     cairo_t            *cr)
 {
-        gboolean res;
         GdkRectangle icon_box, bright_box;
 
         get_bounding_boxes (ctx, &icon_box, NULL, &bright_box);
@@ -732,11 +703,7 @@ draw_action_custom (GsdOsdDrawContext  *ctx,
                    bright_box.y);
 #endif
 
-        res = render_custom (ctx, cr, &icon_box);
-        if (!res && g_str_has_prefix (ctx->icon_name, "media-eject")) {
-                /* draw eject symbol */
-                draw_eject (cr, &icon_box);
-        }
+        render_custom (ctx, cr, &icon_box);
 
         if (ctx->show_level != FALSE) {
                 /* draw volume meter */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]