From 17b9be589ed42a933751eef55de3e83a38626da8 Mon Sep 17 00:00:00 2001 From: "Marco Trevisan (TreviƱo)" Date: Tue, 8 Nov 2011 22:46:58 +0100 Subject: Export the name_hint Using the PACKAGE_NAME value --- src/indicator-datetime.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/indicator-datetime.c') diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 8e5f421..1b6b6af 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -161,6 +161,7 @@ static void indicator_datetime_finalize (GObject *object); static GtkLabel * get_label (IndicatorObject * io); static GtkMenu * get_menu (IndicatorObject * io); static const gchar * get_accessible_desc (IndicatorObject * io); +static const gchar * get_name_hint (IndicatorObject * io); static GVariant * bind_enum_set (const GValue * value, const GVariantType * type, gpointer user_data); static gboolean bind_enum_get (GValue * value, GVariant * variant, gpointer user_data); static gchar * generate_format_string_now (IndicatorDatetime * self); @@ -200,6 +201,7 @@ indicator_datetime_class_init (IndicatorDatetimeClass *klass) io_class->get_label = get_label; io_class->get_menu = get_menu; io_class->get_accessible_desc = get_accessible_desc; + io_class->get_name_hint = get_name_hint; g_object_class_install_property (object_class, PROP_SHOW_CLOCK, @@ -1548,3 +1550,9 @@ get_accessible_desc (IndicatorObject * io) } return NULL; } + +static const gchar * +get_name_hint (IndicatorObject * io) +{ + return PACKAGE_NAME; +} -- cgit v1.2.3 From 460b479a9b22cbc35bd333080d501c53bb58ccae Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 31 Jan 2012 21:27:24 -0600 Subject: Fixing include paths --- src/datetime-service.c | 2 +- src/indicator-datetime.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/indicator-datetime.c') diff --git a/src/datetime-service.c b/src/datetime-service.c index 73a3361..8358a80 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -31,7 +31,7 @@ with this program. If not, see . #include #include -#include +#include #include #include #include diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 8e5f421..f7fb130 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -41,9 +41,9 @@ with this program. If not, see . #include /* DBusMenu */ -#include +#include #include -#include +#include #include "utils.h" #include "dbus-shared.h" -- cgit v1.2.3 From 895a0a2c7fcaa05bf4ea3415276af26bde90b769 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 14 Feb 2012 18:15:59 -0600 Subject: Fix FTB when deprecation warnings are enabled --- libmap/cc-timezone-map.c | 14 ++++++++++---- src/datetime-service.c | 14 ++++++++++---- src/indicator-datetime.c | 8 ++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) (limited to 'src/indicator-datetime.c') diff --git a/libmap/cc-timezone-map.c b/libmap/cc-timezone-map.c index aeac9a0..ff6eee8 100644 --- a/libmap/cc-timezone-map.c +++ b/libmap/cc-timezone-map.c @@ -743,19 +743,25 @@ cc_timezone_map_draw (GtkWidget *widget, 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) + if (gtk_widget_get_sensitive (widget)) alpha = 0.5; /* paint background */ +#if GTK_CHECK_VERSION(3,0,0) + GdkRGBA rgba; + gtk_style_context_get_background_color (gtk_widget_get_style_context (widget), + gtk_widget_get_state_flags (widget), + &rgba); + gdk_cairo_set_source_rgba (cr, &rgba); +#else + GtkStyle * style = gtk_widget_get_style (widget); gdk_cairo_set_source_color (cr, &style->bg[gtk_widget_get_state (widget)]); +#endif cairo_paint (cr); gdk_cairo_set_source_pixbuf (cr, priv->background, 0, 0); cairo_paint_with_alpha (cr, alpha); diff --git a/src/datetime-service.c b/src/datetime-service.c index 8358a80..227022f 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -979,13 +979,19 @@ update_appointment_menu_items (gpointer user_data) // Draw the correct icon for the appointment type and then tint it using mask fill. // For now we'll create a circle if (color_spec != NULL) { - GdkColor color; - gdk_color_parse (color_spec, &color); g_debug("Creating a cairo surface: size, %d by %d", width, height); cairo_surface_t *surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, width, height ); - cairo_t *cr = cairo_create(surface); - gdk_cairo_set_source_color(cr, &color); + cairo_t *cr = cairo_create(surface); +#if GTK_CHECK_VERSION(3,0,0) + GdkRGBA rgba; + if (gdk_rgba_parse (&rgba, color_spec)) + gdk_cairo_set_source_rgba (cr, &rgba); +#else + GdkColor color; + if (gdk_color_parse (color_spec, &color)) + gdk_cairo_set_source_color (cr, &color); +#endif cairo_paint(cr); cairo_set_source_rgba(cr, 0,0,0,0.5); cairo_set_line_width(cr, 1); diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index f7fb130..38f178b 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1261,7 +1261,11 @@ new_appointment_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbu mi_data->gmi = gtk_menu_item_new(); +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); +#else GtkWidget * hbox = gtk_hbox_new(FALSE, 4); +#endif /* Icon, probably someone's face or avatar on an IM */ mi_data->icon = gtk_image_new(); @@ -1472,7 +1476,11 @@ new_timezone_item(DbusmenuMenuitem * newitem, gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mi_data->gmi), dbusmenu_menuitem_property_get_bool(newitem, TIMEZONE_MENUITEM_PROP_RADIO)); +#if GTK_CHECK_VERSION(3,0,0) + GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); +#else GtkWidget * hbox = gtk_hbox_new(FALSE, 4); +#endif /* Label, probably a username, chat room or mailbox name */ mi_data->label = gtk_label_new(""); -- cgit v1.2.3