aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk/client.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2010-11-17 15:35:34 -0500
committerKen VanDine <ken.vandine@canonical.com>2010-11-17 15:35:34 -0500
commitca1881e6cf5180215a3222f95b387c48f265184c (patch)
tree2075e0d9976ea51c39964137ef5dfca5c2e6e3d0 /libdbusmenu-gtk/client.c
parentb353628b2659d06ad6e356cfbf017aa96cb4697e (diff)
parent395db9878504b28778b246ea658be5287e758e1f (diff)
downloadlibdbusmenu-ca1881e6cf5180215a3222f95b387c48f265184c.tar.gz
libdbusmenu-ca1881e6cf5180215a3222f95b387c48f265184c.tar.bz2
libdbusmenu-ca1881e6cf5180215a3222f95b387c48f265184c.zip
* New upstream release.
* Breaking ABI and getting reserved back * Adding build support for GTK2/3 builds * Only force a flush of top level items, allow others to be based on the count. * debian/control, debian/libdbusmenu-glib2.install, debian/libdbusmenu-gtk2.install: Switching package names to match .so bump.
Diffstat (limited to 'libdbusmenu-gtk/client.c')
-rw-r--r--libdbusmenu-gtk/client.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c
index 6970d59..bba4550 100644
--- a/libdbusmenu-gtk/client.c
+++ b/libdbusmenu-gtk/client.c
@@ -37,13 +37,11 @@ License version 3 and version 2.1 along with this program. If not, see
#include "genericmenuitem.h"
/* Private */
-typedef struct _DbusmenuGtkClientPrivate DbusmenuGtkClientPrivate;
struct _DbusmenuGtkClientPrivate {
GtkAccelGroup * agroup;
};
-#define DBUSMENU_GTKCLIENT_GET_PRIVATE(o) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_GTKCLIENT_TYPE, DbusmenuGtkClientPrivate))
+#define DBUSMENU_GTKCLIENT_GET_PRIVATE(o) (DBUSMENU_GTKCLIENT(o)->priv)
/* Prototypes */
static void dbusmenu_gtkclient_class_init (DbusmenuGtkClientClass *klass);
@@ -85,6 +83,8 @@ dbusmenu_gtkclient_class_init (DbusmenuGtkClientClass *klass)
static void
dbusmenu_gtkclient_init (DbusmenuGtkClient *self)
{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), DBUSMENU_GTKCLIENT_TYPE, DbusmenuGtkClientPrivate);
+
DbusmenuGtkClientPrivate * priv = DBUSMENU_GTKCLIENT_GET_PRIVATE(self);
priv->agroup = NULL;
@@ -454,11 +454,17 @@ activate_helper (GtkMenuShell * shell)
activate_helper(GTK_MENU_SHELL(parent));
}
+ /* This code is being commented out for GTK 3 because it
+ doesn't expose the right variables. We need to figure
+ this out as menus won't get grabs properly.
+ TODO FIXME HELP ARGHHHHHHHH */
+#if (HAVE_GTK3 == 0)
if (!GTK_MENU_SHELL (parent)->active) {
gtk_grab_add (parent);
GTK_MENU_SHELL (parent)->have_grab = TRUE;
GTK_MENU_SHELL (parent)->active = TRUE;
}
+#endif
gtk_menu_shell_select_item(GTK_MENU_SHELL(parent), attach);
}