Merge lp:~ken-vandine/indicator-me/gtk3 into lp:indicator-me

Proposed by Ken VanDine
Status: Merged
Approved by: Ted Gould
Approved revision: 150
Merged at revision: 150
Proposed branch: lp:~ken-vandine/indicator-me/gtk3
Merge into: lp:indicator-me
Diff against target: 134 lines (+43/-13)
3 files modified
configure.ac (+35/-10)
src/about-me-menu-item.h (+1/-1)
src/indicator-me.c (+7/-2)
To merge this branch: bzr merge lp:~ken-vandine/indicator-me/gtk3
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+65543@code.launchpad.net

Description of the change

GTK3 port

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
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 2011-06-22 17:36:14 +0000
3+++ configure.ac 2011-06-22 18:32:53 +0000
4@@ -6,7 +6,7 @@
5 AC_PREREQ(2.53)
6
7 AM_CONFIG_HEADER(config.h)
8-AM_INIT_AUTOMAKE(indicator-me, 0.3.0)
9+AM_INIT_AUTOMAKE(indicator-me, 0.2.90)
10
11 AM_MAINTAINER_MODE
12
13@@ -30,6 +30,7 @@
14 ###########################
15
16 GTK_REQUIRED_VERSION=2.12
17+GTK3_REQUIRED_VERSION=3.0
18 INDICATOR_REQUIRED_VERSION=0.3.0
19 GWIBBER_REQUIRED_VERSION=0.0.7
20 DBUSMENUGLIB_REQUIRED_VERSION=0.3.95
21@@ -39,18 +40,38 @@
22 INDICATOR_DISPLAY_OBJECTS=0.1
23 GIO_UNIX_REQUIRED_VERSION=2.22
24
25-PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
26- indicator >= $INDICATOR_REQUIRED_VERSION
27- libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
28- dbus-glib-1
29- dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
30- dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
31 PKG_CHECK_MODULES(MESERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
32 glib-2.0 >= $GLIB_REQUIRED_VERSION
33- indicator >= $INDICATOR_REQUIRED_VERSION
34+ dbus-glib-1
35+ indicator3 >= $INDICATOR_REQUIRED_VERSION
36 gwibber-0.1 >= $GWIBBER_REQUIRED_VERSION
37 gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
38 telepathy-glib >= $TELEPATHYGLIB_REQUIRED_VERSION)
39+AC_SUBST(MESERVICE_CFLAGS)
40+AC_SUBST(MESERVICE_LIBS)
41+
42+AC_ARG_WITH([gtk],
43+ [AS_HELP_STRING([--with-gtk],
44+ [Which version of gtk to use for the indicator @<:@default=3@:>@])],
45+ [],
46+ [with_gtk=3])
47+
48+AS_IF([test "x$with_gtk" = x3],
49+ [PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
50+ indicator3 >= $INDICATOR_REQUIRED_VERSION
51+ libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS
52+ dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
53+ ],
54+ [test "x$with_gtk" = x2],
55+ [PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
56+ indicator >= $INDICATOR_REQUIRED_VERSION
57+ libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
58+ dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
59+ ],
60+ [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
61+)
62+AC_SUBST(APPLET_CFLAGS)
63+AC_SUBST(APPLET_LIBS)
64
65 ###########################
66 # Check to see if we're local
67@@ -66,9 +87,12 @@
68 if test "x$with_localinstall" = "xyes"; then
69 INDICATORDIR="${libdir}/indicators/3/"
70 INDICATORICONSDIR="${datadir}/indicator-applet/icons/"
71+elif test "x$with_gtk" = x2; then
72+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
73+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
74 else
75- INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
76- INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
77+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3`
78+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3`
79 fi
80 AC_SUBST(INDICATORDIR)
81 AC_SUBST(INDICATORICONSDIR)
82@@ -144,4 +168,5 @@
83 Me Indicator Configuration:
84
85 Prefix: $prefix
86+ GTK: $with_gtk
87 ])
88
89=== modified file 'src/about-me-menu-item.h'
90--- src/about-me-menu-item.h 2010-03-11 12:20:48 +0000
91+++ src/about-me-menu-item.h 2011-06-22 18:32:53 +0000
92@@ -28,7 +28,7 @@
93 #ifndef __ABOUT_ME_MENU_ITEM_H__
94 #define __ABOUT_ME_MENU_ITEM_H__
95
96-#include <gtk/gtkmenuitem.h>
97+#include <gtk/gtk.h>
98
99 G_BEGIN_DECLS
100
101
102=== modified file 'src/indicator-me.c'
103--- src/indicator-me.c 2011-04-14 14:56:04 +0000
104+++ src/indicator-me.c 2011-06-22 18:32:53 +0000
105@@ -28,7 +28,12 @@
106 #include <gtk/gtk.h>
107 #include <gio/gio.h>
108 #include <libdbusmenu-glib/menuitem.h>
109+
110+#if GTK_CHECK_VERSION(3, 0, 0)
111+#include <libdbusmenu-gtk3/menu.h>
112+#else
113 #include <libdbusmenu-gtk/menu.h>
114+#endif
115
116 #include <libindicator/indicator.h>
117 #include <libindicator/indicator-object.h>
118@@ -335,7 +340,7 @@
119 }
120
121 static void
122-item_destroyed_cb (GtkObject *item,
123+item_destroyed_cb (DbusmenuMenuitem *item,
124 gpointer user_data)
125 {
126 g_signal_handlers_disconnect_by_func (user_data,
127@@ -479,7 +484,7 @@
128 DBUSMENU_ENTRY_MENUITEM_PROP_HINT);
129
130 /* enforce style when typing a message */
131- if (GTK_WIDGET_HAS_FOCUS (entry)) {
132+ if (gtk_widget_has_focus (GTK_WIDGET (entry))) {
133 entry_set_style (entry, GTK_STATE_NORMAL);
134 entry_hint_set_shown (GTK_WIDGET (entry), FALSE);
135

Subscribers

People subscribed via source and target branches