ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03664
[Merge] lp:~3v1n0/indicator-session/compile-with-gtk2 into lp:indicator-session
Treviño (Marco Trevisan) has proposed merging lp:~3v1n0/indicator-session/compile-with-gtk2 into lp:indicator-session.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
For more details, see:
https://code.launchpad.net/~3v1n0/indicator-session/compile-with-gtk2/+merge/67414
Get the compilation with gtk2 back also in trunk (I think it's a good thing to keep the retro-compatibility until we easily can).
I've changed the compilation needed to --with-gtk=2 as all other indicator and unity libraries do.
--
https://code.launchpad.net/~3v1n0/indicator-session/compile-with-gtk2/+merge/67414
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'configure.ac'
--- configure.ac 2011-07-07 16:23:40 +0000
+++ configure.ac 2011-07-09 03:45:54 +0000
@@ -31,18 +31,18 @@
DBUSMENUGTK_REQUIRED_VERSION=0.3.91
POLKIT_REQUIRED_VERSION=0.92
-AC_ARG_WITH([indicator-gtk],
- [AS_HELP_STRING([--with-indicator-gtk],
+AC_ARG_WITH([gtk],
+ [AS_HELP_STRING([--with-gtk],
[Which version of gtk to use for the indicator @<:@default=3@:>@])],
[],
- [with_indicator_gtk=3])
+ [with_gtk=3])
-AS_IF([test "x$with_indicator_gtk" = x3],
+AS_IF([test "x$with_gtk" = x3],
[PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
],
- [test "x$with_indicator_gtk" = x2],
+ [test "x$with_gtk" = x2],
[PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
indicator-0.4 >= $INDICATOR_REQUIRED_VERSION
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
@@ -54,17 +54,34 @@
DBUSMENUGLIB_REQUIRED_VERSION=0.1.1
-PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
- dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
- dbus-glib-1
- gio-unix-2.0
- indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION)
+AS_IF([test "x$with_gtk" = x3],
+ [PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
+ dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
+ dbus-glib-1
+ gio-unix-2.0
+ indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION)
+ ],
+ [test "x$with_gtk" = x2],
+ [PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
+ dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
+ dbus-glib-1
+ gio-unix-2.0
+ indicator-0.4 >= $INDICATOR_REQUIRED_VERSION)
+ ]
+)
AC_SUBST(SESSIONERVICE_CFLAGS)
AC_SUBST(SESSIONERVICE_LIBS)
-PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
+AS_IF([test "x$with_gtk" = x3],
+ [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
+ ],
+ [test "x$with_gtk" = x2],
+ [PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
+ ]
+)
AC_SUBST(GTKLOGOUTHELPER_CFLAGS)
@@ -94,7 +111,7 @@
if test "x$with_localinstall" = "xyes"; then
INDICATORDIR="${libdir}/indicators/2/"
INDICATORICONSDIR="${datadir}/indicator-applet/icons/"
-elif test "x$with_indicator_gtk" = x2; then
+elif test "x$with_gtk" = x2; then
INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4`
INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4`
else
@@ -179,5 +196,5 @@
SUS Indicator Configuration:
Prefix: $prefix
- Indicator GTK: $with_indicator_gtk
+ Indicator GTK: $with_gtk
])
=== modified file 'src/session-service.c'
--- src/session-service.c 2011-07-05 06:10:58 +0000
+++ src/session-service.c 2011-07-09 03:45:54 +0000
@@ -36,7 +36,13 @@
#include <libdbusmenu-glib/server.h>
#include <libdbusmenu-glib/menuitem.h>
#include <libdbusmenu-glib/client.h>
+
+#include <gtk/gtk.h>
+#if GTK_CHECK_VERSION(3, 0, 0)
#include <libdbusmenu-gtk3/menuitem.h>
+#else
+#include <libdbusmenu-gtk/menuitem.h>
+#endif
#include <libindicator/indicator-service.h>
Follow ups