Merge lp:~mterry/indicator-appmenu/gtk3 into lp:indicator-appmenu/0.3

Proposed by Michael Terry
Status: Merged
Approved by: Ted Gould
Approved revision: 124
Merged at revision: 124
Proposed branch: lp:~mterry/indicator-appmenu/gtk3
Merge into: lp:indicator-appmenu/0.3
Diff against target: 106 lines (+41/-6)
4 files modified
configure.ac (+27/-6)
scripts/menu-pusher.c (+4/-0)
src/indicator-appmenu.c (+4/-0)
src/window-menus.c (+6/-0)
To merge this branch: bzr merge lp:~mterry/indicator-appmenu/gtk3
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+63753@code.launchpad.net

Description of the change

Port to gtk3 (needs bamf port merged first)

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

Can't test without the BAMF update but in review this looks fine.

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-14 21:09:13 +0000
+++ configure.ac 2011-06-07 19:42:23 +0000
@@ -47,16 +47,34 @@
47###########################47###########################
4848
49GTK_REQUIRED_VERSION=2.1249GTK_REQUIRED_VERSION=2.12
50GTK3_REQUIRED_VERSION=3.0
50GIO_REQUIRED_VERSION=2.2651GIO_REQUIRED_VERSION=2.26
51INDICATOR_REQUIRED_VERSION=0.3.1952INDICATOR_REQUIRED_VERSION=0.3.19
52DBUSMENUGTK_REQUIRED_VERSION=0.3.353DBUSMENUGTK_REQUIRED_VERSION=0.3.3
53BAMF_REQUIRED_VERSION=0.2.5354BAMF_REQUIRED_VERSION=0.2.53
5455
55PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION56AC_ARG_WITH([gtk],
56 gio-2.0 >= $GIO_REQUIRED_VERSION57 [AS_HELP_STRING([--with-gtk],
57 indicator >= $INDICATOR_REQUIRED_VERSION58 [Which version of gtk to use @<:@default=3@:>@])],
58 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION59 [],
59 libbamf >= $BAMF_REQUIRED_VERSION)60 [with_gtk=3])
61
62AS_IF([test "x$with_gtk" = x3],
63 [PKG_CHECK_MODULES(INDICATOR, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
64 gio-2.0 >= $GIO_REQUIRED_VERSION
65 indicator3 >= $INDICATOR_REQUIRED_VERSION
66 dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
67 libbamf3 >= $BAMF_REQUIRED_VERSION)
68 ],
69 [test "x$with_gtk" = x2],
70 [PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
71 gio-2.0 >= $GIO_REQUIRED_VERSION
72 indicator >= $INDICATOR_REQUIRED_VERSION
73 dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
74 libbamf >= $BAMF_REQUIRED_VERSION)
75 ],
76 [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
77)
6078
61AC_SUBST(INDICATOR_CFLAGS)79AC_SUBST(INDICATOR_CFLAGS)
62AC_SUBST(INDICATOR_LIBS)80AC_SUBST(INDICATOR_LIBS)
@@ -94,9 +112,12 @@
94if test "x$with_localinstall" = "xyes"; then112if test "x$with_localinstall" = "xyes"; then
95 INDICATORDIR="${libdir}/indicators/3/"113 INDICATORDIR="${libdir}/indicators/3/"
96 INDICATORICONSDIR="${datadir}/libindicate/icons/"114 INDICATORICONSDIR="${datadir}/libindicate/icons/"
97else115elif test "x$with_gtk" = x2; then
98 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`116 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
99 INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`117 INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
118else
119 INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3`
120 INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3`
100fi121fi
101AC_SUBST(INDICATORDIR)122AC_SUBST(INDICATORDIR)
102AC_SUBST(INDICATORICONSDIR)123AC_SUBST(INDICATORICONSDIR)
103124
=== modified file 'scripts/menu-pusher.c'
--- scripts/menu-pusher.c 2011-01-12 20:08:25 +0000
+++ scripts/menu-pusher.c 2011-06-07 19:42:23 +0000
@@ -23,7 +23,11 @@
23#include <gio/gio.h>23#include <gio/gio.h>
24#include <libdbusmenu-glib/menuitem.h>24#include <libdbusmenu-glib/menuitem.h>
25#include <libdbusmenu-glib/server.h>25#include <libdbusmenu-glib/server.h>
26#if GTK_CHECK_VERSION(3, 0, 0)
27#include <libdbusmenu-gtk3/menuitem.h>
28#else
26#include <libdbusmenu-gtk/menuitem.h>29#include <libdbusmenu-gtk/menuitem.h>
30#endif
27#include "../src/dbus-shared.h"31#include "../src/dbus-shared.h"
2832
29int33int
3034
=== modified file 'src/indicator-appmenu.c'
--- src/indicator-appmenu.c 2011-04-07 15:43:16 +0000
+++ src/indicator-appmenu.c 2011-06-07 19:42:23 +0000
@@ -680,7 +680,11 @@
680 SubstructureRedirectMask | SubstructureNotifyMask,680 SubstructureRedirectMask | SubstructureNotifyMask,
681 &xev);681 &xev);
682 gdk_flush ();682 gdk_flush ();
683#if GTK_CHECK_VERSION(3, 0, 0)
684 gdk_error_trap_pop_ignored ();
685#else
683 gdk_error_trap_pop ();686 gdk_error_trap_pop ();
687#endif
684688
685 return;689 return;
686}690}
687691
=== modified file 'src/window-menus.c'
--- src/window-menus.c 2011-04-15 19:09:56 +0000
+++ src/window-menus.c 2011-06-07 19:42:23 +0000
@@ -23,7 +23,13 @@
23#include "config.h"23#include "config.h"
24#endif24#endif
2525
26#include <gtk/gtk.h>
27
28#if GTK_CHECK_VERSION(3, 0, 0)
29#include <libdbusmenu-gtk3/menu.h>
30#else
26#include <libdbusmenu-gtk/menu.h>31#include <libdbusmenu-gtk/menu.h>
32#endif
27#include <glib.h>33#include <glib.h>
28#include <gio/gio.h>34#include <gio/gio.h>
2935

Subscribers

People subscribed via source and target branches