diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-05-08 16:26:39 -0700 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-05-08 16:26:39 -0700 |
commit | bb897860e0a72f3dd0fa5bef86832b725e448712 (patch) | |
tree | 8f0aa59ab0db501f7b966697dd2e8e559096d975 | |
parent | 4b554f022ed28f2b41457f6dbd00e7e0a4a7cdf3 (diff) | |
parent | f07f4e1737450f58de2548e2570c17dc5bd1070f (diff) | |
download | ayatana-indicator-datetime-bb897860e0a72f3dd0fa5bef86832b725e448712.tar.gz ayatana-indicator-datetime-bb897860e0a72f3dd0fa5bef86832b725e448712.tar.bz2 ayatana-indicator-datetime-bb897860e0a72f3dd0fa5bef86832b725e448712.zip |
raise the minimum gtk version to 3
-rw-r--r-- | configure.ac | 46 | ||||
-rw-r--r-- | src/datetime-service.c | 7 | ||||
-rw-r--r-- | src/indicator-datetime.c | 8 |
3 files changed, 10 insertions, 51 deletions
diff --git a/configure.ac b/configure.ac index 508fc9a..e4c1c26 100644 --- a/configure.ac +++ b/configure.ac @@ -43,16 +43,6 @@ AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) PKG_PROG_PKG_CONFIG ########################### -# GTK+ version option -########################### - -AC_ARG_WITH([gtk], - [AS_HELP_STRING([--with-gtk], - [Which version of gtk to use for the indicator @<:@default=3@:>@])], - [], - [with_gtk=3]) - -########################### # Dependencies ########################### @@ -71,22 +61,11 @@ GLIB_REQUIRED_VERSION=2.29.19 GTK3_REQUIRED_VERSION=3.1.4 GCONF_REQUIRED_VERSION=2.31 -AS_IF([test "x$with_gtk" = x3], - [PKG_CHECK_MODULES(INDICATOR, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION - glib-2.0 >= $GLIB_REQUIRED_VERSION - dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS) - ], - [test "x$with_gtk" = x2], - [PKG_CHECK_MODULES(INDICATOR, indicator-0.4 >= $INDICATOR_REQUIRED_VERSION - glib-2.0 >= $GLIB_REQUIRED_VERSION - dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION - libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS) - ], - [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])] -) +PKG_CHECK_MODULES(INDICATOR, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION + glib-2.0 >= $GLIB_REQUIRED_VERSION + dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION + libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS) PKG_CHECK_MODULES(SERVICE, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION @@ -123,7 +102,7 @@ if test x"$with_ccpanel" != x"no" ; then if test x${have_ccpanel} = xyes; then AC_DEFINE(HAVE_CCPANEL, 1, [Define to 1 to enable Control Center panel]) PKG_CHECK_MODULES(LIBMAP, gio-2.0 >= $GIO_REQUIRED_VERSION - gtk+-3.0 >= $GTK3_REQUIRED_VERSION) + gtk+-3.0 >= $GTK3_REQUIRED_VERSION) fi if test x${with_ccpanel} = xyes && test x${have_ccpanel} = xno; then AC_MSG_ERROR([Control Center panel configured but not found]) @@ -167,15 +146,10 @@ AS_IF([test "x$with_localinstall" = "xyes"], INDICATORDIR="${libdir}/indicators/2/" INDICATORICONSDIR="${datadir}/libindicate/icons/" ], - [AS_IF([test "x$with_gtk" = "x2"], - [ - INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4` - INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4` - ], - [ - INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4` - INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4` - ])]) + [ + INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4` + INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4` + ]) AC_SUBST(INDICATORDIR) AC_SUBST(INDICATORICONSDIR) diff --git a/src/datetime-service.c b/src/datetime-service.c index c2a4c27..d264900 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -952,17 +952,10 @@ update_appointment_menu_items (gpointer user_data) if (color_spec != NULL) { 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); -#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 77fdb40..9e34a65 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -1220,11 +1220,7 @@ 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(); @@ -1435,11 +1431,7 @@ 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(""); |