diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/datetime-service.c | 23 | ||||
-rw-r--r-- | src/indicator-datetime.c | 12 |
2 files changed, 27 insertions, 8 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index ed8c8e3..227022f 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -31,7 +31,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <math.h> #include <gconf/gconf-client.h> -#include <libdbusmenu-gtk3/menuitem.h> +#include <libdbusmenu-gtk/menuitem.h> #include <libdbusmenu-glib/server.h> #include <libdbusmenu-glib/client.h> #include <libdbusmenu-glib/menuitem.h> @@ -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); @@ -1404,7 +1410,12 @@ geo_create_client (GeoclueMaster * master, GeoclueMasterClient * client, gchar * geo_master = client; - if (geo_master != NULL) { + if (error != NULL) { + g_warning("Unable to get a GeoClue client! '%s' Geolocation based timezone support will not be available.", error->message); + return; + } + + if (geo_master == NULL) { g_warning(_("Unable to get a GeoClue client! Geolocation based timezone support will not be available.")); return; } diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 1b6b6af..c847d47 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -41,9 +41,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include <libindicator/indicator-service-manager.h> /* DBusMenu */ -#include <libdbusmenu-gtk3/menu.h> +#include <libdbusmenu-gtk/menu.h> #include <libido/libido.h> -#include <libdbusmenu-gtk3/menuitem.h> +#include <libdbusmenu-gtk/menuitem.h> #include "utils.h" #include "dbus-shared.h" @@ -1263,7 +1263,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(); @@ -1474,7 +1478,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(""); |