aboutsummaryrefslogtreecommitdiff
path: root/libmap
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-29 20:52:37 -0500
committerTed Gould <ted@gould.cx>2011-03-29 20:52:37 -0500
commitc5309d7ec6d6de6683569d88bd17a418a11dbfdf (patch)
treed34e3eab25f3e03bf681e7775d6316abe5a13e86 /libmap
parent7aa23563b3667b313f9f19e3bbace6e794703526 (diff)
parentd455a0cfb2d3f1fd9e244c5db636ad766dcc287d (diff)
downloadayatana-indicator-datetime-c5309d7ec6d6de6683569d88bd17a418a11dbfdf.tar.gz
ayatana-indicator-datetime-c5309d7ec6d6de6683569d88bd17a418a11dbfdf.tar.bz2
ayatana-indicator-datetime-c5309d7ec6d6de6683569d88bd17a418a11dbfdf.zip
* Upstream Merge
* indicator-datetime-preferences crashed with SIGSEGV in g_utf8_normalize() (LP: #727089) * Uninstalling Evolution removes calendar from clock applet (LP: #691953) * clock doesn't update on timezone change (LP: #735445) * Cannot change main location (LP: #729029) * indicator-datetime-preferences crashed with SIGSEGV in g_simple_async_result_complete() (LP: #734951) * Time zone map looks identical when sensitive vs. insensitive (LP: #740846) * "Locations" window behaves like a modal dialog (LP: #740924) * Added location for clock menu isn't used or remembered (LP: #740930) * Time not displayed for added location in "Locations" window (LP: #740931) * "UTC" location can be removed but not re-added (LP: #740938) * "Locations" window bottom bar is missing a border (LP: #740941) * Add and Remove buttons in "Locations" window have unnecessary tooltips (LP: #740944) * No separator between "Add Event" and locations (LP: #740971) * indicator-datetime-preferences crashed with SIGSEGV in g_atomic_int_exchange_and_add() (LP: #740978) * inicator-datetime dosen't show corretly the time when changing from 24 hours format to 12 hours (LP: #743394)
Diffstat (limited to 'libmap')
-rw-r--r--libmap/cc-timezone-map.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/libmap/cc-timezone-map.c b/libmap/cc-timezone-map.c
index ec12c84..7b7d704 100644
--- a/libmap/cc-timezone-map.c
+++ b/libmap/cc-timezone-map.c
@@ -766,13 +766,23 @@ cc_timezone_map_draw (GtkWidget *widget,
gchar *file;
GError *err = NULL;
gdouble pointx, pointy;
+ gdouble alpha = 1.0;
+ GtkStyle *style;
char buf[16];
gtk_widget_get_allocation (widget, &alloc);
+ style = gtk_widget_get_style (widget);
+
+ /* Check if insensitive */
+ if (gtk_widget_get_state (widget) == GTK_STATE_INSENSITIVE)
+ alpha = 0.5;
+
/* paint background */
- gdk_cairo_set_source_pixbuf (cr, priv->background, 0, 0);
+ gdk_cairo_set_source_color (cr, &style->bg[gtk_widget_get_state (widget)]);
cairo_paint (cr);
+ gdk_cairo_set_source_pixbuf (cr, priv->background, 0, 0);
+ cairo_paint_with_alpha (cr, alpha);
/* paint watermark */
if (priv->watermark) {
@@ -813,7 +823,7 @@ cc_timezone_map_draw (GtkWidget *widget,
alloc.height, GDK_INTERP_BILINEAR);
gdk_cairo_set_source_pixbuf (cr, hilight, 0, 0);
- cairo_paint (cr);
+ cairo_paint_with_alpha (cr, alpha);
g_object_unref (hilight);
g_object_unref (orig_hilight);
}
@@ -836,7 +846,7 @@ cc_timezone_map_draw (GtkWidget *widget,
if (pin)
{
gdk_cairo_set_source_pixbuf (cr, pin, pointx - 8, pointy - 14);
- cairo_paint (cr);
+ cairo_paint_with_alpha (cr, alpha);
g_object_unref (pin);
}