ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #03635
[Branch ~indicator-applet-developers/indicator-me/trunk] Rev 150: GTK3 port
Merge authors:
Ken VanDine (ken-vandine)
------------------------------------------------------------
revno: 150 [merge]
tags: 0.2.90
committer: Ken VanDine <ken.vandine@xxxxxxxxxxxxx>
branch nick: indicator-me-tip
timestamp: Wed 2011-06-22 14:29:32 -0400
message:
GTK3 port
modified:
configure.ac
src/about-me-menu-item.h
src/indicator-me.c
--
lp:indicator-me
https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk
Your team ayatana-commits is subscribed to branch lp:indicator-me.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk/+edit-subscription
=== modified file 'configure.ac'
--- configure.ac 2011-06-22 17:36:14 +0000
+++ configure.ac 2011-06-22 18:12:30 +0000
@@ -6,7 +6,7 @@
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-me, 0.3.0)
+AM_INIT_AUTOMAKE(indicator-me, 0.2.90)
AM_MAINTAINER_MODE
@@ -30,6 +30,7 @@
###########################
GTK_REQUIRED_VERSION=2.12
+GTK3_REQUIRED_VERSION=3.0
INDICATOR_REQUIRED_VERSION=0.3.0
GWIBBER_REQUIRED_VERSION=0.0.7
DBUSMENUGLIB_REQUIRED_VERSION=0.3.95
@@ -39,18 +40,38 @@
INDICATOR_DISPLAY_OBJECTS=0.1
GIO_UNIX_REQUIRED_VERSION=2.22
-PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
- indicator >= $INDICATOR_REQUIRED_VERSION
- libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
- dbus-glib-1
- dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
- dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
PKG_CHECK_MODULES(MESERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
glib-2.0 >= $GLIB_REQUIRED_VERSION
- indicator >= $INDICATOR_REQUIRED_VERSION
+ dbus-glib-1
+ indicator3 >= $INDICATOR_REQUIRED_VERSION
gwibber-0.1 >= $GWIBBER_REQUIRED_VERSION
gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION
telepathy-glib >= $TELEPATHYGLIB_REQUIRED_VERSION)
+AC_SUBST(MESERVICE_CFLAGS)
+AC_SUBST(MESERVICE_LIBS)
+
+AC_ARG_WITH([gtk],
+ [AS_HELP_STRING([--with-gtk],
+ [Which version of gtk to use for the indicator @<:@default=3@:>@])],
+ [],
+ [with_gtk=3])
+
+AS_IF([test "x$with_gtk" = x3],
+ [PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+ indicator3 >= $INDICATOR_REQUIRED_VERSION
+ libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS
+ dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
+ ],
+ [test "x$with_gtk" = x2],
+ [PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ indicator >= $INDICATOR_REQUIRED_VERSION
+ libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS
+ dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
+ ],
+ [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
+)
+AC_SUBST(APPLET_CFLAGS)
+AC_SUBST(APPLET_LIBS)
###########################
# Check to see if we're local
@@ -66,9 +87,12 @@
if test "x$with_localinstall" = "xyes"; then
INDICATORDIR="${libdir}/indicators/3/"
INDICATORICONSDIR="${datadir}/indicator-applet/icons/"
+elif test "x$with_gtk" = x2; then
+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
else
- INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
- INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3`
+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3`
fi
AC_SUBST(INDICATORDIR)
AC_SUBST(INDICATORICONSDIR)
@@ -144,4 +168,5 @@
Me Indicator Configuration:
Prefix: $prefix
+ GTK: $with_gtk
])
=== modified file 'src/about-me-menu-item.h'
--- src/about-me-menu-item.h 2010-03-11 12:20:48 +0000
+++ src/about-me-menu-item.h 2011-06-22 18:29:03 +0000
@@ -28,7 +28,7 @@
#ifndef __ABOUT_ME_MENU_ITEM_H__
#define __ABOUT_ME_MENU_ITEM_H__
-#include <gtk/gtkmenuitem.h>
+#include <gtk/gtk.h>
G_BEGIN_DECLS
=== modified file 'src/indicator-me.c'
--- src/indicator-me.c 2011-04-14 14:56:04 +0000
+++ src/indicator-me.c 2011-06-22 18:29:03 +0000
@@ -28,7 +28,12 @@
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libdbusmenu-glib/menuitem.h>
+
+#if GTK_CHECK_VERSION(3, 0, 0)
+#include <libdbusmenu-gtk3/menu.h>
+#else
#include <libdbusmenu-gtk/menu.h>
+#endif
#include <libindicator/indicator.h>
#include <libindicator/indicator-object.h>
@@ -335,7 +340,7 @@
}
static void
-item_destroyed_cb (GtkObject *item,
+item_destroyed_cb (DbusmenuMenuitem *item,
gpointer user_data)
{
g_signal_handlers_disconnect_by_func (user_data,
@@ -479,7 +484,7 @@
DBUSMENU_ENTRY_MENUITEM_PROP_HINT);
/* enforce style when typing a message */
- if (GTK_WIDGET_HAS_FOCUS (entry)) {
+ if (gtk_widget_has_focus (GTK_WIDGET (entry))) {
entry_set_style (entry, GTK_STATE_NORMAL);
entry_hint_set_shown (GTK_WIDGET (entry), FALSE);