[gtk+/gtk-3-0] Update gtk/gtkmenuitem.c...
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-0] Update gtk/gtkmenuitem.c...
- Date: Sun, 17 Apr 2011 17:50:50 +0000 (UTC)
commit 4eac7f24177d947852574f11ef483b1c43fd17e5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Apr 18 02:04:24 2011 +0800
Update gtk/gtkmenuitem.c...
Copy over the implementation of _gtk_menu_shell_activate
so that C4013 warning/error (aka gcc's "implicit
declaration of ...") can be avoided when compiling
with MSVC.
This is in response of the changes for bug 554057 in commit
f5eee56b56e2f371a0dc659f2d402b0cfc1c42c2.
gtk/gtkmenuitem.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 72fbe42..38eddfc 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -170,6 +170,25 @@ G_DEFINE_TYPE_WITH_CODE (GtkMenuItem, gtk_menu_item, GTK_TYPE_BIN,
static void
+_gtk_menu_shell_activate (GtkMenuShell *menu_shell)
+{
+ GtkMenuShellPrivate *priv = menu_shell->priv;
+
+ if (!priv->active)
+ {
+ GdkDevice *device;
+
+ device = gtk_get_current_event_device ();
+
+ _gtk_menu_shell_set_grab_device (menu_shell, device);
+ gtk_device_grab_add (GTK_WIDGET (menu_shell), device, TRUE);
+
+ priv->have_grab = TRUE;
+ priv->active = TRUE;
+ }
+}
+
+static void
gtk_menu_item_class_init (GtkMenuItemClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]