Merge lp:~charlesk/indicator-datetime/nogtk2 into lp:indicator-datetime/12.10

Proposed by Charles Kerr
Status: Merged
Approved by: Lars Karlitski
Approved revision: 177
Merged at revision: 176
Proposed branch: lp:~charlesk/indicator-datetime/nogtk2
Merge into: lp:indicator-datetime/12.10
Diff against target: 127 lines (+10/-51)
3 files modified
configure.ac (+10/-36)
src/datetime-service.c (+0/-7)
src/indicator-datetime.c (+0/-8)
To merge this branch: bzr merge lp:~charlesk/indicator-datetime/nogtk2
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Review via email: mp+105005@code.launchpad.net
To post a comment you must log in.
177. By Charles Kerr on 2012-05-08

remove AC_ARG_WITH

Revision history for this message
Lars Karlitski (larsu) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2012-04-04 21:06:51 +0000
3+++ configure.ac 2012-05-08 23:03:19 +0000
4@@ -43,16 +43,6 @@
5 PKG_PROG_PKG_CONFIG
6
7 ###########################
8-# GTK+ version option
9-###########################
10-
11-AC_ARG_WITH([gtk],
12- [AS_HELP_STRING([--with-gtk],
13- [Which version of gtk to use for the indicator @<:@default=3@:>@])],
14- [],
15- [with_gtk=3])
16-
17-###########################
18 # Dependencies
19 ###########################
20
21@@ -71,22 +61,11 @@
22 GTK3_REQUIRED_VERSION=3.1.4
23 GCONF_REQUIRED_VERSION=2.31
24
25-AS_IF([test "x$with_gtk" = x3],
26- [PKG_CHECK_MODULES(INDICATOR, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
27- glib-2.0 >= $GLIB_REQUIRED_VERSION
28- dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
29- dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
30- libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS)
31- ],
32- [test "x$with_gtk" = x2],
33- [PKG_CHECK_MODULES(INDICATOR, indicator-0.4 >= $INDICATOR_REQUIRED_VERSION
34- glib-2.0 >= $GLIB_REQUIRED_VERSION
35- dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
36- dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
37- libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS)
38- ],
39- [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
40-)
41+PKG_CHECK_MODULES(INDICATOR, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
42+ glib-2.0 >= $GLIB_REQUIRED_VERSION
43+ dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
44+ dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
45+ libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS)
46
47 PKG_CHECK_MODULES(SERVICE, indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
48 glib-2.0 >= $GLIB_REQUIRED_VERSION
49@@ -123,7 +102,7 @@
50 if test x${have_ccpanel} = xyes; then
51 AC_DEFINE(HAVE_CCPANEL, 1, [Define to 1 to enable Control Center panel])
52 PKG_CHECK_MODULES(LIBMAP, gio-2.0 >= $GIO_REQUIRED_VERSION
53- gtk+-3.0 >= $GTK3_REQUIRED_VERSION)
54+ gtk+-3.0 >= $GTK3_REQUIRED_VERSION)
55 fi
56 if test x${with_ccpanel} = xyes && test x${have_ccpanel} = xno; then
57 AC_MSG_ERROR([Control Center panel configured but not found])
58@@ -167,15 +146,10 @@
59 INDICATORDIR="${libdir}/indicators/2/"
60 INDICATORICONSDIR="${datadir}/libindicate/icons/"
61 ],
62- [AS_IF([test "x$with_gtk" = "x2"],
63- [
64- INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4`
65- INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4`
66- ],
67- [
68- INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4`
69- INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4`
70- ])])
71+ [
72+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4`
73+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4`
74+ ])
75
76 AC_SUBST(INDICATORDIR)
77 AC_SUBST(INDICATORICONSDIR)
78
79=== modified file 'src/datetime-service.c'
80--- src/datetime-service.c 2012-04-23 00:30:07 +0000
81+++ src/datetime-service.c 2012-05-08 23:03:19 +0000
82@@ -952,17 +952,10 @@
83 if (color_spec != NULL) {
84 g_debug("Creating a cairo surface: size, %d by %d", width, height);
85 cairo_surface_t *surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, width, height );
86-
87 cairo_t *cr = cairo_create(surface);
88-#if GTK_CHECK_VERSION(3,0,0)
89 GdkRGBA rgba;
90 if (gdk_rgba_parse (&rgba, color_spec))
91 gdk_cairo_set_source_rgba (cr, &rgba);
92-#else
93- GdkColor color;
94- if (gdk_color_parse (color_spec, &color))
95- gdk_cairo_set_source_color (cr, &color);
96-#endif
97 cairo_paint(cr);
98 cairo_set_source_rgba(cr, 0,0,0,0.5);
99 cairo_set_line_width(cr, 1);
100
101=== modified file 'src/indicator-datetime.c'
102--- src/indicator-datetime.c 2012-03-07 20:49:58 +0000
103+++ src/indicator-datetime.c 2012-05-08 23:03:19 +0000
104@@ -1220,11 +1220,7 @@
105
106 mi_data->gmi = gtk_menu_item_new();
107
108-#if GTK_CHECK_VERSION(3,0,0)
109 GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
110-#else
111- GtkWidget * hbox = gtk_hbox_new(FALSE, 4);
112-#endif
113
114 /* Icon, probably someone's face or avatar on an IM */
115 mi_data->icon = gtk_image_new();
116@@ -1435,11 +1431,7 @@
117 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mi_data->gmi),
118 dbusmenu_menuitem_property_get_bool(newitem, TIMEZONE_MENUITEM_PROP_RADIO));
119
120-#if GTK_CHECK_VERSION(3,0,0)
121 GtkWidget * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
122-#else
123- GtkWidget * hbox = gtk_hbox_new(FALSE, 4);
124-#endif
125
126 /* Label, probably a username, chat room or mailbox name */
127 mi_data->label = gtk_label_new("");

Subscribers

People subscribed via source and target branches