From d177c5f4692279198a2ff4b7e21e92208a69075b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 17 Sep 2010 16:33:38 -0500 Subject: Turn about to show into an activate for those with children. --- libdbusmenu-glib/menuitem.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index ea69776..fb12163 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -97,6 +97,7 @@ static void get_property (GObject * obj, guint id, GValue * value, GParamSpec * static void g_value_transform_STRING_BOOLEAN (const GValue * in, GValue * out); static void g_value_transform_STRING_INT (const GValue * in, GValue * out); static void handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); +static void send_about_to_show (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data); /* GObject stuff */ G_DEFINE_TYPE (DbusmenuMenuitem, dbusmenu_menuitem, G_TYPE_OBJECT); @@ -114,6 +115,7 @@ dbusmenu_menuitem_class_init (DbusmenuMenuitemClass *klass) object_class->get_property = get_property; klass->handle_event = handle_event; + klass->send_about_to_show = send_about_to_show; /** DbusmenuMenuitem::property-changed: @@ -387,6 +389,28 @@ handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, g return; } +/* Handles our about to show signal on items that submenus + exist. This is sending just activate now, but we should + probably consider a special signal in the future if GTK + gets more sophisticated about this. */ +static void +send_about_to_show (DbusmenuMenuitem * mi, dbusmenu_menuitem_about_to_show_cb cb, gpointer cb_data) +{ + g_return_if_fail(DBUSMENU_IS_MENUITEM(mi)); + + if (dbusmenu_menuitem_get_children(mi) == NULL) { + g_warning("About to Show called on an item wihtout submenus. We're ignoring it."); + } else { + g_signal_emit(G_OBJECT(mi), signals[ITEM_ACTIVATED], 0, 0 /* timestamp */, TRUE); + } + + if (cb != NULL) { + cb(mi, cb_data); + } + + return; +} + /* Public interface */ /** -- cgit v1.2.3 From 56b4d9a181b29082051ed9c0e4743eca52eac52f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 21 Sep 2010 11:42:28 -0500 Subject: Adding in ChangeLog and AUTHORS dist-hooks --- Makefile.am | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Makefile.am b/Makefile.am index 3853d2a..b5fff3e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,3 +12,29 @@ SUBDIRS = \ po DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-gtk-doc + +dist-hook: + @if test -d "$(top_srcdir)/.bzr"; \ + then \ + echo Creating ChangeLog && \ + ( cd "$(top_srcdir)" && \ + echo '# Generated by Makefile. Do not edit.'; echo; \ + $(top_srcdir)/missing --run bzr log --gnu-changelog ) > ChangeLog.tmp \ + && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ + || (rm -f ChangeLog.tmp; \ + echo Failed to generate ChangeLog >&2 ); \ + else \ + echo Failed to generate ChangeLog: not a branch >&2; \ + fi + @if test -d "$(top_srcdir)/.bzr"; \ + then \ + echo Creating AUTHORS && \ + ( cd "$(top_srcdir)" && \ + echo '# Generated by Makefile. Do not edit.'; echo; \ + $(top_srcdir)/missing --run bzr log --long --levels=0 | grep -e "^\s*author:" -e "^\s*committer:" | cut -d ":" -f 2 | cut -d "<" -f 1 | sort -u) > AUTHORS.tmp \ + && mv -f AUTHORS.tmp $(top_distdir)/AUTHORS \ + || (rm -f AUTHORS.tmp; \ + echo Failed to generate AUTHORS >&2 ); \ + else \ + echo Failed to generate AUTHORS: not a branch >&2; \ + fi -- cgit v1.2.3 From 9cc32d2064b803d005b1e0824022528a295c8fdd Mon Sep 17 00:00:00 2001 From: David Barth Date: Wed, 22 Sep 2010 14:16:17 +0200 Subject: 0.3.15 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7e7bf6b..576caad 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.3.14, ted@canonical.com) +AC_INIT(libdbusmenu, 0.3.15, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.3.14, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.3.15, [-Wno-portability]) AM_MAINTAINER_MODE -- cgit v1.2.3