[Galago-commits] r2541 - in trunk/notification-daemon: .
themes/standard
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Sat Feb 4 12:39:23 PST 2006
Author: chipx86
Date: 2006-02-04 12:39:21 -0800 (Sat, 04 Feb 2006)
New Revision: 2541
Modified:
trunk/notification-daemon/ChangeLog
trunk/notification-daemon/themes/standard/theme.c
Log:
Use the theme colors to draw the low and normal urgency stripes. Low is the style's nomral BG state. Normal is the selected state. Critical is custom. We hard-code it red. Eventually, I'd like all this to change when the themeable gtk colors are supported.
Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog 2006-02-04 20:30:52 UTC (rev 2540)
+++ trunk/notification-daemon/ChangeLog 2006-02-04 20:39:21 UTC (rev 2541)
@@ -1,3 +1,11 @@
+Sat Feb 04 12:38:22 PST 2006 Christian Hammond <chipx86 at chipx86.com>
+
+ * themes/standard/theme.c:
+ - Use the theme colors to draw the low and normal urgency stripes.
+ Low is the style's nomral BG state. Normal is the selected state.
+ Critical is custom. We hard-code it red. Eventually, I'd like all
+ this to change when the themeable gtk colors are supported.
+
Sat Feb 04 12:28:24 PST 2006 Christian Hammond <chipx86 at chipx86.com>
* themes/standard/theme.c:
Modified: trunk/notification-daemon/themes/standard/theme.c
===================================================================
--- trunk/notification-daemon/themes/standard/theme.c 2006-02-04 20:30:52 UTC (rev 2540)
+++ trunk/notification-daemon/themes/standard/theme.c 2006-02-04 20:39:21 UTC (rev 2541)
@@ -78,37 +78,39 @@
static void
draw_stripe(GtkWidget *win, WindowData *windata)
{
-#if USE_THEMED_STRIPE
GtkStyle *style = gtk_widget_get_style(win);
- GdkGC *gc = style->bg_gc[GTK_STATE_NORMAL];
-#else
- GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(win->window));
+ gboolean custom_gc = FALSE;
GdkColor color;
+ GdkGC *gc;
switch (windata->urgency)
{
case URGENCY_LOW: // LOW
- gdk_color_parse("#9DB029", &color);
+ gc = style->bg_gc[GTK_STATE_NORMAL];
break;
case URGENCY_CRITICAL: // CRITICAL
+ custom_gc = TRUE;
+ gc = gdk_gc_new(GDK_DRAWABLE(win->window));
gdk_color_parse("#CC0000", &color);
+ gdk_gc_set_rgb_fg_color(gc, &color);
break;
case URGENCY_NORMAL: // NORMAL
default:
- gdk_color_parse("#729FCF", &color);
+ gc = style->bg_gc[GTK_STATE_SELECTED];
break;
}
- gdk_gc_set_rgb_fg_color(gc, &color);
-#endif
gdk_draw_rectangle(win->window, gc, TRUE,
windata->main_hbox->allocation.x + 1,
windata->main_hbox->allocation.y + 1,
STRIPE_WIDTH,
windata->main_hbox->allocation.height - 2);
+
+ if (custom_gc)
+ g_object_unref(G_OBJECT(gc));
}
static gboolean
More information about the galago-commits
mailing list