Merge lp:~mterry/indicator-messages/gtk3 into lp:indicator-messages/0.5

Proposed by Michael Terry
Status: Merged
Approved by: Ted Gould
Approved revision: 213
Merged at revision: 213
Proposed branch: lp:~mterry/indicator-messages/gtk3
Merge into: lp:indicator-messages/0.5
Diff against target: 77 lines (+33/-6)
2 files modified
configure.ac (+27/-6)
src/indicator-messages.c (+6/-0)
To merge this branch: bzr merge lp:~mterry/indicator-messages/gtk3
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+62527@code.launchpad.net

Description of the change

Builds with gtk3 by default, adds a configure flag to build with gtk2 if desired.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Code looks fine. Worried about the dbusmenu-gtk3 includes though :-/ (see last review's comment).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure.ac'
--- configure.ac 2011-04-07 17:10:43 +0000
+++ configure.ac 2011-05-26 17:27:55 +0000
@@ -36,17 +36,35 @@
36###########################36###########################
3737
38GTK_REQUIRED_VERSION=2.1238GTK_REQUIRED_VERSION=2.12
39GTK3_REQUIRED_VERSION=3.0
39GIO_UNIX_REQUIRED_VERSION=2.1840GIO_UNIX_REQUIRED_VERSION=2.18
40PANEL_REQUIRED_VERSION=2.0.041PANEL_REQUIRED_VERSION=2.0.0
41INDICATE_REQUIRED_VERSION=0.4.9042INDICATE_REQUIRED_VERSION=0.4.90
42INDICATOR_REQUIRED_VERSION=0.3.1943INDICATOR_REQUIRED_VERSION=0.3.19
43DBUSMENUGTK_REQUIRED_VERSION=0.3.9444DBUSMENUGTK_REQUIRED_VERSION=0.3.94
4445
45PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION46AC_ARG_WITH([indicator-gtk],
46 gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION47 [AS_HELP_STRING([--with-indicator-gtk],
47 indicator >= $INDICATOR_REQUIRED_VERSION48 [Which version of gtk to use for the indicator @<:@default=3@:>@])],
48 indicate-0.5 >= $INDICATE_REQUIRED_VERSION49 [],
49 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)50 [with_indicator_gtk=3])
51
52AS_IF([test "x$with_indicator_gtk" = x3],
53 [PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
54 gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
55 indicator3 >= $INDICATOR_REQUIRED_VERSION
56 indicate-0.5 >= $INDICATE_REQUIRED_VERSION
57 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
58 ],
59 [test "x$with_indicator_gtk" = x2],
60 [PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
61 gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
62 indicator >= $INDICATOR_REQUIRED_VERSION
63 indicate-0.5 >= $INDICATE_REQUIRED_VERSION
64 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
65 ],
66 [AC_MSG_FAILURE([Value for --with-indicator-gtk was neither 2 nor 3])]
67)
50AC_SUBST(APPLET_CFLAGS)68AC_SUBST(APPLET_CFLAGS)
51AC_SUBST(APPLET_LIBS)69AC_SUBST(APPLET_LIBS)
5270
@@ -64,9 +82,12 @@
64if test "x$with_localinstall" = "xyes"; then82if test "x$with_localinstall" = "xyes"; then
65 INDICATORDIR="${libdir}/indicators/2/"83 INDICATORDIR="${libdir}/indicators/2/"
66 INDICATORICONSDIR="${datadir}/libindicate/icons/"84 INDICATORICONSDIR="${datadir}/libindicate/icons/"
67else85elif test "x$with_indicator_gtk" = x2; then
68 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`86 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
69 INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`87 INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
88else
89 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3`
90 INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3`
70fi91fi
71AC_SUBST(INDICATORDIR)92AC_SUBST(INDICATORDIR)
72AC_SUBST(INDICATORICONSDIR)93AC_SUBST(INDICATORICONSDIR)
7394
=== modified file 'src/indicator-messages.c'
--- src/indicator-messages.c 2011-02-17 18:04:32 +0000
+++ src/indicator-messages.c 2011-05-26 17:27:55 +0000
@@ -25,8 +25,14 @@
25#include <glib-object.h>25#include <glib-object.h>
26#include <glib/gi18n.h>26#include <glib/gi18n.h>
27#include <gtk/gtk.h>27#include <gtk/gtk.h>
28
29#if GTK_CHECK_VERSION(3, 0, 0)
30#include <libdbusmenu-gtk3/menu.h>
31#include <libdbusmenu-gtk3/menuitem.h>
32#else
28#include <libdbusmenu-gtk/menu.h>33#include <libdbusmenu-gtk/menu.h>
29#include <libdbusmenu-gtk/menuitem.h>34#include <libdbusmenu-gtk/menuitem.h>
35#endif
3036
31#include <libindicator/indicator.h>37#include <libindicator/indicator.h>
32#include <libindicator/indicator-object.h>38#include <libindicator/indicator-object.h>

Subscribers

People subscribed via source and target branches