[Ayatana-commits] [Merge] lp:~ted/indicator-datetime/gtk3-transition into lp:indicator-datetime
Ted Gould has proposed merging lp:~ted/indicator-datetime/gtk3-transition into lp:indicator-datetime. Requested reviews: Indicator Applet Developers (indicator-applet-developers) A stab at what it'll take to migrate this indicator to GTK3. A test case for what we'll need for all indicators. -- https://code.launchpad.net/~ted/indicator-datetime/gtk3-transition/+merge/40690 Your team ayatana-commits is subscribed to branch lp:indicator-datetime. === modified file 'configure.ac' --- configure.ac 2010-10-07 21:15:08 + +++ configure.ac 2010-11-12 04:42:39 + @@ -23,12 +23,31 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +AC_ARG_ENABLE([deprecations], + [AS_HELP_STRING([--enable-deprecations], +[allow deprecated API usage @<:@default=yes@:>@])], + [], + [enable_deprecations=yes]) +AS_IF([test "x$enable_deprecations" = xno], + [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGTK_DISABLE_SINGLE_INCLUDES"] +) + AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums]) AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) PKG_PROG_PKG_CONFIG ### +# GTK+ version option +### + +AC_ARG_WITH([gtk], + [AS_HELP_STRING([--with-gtk], +[Which version of gtk to use @<:@default=2@:>@])], + [], + [with_gtk=2]) + +### # Dependencies ### @@ -41,9 +60,23 @@ GEOCLUE_REQUIRED_VERSION=0.12.0 OOBS_REQUIRED_VERSION=2.31.0 -PKG_CHECK_MODULES(INDICATOR, indicator >= $INDICATOR_REQUIRED_VERSION +AS_IF([test "x$with_gtk" = x3], +[PKG_CHECK_MODULES(INDICATOR, indicator3 >= $INDICATOR_REQUIRED_VERSION + dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk3 >= $DBUSMENUGTK_REQUIRED_VERSION + libido3-0.1 >= $INDICATOR_DISPLAY_OBJECTS) +], + [test "x$with_gtk" = x2], +[PKG_CHECK_MODULES(INDICATOR, indicator >= $INDICATOR_REQUIRED_VERSION + dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION + dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION + libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS) +], +[AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])] +) + +PKG_CHECK_MODULES(SERVICE, indicator >= $INDICATOR_REQUIRED_VERSION dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION - dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION libido-0.1 >= $INDICATOR_DISPLAY_OBJECTS gio-2.0 >= $GIO_REQUIRED_VERSION geoclue >= $GEOCLUE_REQUIRED_VERSION @@ -52,6 +85,9 @@ AC_SUBST(INDICATOR_CFLAGS) AC_SUBST(INDICATOR_LIBS) +AC_SUBST(SERVICE_CFLAGS) +AC_SUBST(SERVICE_LIBS) + ### # Grab the GSettings Macros ### @@ -69,13 +105,21 @@ # Indicator Info ### -if test "x$with_localinstall" = "xyes"; then +AS_IF([test "x$with_localinstall" = "xyes"], + [ INDICATORDIR="${libdir}/indicators/2/" INDICATORICONSDIR="${datadir}/libindicate/icons/" -else - INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator` - INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator` -fi + ], + [AS_IF([test "x$with_gtk" = "x2"], + [ + INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator` + INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator` + ], + [ + INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3` + INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3` + ])]) + AC_SUBST(INDICATORDIR) AC_SUBST(INDICATORICONSDIR) === modified file 'src/Makefile.am' --- src/Makefile.am 2010-09-07 17:44:33 + +++ src/Makefile.am 2010-11-12 04:42:39 + @@ -12,10 +12,10 @@ indicator_datetime_service_CFLAGS = \ -Wall \ -Werror \ - $(INDICATOR_CFLAGS) \ + $(SERVICE_CFLAGS) \ -DTIMEZONE_FILE="\"/etc/timezone\"" indicator_datetime_service_LDADD = \ - $(INDICATOR_LIBS) + $(SERVICE_LIBS) datetimelibdir = $(INDICATORDIR) datetimelib_LTLIBRARIES = libdatetime.la ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp
[Ayatana-commits] [Merge] lp:~ted/indicator-application/build-menu-from-desktop into lp:indicator-application
Ted Gould has proposed merging lp:~ted/indicator-application/build-menu-from-desktop into lp:indicator-application with lp:~ted/indicator-application/property-for-dbus-stuff as a prerequisite. Requested reviews: Indicator Applet Developers (indicator-applet-developers) A function to pull the desktop file entries and make them into a menu so that applications can easily replace their static items with "dynamic" ones if they don't want them to change. -- https://code.launchpad.net/~ted/indicator-application/build-menu-from-desktop/+merge/40689 Your team ayatana-commits is subscribed to branch lp:indicator-application. === modified file 'configure.ac' --- configure.ac 2010-09-22 16:13:14 + +++ configure.ac 2010-11-12 04:42:06 + @@ -52,6 +52,14 @@ AC_SUBST(INDICATOR_CFLAGS) AC_SUBST(INDICATOR_LIBS) +PKG_CHECK_MODULES(LIBRARY, gtk+-2.0 >= $GTK_REQUIRED_VERSION + indicator >= $INDICATOR_REQUIRED_VERSION + dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION + dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION) + +AC_SUBST(LIBRARY_CFLAGS) +AC_SUBST(LIBRARY_LIBS) + ### # GObject Introspection ### === modified file 'docs/reference/libappindicator-sections.txt' --- docs/reference/libappindicator-sections.txt 2010-08-10 20:33:09 + +++ docs/reference/libappindicator-sections.txt 2010-11-12 04:42:06 + @@ -38,5 +38,6 @@ app_indicator_get_label app_indicator_get_label_guide app_indicator_get_ordering_index +app_indicator_build_menu_from_desktop === modified file 'src/Makefile.am' --- src/Makefile.am 2010-08-10 21:59:25 + +++ src/Makefile.am 2010-11-12 04:42:06 + @@ -108,12 +108,12 @@ -export-symbols-regex "^[^_d].*" libappindicator_la_CFLAGS = \ - $(INDICATOR_CFLAGS) \ + $(LIBRARY_CFLAGS) \ -Wall -Werror \ -DG_LOG_DOMAIN=\"libappindicator\" libappindicator_la_LIBADD = \ - $(INDICATOR_LIBS) + $(LIBRARY_LIBS) ## # DBus Specs === modified file 'src/app-indicator.c' --- src/app-indicator.c 2010-11-12 04:42:06 + +++ src/app-indicator.c 2010-11-12 04:42:06 + @@ -38,6 +38,8 @@ #include #include +#include + #include "app-indicator.h" #include "app-indicator-enum-types.h" #include "application-service-marshal.h" @@ -89,6 +91,9 @@ DBusGProxy *watcher_proxy; DBusGConnection *connection; DBusGProxy * dbus_proxy; + + /* Might be used */ + IndicatorDesktopShortcuts * shorties; }; /* Signals Stuff */ @@ -566,6 +571,8 @@ priv->status_icon = NULL; priv->fallback_timer = 0; + priv->shorties = NULL; + /* Put the object on DBus */ GError * error = NULL; priv->connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); @@ -592,6 +599,11 @@ AppIndicator *self = APP_INDICATOR (object); AppIndicatorPrivate *priv = self->priv; + if (priv->shorties != NULL) { + g_object_unref(G_OBJECT(priv->shorties)); + priv->shorties = NULL; + } + if (priv->status != APP_INDICATOR_STATUS_PASSIVE) { app_indicator_set_status(self, APP_INDICATOR_STATUS_PASSIVE); } @@ -2134,3 +2146,82 @@ } } +#define APP_INDICATOR_SHORTY_NICK "app-indicator-shorty-nick" + +/* Callback when an item from the desktop shortcuts gets + called. */ +static void +shorty_activated_cb (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data) +{ + gchar * nick = g_object_get_data(G_OBJECT(mi), APP_INDICATOR_SHORTY_NICK); + g_return_if_fail(nick != NULL); + + g_return_if_fail(IS_APP_INDICATOR(user_data)); + AppIndicator * self = APP_INDICATOR(user_data); + AppIndicatorPrivate *priv = self->priv; + + g_return_if_fail(priv->shorties != NULL); + + indicator_desktop_shortcuts_nick_exec(priv->shorties, nick); + + return; +} + +/** + app_indicator_build_menu_from_desktop: + @self: The #AppIndicator object to use + @desktop_file: A path to the desktop file to build the menu from + @desktop_profile: Which entries should be used from the desktop file + + This function allows for building the Application Indicator menu + from a static desktop file. +*/ +void +app_indicator_build_menu_from_desktop (AppIndicator * self, const gchar * desktop_file, const gchar * desktop_profile) +{ + g_return_if_fail(IS_APP_INDICATOR(self)); + AppIndicatorPrivate *priv = self->priv; + + /* Build a new shortcuts object */ + if (priv->shorties != NULL) { + g_object_unref(priv->shorties); + priv->shorties = NULL; + } + priv->shorties = indicator_desktop_shortcuts_new(desktop_file, desktop_profile); + g_return_if_fail(priv->shorties != NULL); + + const gchar ** nicks = indicator_desktop_shortcuts_get_nicks(priv->shorties); + int nick_num; + + /* Place the items on a dbusmenu */ + DbusmenuMenuitem * root = dbusmenu_menuitem_new(); + + for (nick_num = 0; nicks[nick_num] != NULL; nick_num++) { + DbusmenuMenuitem * item = dbusmenu_menuitem_new(); + g_object_set_data(G_OBJECT(item), APP_INDICATOR_SHORTY_NICK, (gpointer)nicks[nick_num]); +
[Ayatana-commits] [Merge] lp:~ted/indicator-application/property-for-dbus-stuff into lp:indicator-application
Ted Gould has proposed merging lp:~ted/indicator-application/property-for-dbus-stuff into lp:indicator-application. Requested reviews: Indicator Applet Developers (indicator-applet-developers) Adding a property to get the dbusmenu server so we can use it for testing. Oh, and a test to prove that it can be used for testing :) -- https://code.launchpad.net/~ted/indicator-application/property-for-dbus-stuff/+merge/40688 Your team ayatana-commits is subscribed to branch lp:indicator-application. === modified file 'src/app-indicator.c' --- src/app-indicator.c 2010-10-20 19:22:46 + +++ src/app-indicator.c 2010-11-12 04:40:04 + @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -121,7 +122,8 @@ PROP_X_LABEL, PROP_X_LABEL_GUIDE, PROP_ORDERING_INDEX, - PROP_X_ORDERING_INDEX + PROP_X_ORDERING_INDEX, + PROP_DBUS_MENU_SERVER }; /* The strings so that they can be slowly looked up. */ @@ -139,6 +141,7 @@ #define PROP_X_LABEL_GUIDE_S ("x-ayatana-" PROP_LABEL_GUIDE_S) #define PROP_ORDERING_INDEX_S"ordering-index" #define PROP_X_ORDERING_INDEX_S ("x-ayatana-" PROP_ORDERING_INDEX_S) +#define PROP_DBUS_MENU_SERVER_S "dbus-menu-server" /* Private macro, s! */ #define APP_INDICATOR_GET_PRIVATE(o) \ @@ -406,6 +409,19 @@ "A wrapper, please don't use.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + AppIndicator:dbus-menu-server: + + A way to get the internal dbusmenu server if it is available. + This should only be used for testing. + */ + g_object_class_install_property(object_class, + PROP_DBUS_MENU_SERVER, + g_param_spec_object (PROP_DBUS_MENU_SERVER_S, + "The internal DBusmenu Server", + "DBusmenu server which is available for testing the application indicators.", + DBUSMENU_TYPE_SERVER, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Signals */ @@ -794,6 +810,14 @@ priv->ordering_index = g_value_get_uint(value); break; + case PROP_DBUS_MENU_SERVER: + if (priv->menuservice != NULL) { +g_object_unref (priv->menuservice); + } + gpointer val = g_value_dup_object(value); + priv->menuservice = DBUSMENU_SERVER(val); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -866,6 +890,10 @@ g_value_set_uint(value, priv->ordering_index); break; + case PROP_DBUS_MENU_SERVER: + g_value_set_object(value, priv->menuservice); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; === modified file 'tests/test-libappindicator.c' --- tests/test-libappindicator.c 2010-08-04 02:13:34 + +++ tests/test-libappindicator.c 2010-11-12 04:40:04 + @@ -25,6 +25,9 @@ #include +#include +#include + void test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated) { @@ -225,6 +228,57 @@ } void +test_libappindicator_set_menu (void) +{ + AppIndicator * ci = app_indicator_new ("my-id", + "my-name", + APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + + g_assert(ci != NULL); + + GtkMenu * menu = GTK_MENU(gtk_menu_new()); + + GtkMenuItem * item = GTK_MENU_ITEM(gtk_menu_item_new_with_label("Test Label")); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), GTK_WIDGET(item)); + gtk_widget_show(GTK_WIDGET(item)); + + app_indicator_set_menu(ci, menu); + + g_assert(app_indicator_get_menu(ci) != NULL); + + GValue serverval = {0}; + g_value_init(&serverval, DBUSMENU_TYPE_SERVER); + g_object_get_property(G_OBJECT(ci), "dbus-menu-server", &serverval); + + DbusmenuServer * server = DBUSMENU_SERVER(g_value_get_object(&serverval)); + g_assert(server != NULL); + + GValue rootval = {0}; + g_value_init(&rootval, DBUSMENU_TYPE_MENUITEM); + g_object_get_property(G_OBJECT(server), DBUSMENU_SERVER_PROP_ROOT_NODE, &rootval); + DbusmenuMenuitem * root = DBUSMENU_MENUITEM(g_value_get_object(&rootval)); + g_assert(root != NULL); + + GList * children = dbusmenu_menuitem_get_children(root); + g_assert(children != NULL); + g_assert(g_list_length(children) == 1); + + const gchar * label = dbusmenu_menuitem_property_get(DBUSMENU_MENUITEM(children->data), DBUSMENU_MENUITEM_PROP_LABEL); + g_assert(label != NULL); + g_assert(g_strcmp0(label, "Test Label") == 0); + + /* Interesting, eh? We need this because we send out events on the bus + but they don't come back until the idle is run. So we need those + events to clear befor
[Ayatana-commits] [Branch ~dbusmenu-team/dbusmenu/trunk] Rev 171: 0.3.90
revno: 171 tags: 0.3.90 committer: Ted Gould branch nick: trunk timestamp: Thu 2010-11-11 11:23:00 -0600 message: 0.3.90 modified: configure.ac -- lp:dbusmenu https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk Your team ayatana-commits is subscribed to branch lp:dbusmenu. To unsubscribe from this branch go to https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk/+edit-subscription === modified file 'configure.ac' --- configure.ac 2010-11-11 14:26:35 + +++ configure.ac 2010-11-11 17:23:00 + @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.3.16, t...@canonical.com) +AC_INIT(libdbusmenu, 0.3.90, t...@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.3.16, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.3.90, [-Wno-portability]) AM_MAINTAINER_MODE ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp
[Ayatana-commits] [Merge] lp:~mterry/dbusmenu/gtk3 into lp:dbusmenu
The proposal to merge lp:~mterry/dbusmenu/gtk3 into lp:dbusmenu has been updated. Status: Work in progress => Merged -- https://code.launchpad.net/~mterry/dbusmenu/gtk3/+merge/27992 Your team ayatana-commits is subscribed to branch lp:dbusmenu. ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp
[Ayatana-commits] [Branch ~dbusmenu-team/dbusmenu/trunk] Rev 170: Adding in the deprecation flags even if we can't really use them yet.
revno: 170 committer: Ted Gould branch nick: trunk timestamp: Thu 2010-11-11 08:26:35 -0600 message: Adding in the deprecation flags even if we can't really use them yet. modified: Makefile.am configure.ac -- lp:dbusmenu https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk Your team ayatana-commits is subscribed to branch lp:dbusmenu. To unsubscribe from this branch go to https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk/+edit-subscription === modified file 'Makefile.am' --- Makefile.am 2010-09-21 16:42:28 + +++ Makefile.am 2010-11-11 14:26:35 + @@ -13,6 +13,11 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-gtk-doc +## Can't disable deprecations yet, working on that, but +## we want to get there. +# +# DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-gtk-doc --disable-deprecations + dist-hook: @if test -d "$(top_srcdir)/.bzr"; \ then \ === modified file 'configure.ac' --- configure.ac 2010-11-11 14:15:20 + +++ configure.ac 2010-11-11 14:26:35 + @@ -21,6 +21,15 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +AC_ARG_ENABLE([deprecations], + [AS_HELP_STRING([--enable-deprecations], +[allow deprecated API usage @<:@default=yes@:>@])], + [], + [enable_deprecations=yes]) +AS_IF([test "x$enable_deprecations" = xno], + [CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DGTK_DISABLE_SINGLE_INCLUDES"] +) + ### # GTK Doc ### ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp
[Ayatana-commits] [Branch ~dbusmenu-team/dbusmenu/trunk] Rev 169: Merging in configurable GTK build option
Merge authors: Michael Terry (mterry) Michael Terry (mterry) Related merge proposals: https://code.launchpad.net/~mterry/dbusmenu/gtk3/+merge/27992 proposed by: Michael Terry (mterry) revno: 169 [merge] committer: Ted Gould branch nick: trunk timestamp: Thu 2010-11-11 08:15:20 -0600 message: Merging in configurable GTK build option added: libdbusmenu-gtk/dbusmenu-gtk3.pc.in modified: .bzrignore configure.ac libdbusmenu-gtk/Makefile.am libdbusmenu-gtk/client.c libdbusmenu-gtk/genericmenuitem.c libdbusmenu-gtk/menu.c libdbusmenu-gtk/menuitem.c tools/testapp/Makefile.am -- lp:dbusmenu https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk Your team ayatana-commits is subscribed to branch lp:dbusmenu. To unsubscribe from this branch go to https://code.launchpad.net/~dbusmenu-team/dbusmenu/trunk/+edit-subscription === modified file '.bzrignore' --- .bzrignore 2010-08-27 19:31:44 + +++ .bzrignore 2010-11-11 14:15:20 + @@ -49,8 +49,8 @@ tests/test-gtk-reorder-server tests/test-gtk-reorder tools/dbusmenu-dumper -libdbusmenu-[0-9].[0-9].[0-9].tar.gz -libdbusmenu-[0-9].[0-9].[0-9].tar.gz.asc +libdbusmenu-[0-9]*.[0-9]*.[0-9]*.tar.gz +libdbusmenu-[0-9]*.[0-9]*.[0-9]*.tar.gz.asc tests/test-mago tests/*.bustle libdbusmenu-gtk/libdbusmenu_gtk_la-genericmenuitem.lo @@ -194,3 +194,12 @@ tests/test-glib-events tests/test-glib-events-client tests/test-glib-events-server +libdbusmenu-gtk/DbusmenuGtk3-0.2.gir +libdbusmenu-gtk/DbusmenuGtk3-0.2.tmp.gir +libdbusmenu-gtk/DbusmenuGtk3-0.2.typelib +libdbusmenu-gtk/dbusmenu-gtk3.pc +libdbusmenu-gtk/libdbusmenu-gtk3.la +libdbusmenu-gtk/libdbusmenu_gtk3_la-client.lo +libdbusmenu-gtk/libdbusmenu_gtk3_la-genericmenuitem.lo +libdbusmenu-gtk/libdbusmenu_gtk3_la-menu.lo +libdbusmenu-gtk/libdbusmenu_gtk3_la-menuitem.lo === modified file 'configure.ac' --- configure.ac 2010-10-12 18:00:25 + +++ configure.ac 2010-11-11 14:15:20 + @@ -48,14 +48,33 @@ ### GTK_REQUIRED_VERSION=2.16 - -PKG_CHECK_MODULES(DBUSMENUGTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION -glib-2.0 >= $GLIB_REQUIRED_VERSION -dbus-glib-1 >= $DBUS_REQUIRED_VERSION -libxml-2.0 >= $XML_REQUIRED_VERSION) - -AC_SUBST(DBUSMENUGTK_CFLAGS) -AC_SUBST(DBUSMENUGTK_LIBS) +GTK3_REQUIRED_VERSION=2.91 + +AC_ARG_WITH([gtk], + [AS_HELP_STRING([--with-gtk], +[Which version of gtk to use @<:@default=2@:>@])], + [], + [with_gtk=2]) +AS_IF([test "x$with_gtk" = x3], +[PKG_CHECK_MODULES(DBUSMENUGTK, gtk+-3.0 >= $GTK3_REQUIRED_VERSION + glib-2.0 >= $GLIB_REQUIRED_VERSION + dbus-glib-1 >= $DBUS_REQUIRED_VERSION + libxml-2.0 >= $XML_REQUIRED_VERSION) + AC_SUBST(DBUSMENUGTK_CFLAGS) + AC_SUBST(DBUSMENUGTK_LIBS) + AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available]) +], + [test "x$with_gtk" = x2], +[PKG_CHECK_MODULES(DBUSMENUGTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION + glib-2.0 >= $GLIB_REQUIRED_VERSION + dbus-glib-1 >= $DBUS_REQUIRED_VERSION + libxml-2.0 >= $XML_REQUIRED_VERSION) + AC_SUBST(DBUSMENUGTK_CFLAGS) + AC_SUBST(DBUSMENUGTK_LIBS) +], + [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])] +) +AM_CONDITIONAL(USE_GTK3, [test "x$with_gtk" = x3]) ### # Dependencies - dumper @@ -137,6 +156,7 @@ libdbusmenu-glib/dbusmenu-glib.pc libdbusmenu-gtk/Makefile libdbusmenu-gtk/dbusmenu-gtk.pc +libdbusmenu-gtk/dbusmenu-gtk3.pc tools/Makefile tools/testapp/Makefile tests/Makefile @@ -160,5 +180,6 @@ Prefix: $prefix Massive Debugging: $with_massivedebugging + GTK+ Version: $with_gtk ]) === modified file 'libdbusmenu-gtk/Makefile.am' --- libdbusmenu-gtk/Makefile.am 2010-05-20 16:09:29 + +++ libdbusmenu-gtk/Makefile.am 2010-10-13 12:42:42 + @@ -1,13 +1,23 @@ CLEANFILES = +if USE_GTK3 +VER=3 +GTKGIR=Gtk-3.0 +GTKVALA=gtk+-3.0 +lib_LTLIBRARIES = libdbusmenu-gtk3.la +else +VER= +GTKGIR=Gtk-2.0 +GTKVALA=gtk+-2.0 +lib_LTLIBRARIES = libdbusmenu-gtk.la +endif + EXTRA_DIST = \ - dbusmenu-gtk.pc.in - -lib_LTLIBRARIES = \ - libdbusmenu-gtk.la - -libdbusmenu_gtkincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-gtk/ + dbusmenu-gtk.pc.in \ + dbusmenu-gtk3.pc.in + +libdbusmenu_gtkincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-gtk$(VER)/ libdbusmenu_gtkinclude_HEADERS = \ client.h \ @@ -36,7 +46,18 @@ ../libdbusmenu-glib/libdbusmenu-glib.la \ $(DBUSMENUGTK_LIBS) -pkgconfig_DATA = dbusmenu-gtk.pc +# We duplicate these here because Automake won't let us use $(VER) on the left hand side. +# Since we carefully use $(
[Ayatana-commits] [Merge] lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick into lp:indicator-sound/sound-menu-v2
The proposal to merge lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick into lp:indicator-sound/sound-menu-v2 has been updated. Status: Approved => Merged -- https://code.launchpad.net/~cjcurran/indicator-sound/metadata-widget-blank-maverick/+merge/40621 Your team ayatana-commits is subscribed to branch lp:indicator-sound/sound-menu-v2. ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp
[Ayatana-commits] [Merge] lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick into lp:indicator-sound/sound-menu-v2
The proposal to merge lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick into lp:indicator-sound/sound-menu-v2 has been updated. Status: Needs review => Approved -- https://code.launchpad.net/~cjcurran/indicator-sound/metadata-widget-blank-maverick/+merge/40621 Your team ayatana-commits is subscribed to branch lp:indicator-sound/sound-menu-v2. ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp
Re: [Ayatana-commits] [Merge] lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick into lp:indicator-sound/sound-menu-v2
Review: Approve My vala skills are very limited, but looks good to me. -- https://code.launchpad.net/~cjcurran/indicator-sound/metadata-widget-blank-maverick/+merge/40621 Your team ayatana-commits is subscribed to branch lp:indicator-sound/sound-menu-v2. ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp
[Ayatana-commits] [Merge] lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick into lp:indicator-sound/sound-menu-v2
Conor Curran has proposed merging lp:~cjcurran/indicator-sound/metadata-widget-blank-maverick into lp:indicator-sound/sound-menu-v2. Requested reviews: Indicator Applet Developers (indicator-applet-developers) Fixes slight visual bug whereby on starting media client (like rhythmbox )the metadata widget (the part of the menu which holds the track album art and text) does not appear unless the widget is populated. -- https://code.launchpad.net/~cjcurran/indicator-sound/metadata-widget-blank-maverick/+merge/40621 Your team ayatana-commits is subscribed to branch lp:indicator-sound/sound-menu-v2. === modified file 'src/player-item.vala' --- src/player-item.vala 2010-09-03 19:05:42 + +++ src/player-item.vala 2010-11-11 13:01:32 + @@ -87,9 +87,7 @@ this.property_set_bool(property, v.get_boolean()); } } - if(this.property_get_bool(MENUITEM_PROP_VISIBLE) == false){ - this.property_set_bool(MENUITEM_PROP_VISIBLE, true); - } +this.property_set_bool(MENUITEM_PROP_VISIBLE, populated(attributes)); } public bool populated(HashSet attrs) @@ -97,8 +95,8 @@ foreach(string prop in attrs){ debug("populated ? - prop: %s", prop); int value_int = property_get_int(prop); - debug("populated ? - prop %s and value %i", prop, value_int); if(property_get_int(prop) != EMPTY){ + debug("populated ? - prop %s and value %i", prop, value_int); return true; } } ___ Mailing list: https://launchpad.net/~ayatana-commits Post to : ayatana-commits@lists.launchpad.net Unsubscribe : https://launchpad.net/~ayatana-commits More help : https://help.launchpad.net/ListHelp