Commit f3a74ace authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Support no-Alt mnemnonics in menu bars (#101309, Owen Taylor)

2004-12-10  Matthias Clasen  <mclasen@redhat.com>

	Support no-Alt mnemnonics in menu bars  (#101309, Owen Taylor)

	* gtk/gtkwindow.c: Factor out mnemonic hash code into
	a separate file.

	* gtk/gtkmnemonichash.[hc]: Factored out mnemonic hash
	code from gtkwindow.c.

	* gtk/Makefile.am (gtk_c_sources): Add gtkmnemonichash.[hc].

	* gtk/gtkmenushell.c (struct _GtkMenuShellPrivate): Give
	menu shells their own mnemonic hash.

	* gtk/gtkmenushell.h: Add private api to support mnemonics.

	* gtk/gtklabel.c (gtk_label_setup_mnemonic): Add mnemonic to
	the menushell mnemonic hash when inside a menu.
parent 5c98a5eb
2004-12-10 Matthias Clasen <mclasen@redhat.com>
Support no-Alt mnemnonics in menu bars (#101309, Owen Taylor)
* gtk/gtkwindow.c: Factor out mnemonic hash code into
a separate file.
* gtk/gtkmnemonichash.[hc]: Factored out mnemonic hash
code from gtkwindow.c.
* gtk/Makefile.am (gtk_c_sources): Add gtkmnemonichash.[hc].
* gtk/gtkmenushell.c (struct _GtkMenuShellPrivate): Give
menu shells their own mnemonic hash.
* gtk/gtkmenushell.h: Add private api to support mnemonics.
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Add mnemonic to
the menushell mnemonic hash when inside a menu.
Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org> Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org>
* gtk/gtk.symbols: add recent new functions. * gtk/gtk.symbols: add recent new functions.
......
2004-12-10 Matthias Clasen <mclasen@redhat.com>
Support no-Alt mnemnonics in menu bars (#101309, Owen Taylor)
* gtk/gtkwindow.c: Factor out mnemonic hash code into
a separate file.
* gtk/gtkmnemonichash.[hc]: Factored out mnemonic hash
code from gtkwindow.c.
* gtk/Makefile.am (gtk_c_sources): Add gtkmnemonichash.[hc].
* gtk/gtkmenushell.c (struct _GtkMenuShellPrivate): Give
menu shells their own mnemonic hash.
* gtk/gtkmenushell.h: Add private api to support mnemonics.
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Add mnemonic to
the menushell mnemonic hash when inside a menu.
Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org> Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org>
* gtk/gtk.symbols: add recent new functions. * gtk/gtk.symbols: add recent new functions.
......
2004-12-10 Matthias Clasen <mclasen@redhat.com>
Support no-Alt mnemnonics in menu bars (#101309, Owen Taylor)
* gtk/gtkwindow.c: Factor out mnemonic hash code into
a separate file.
* gtk/gtkmnemonichash.[hc]: Factored out mnemonic hash
code from gtkwindow.c.
* gtk/Makefile.am (gtk_c_sources): Add gtkmnemonichash.[hc].
* gtk/gtkmenushell.c (struct _GtkMenuShellPrivate): Give
menu shells their own mnemonic hash.
* gtk/gtkmenushell.h: Add private api to support mnemonics.
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Add mnemonic to
the menushell mnemonic hash when inside a menu.
Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org> Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org>
* gtk/gtk.symbols: add recent new functions. * gtk/gtk.symbols: add recent new functions.
......
2004-12-10 Matthias Clasen <mclasen@redhat.com>
Support no-Alt mnemnonics in menu bars (#101309, Owen Taylor)
* gtk/gtkwindow.c: Factor out mnemonic hash code into
a separate file.
* gtk/gtkmnemonichash.[hc]: Factored out mnemonic hash
code from gtkwindow.c.
* gtk/Makefile.am (gtk_c_sources): Add gtkmnemonichash.[hc].
* gtk/gtkmenushell.c (struct _GtkMenuShellPrivate): Give
menu shells their own mnemonic hash.
* gtk/gtkmenushell.h: Add private api to support mnemonics.
* gtk/gtklabel.c (gtk_label_setup_mnemonic): Add mnemonic to
the menushell mnemonic hash when inside a menu.
Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org> Fri Dec 10 13:59:32 2004 Manish Singh <yosh@gimp.org>
* gtk/gtk.symbols: add recent new functions. * gtk/gtk.symbols: add recent new functions.
......
...@@ -425,6 +425,8 @@ gtk_c_sources = \ ...@@ -425,6 +425,8 @@ gtk_c_sources = \
gtkmenutoolbutton.c \ gtkmenutoolbutton.c \
gtkmessagedialog.c \ gtkmessagedialog.c \
gtkmisc.c \ gtkmisc.c \
gtkmnemonichash.c \
gtkmnemonichash.h \
gtkmodules.c \ gtkmodules.c \
gtknotebook.c \ gtknotebook.c \
gtkobject.c \ gtkobject.c \
......
...@@ -833,27 +833,59 @@ static void ...@@ -833,27 +833,59 @@ static void
gtk_label_setup_mnemonic (GtkLabel *label, gtk_label_setup_mnemonic (GtkLabel *label,
guint last_key) guint last_key)
{ {
GtkWidget *widget = GTK_WIDGET (label);
GtkWidget *toplevel; GtkWidget *toplevel;
GtkWidget *mnemonic_menu;
if (last_key != GDK_VoidSymbol && label->mnemonic_window)
mnemonic_menu = g_object_get_data (G_OBJECT (label), "gtk-mnemonic-menu");
if (last_key != GDK_VoidSymbol)
{ {
gtk_window_remove_mnemonic (label->mnemonic_window, if (label->mnemonic_window)
last_key, {
GTK_WIDGET (label)); gtk_window_remove_mnemonic (label->mnemonic_window,
label->mnemonic_window = NULL; last_key,
widget);
label->mnemonic_window = NULL;
}
if (mnemonic_menu)
{
_gtk_menu_shell_remove_mnemonic (GTK_MENU_SHELL (mnemonic_menu),
last_key,
widget);
label->mnemonic_window = NULL;
}
} }
if (label->mnemonic_keyval == GDK_VoidSymbol) if (label->mnemonic_keyval == GDK_VoidSymbol)
return; return;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (label)); toplevel = gtk_widget_get_toplevel (widget);
if (GTK_WIDGET_TOPLEVEL (toplevel)) if (GTK_WIDGET_TOPLEVEL (toplevel))
{ {
gtk_window_add_mnemonic (GTK_WINDOW (toplevel), GtkWidget *menu_shell;
label->mnemonic_keyval,
GTK_WIDGET (label)); menu_shell = gtk_widget_get_ancestor (widget,
label->mnemonic_window = GTK_WINDOW (toplevel); GTK_TYPE_MENU_SHELL);
if (menu_shell)
{
_gtk_menu_shell_add_mnemonic (GTK_MENU_SHELL (menu_shell),
label->mnemonic_keyval,
widget);
mnemonic_menu = menu_shell;
}
if (!(menu_shell && GTK_IS_MENU (menu_shell)))
{
gtk_window_add_mnemonic (GTK_WINDOW (toplevel),
label->mnemonic_keyval,
widget);
label->mnemonic_window = GTK_WINDOW (toplevel);
}
} }
g_object_set_data (G_OBJECT (label), "gtk-mnemonic-menu", mnemonic_menu);
} }
static void static void
......
...@@ -30,11 +30,13 @@ ...@@ -30,11 +30,13 @@
#include "gdk/gdkkeysyms.h" #include "gdk/gdkkeysyms.h"
#include "gtkalias.h" #include "gtkalias.h"
#include "gtkbindings.h" #include "gtkbindings.h"
#include "gtkkeyhash.h"
#include "gtkmain.h" #include "gtkmain.h"
#include "gtkmarshalers.h" #include "gtkmarshalers.h"
#include "gtkmenubar.h" #include "gtkmenubar.h"
#include "gtkmenuitem.h" #include "gtkmenuitem.h"
#include "gtkmenushell.h" #include "gtkmenushell.h"
#include "gtkmnemonichash.h"
#include "gtktearoffmenuitem.h" #include "gtktearoffmenuitem.h"
#include "gtkwindow.h" #include "gtkwindow.h"
...@@ -112,9 +114,20 @@ typedef void (*GtkMenuShellSignal2) (GtkObject *object, ...@@ -112,9 +114,20 @@ typedef void (*GtkMenuShellSignal2) (GtkObject *object,
* Cancels the current selection * Cancels the current selection
*/ */
#define GTK_MENU_SHELL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_MENU_SHELL, GtkMenuShellPrivate))
typedef struct _GtkMenuShellPrivate GtkMenuShellPrivate;
struct _GtkMenuShellPrivate
{
GtkMnemonicHash *mnemonic_hash;
GtkKeyHash *key_hash;
};
static void gtk_menu_shell_class_init (GtkMenuShellClass *klass); static void gtk_menu_shell_class_init (GtkMenuShellClass *klass);
static void gtk_menu_shell_init (GtkMenuShell *menu_shell); static void gtk_menu_shell_init (GtkMenuShell *menu_shell);
static void gtk_menu_shell_realize (GtkWidget *widget); static void gtk_menu_shell_realize (GtkWidget *widget);
static void gtk_menu_shell_finalize (GObject *object);
static gint gtk_menu_shell_button_press (GtkWidget *widget, static gint gtk_menu_shell_button_press (GtkWidget *widget,
GdkEventButton *event); GdkEventButton *event);
static gint gtk_menu_shell_button_release (GtkWidget *widget, static gint gtk_menu_shell_button_release (GtkWidget *widget,
...@@ -125,6 +138,8 @@ static gint gtk_menu_shell_enter_notify (GtkWidget *widget, ...@@ -125,6 +138,8 @@ static gint gtk_menu_shell_enter_notify (GtkWidget *widget,
GdkEventCrossing *event); GdkEventCrossing *event);
static gint gtk_menu_shell_leave_notify (GtkWidget *widget, static gint gtk_menu_shell_leave_notify (GtkWidget *widget,
GdkEventCrossing *event); GdkEventCrossing *event);
static void gtk_menu_shell_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen);
static void gtk_menu_shell_add (GtkContainer *container, static void gtk_menu_shell_add (GtkContainer *container,
GtkWidget *widget); GtkWidget *widget);
static void gtk_menu_shell_remove (GtkContainer *container, static void gtk_menu_shell_remove (GtkContainer *container,
...@@ -154,6 +169,10 @@ static void gtk_real_menu_shell_cancel (GtkMenuShell *menu_shell) ...@@ -154,6 +169,10 @@ static void gtk_real_menu_shell_cancel (GtkMenuShell *menu_shell)
static void gtk_real_menu_shell_cycle_focus (GtkMenuShell *menu_shell, static void gtk_real_menu_shell_cycle_focus (GtkMenuShell *menu_shell,
GtkDirectionType dir); GtkDirectionType dir);
static void gtk_menu_shell_reset_key_hash (GtkMenuShell *menu_shell);
static gboolean gtk_menu_shell_activate_mnemonic (GtkMenuShell *menu_shell,
GdkEventKey *event);
static GtkContainerClass *parent_class = NULL; static GtkContainerClass *parent_class = NULL;
static guint menu_shell_signals[LAST_SIGNAL] = { 0 }; static guint menu_shell_signals[LAST_SIGNAL] = { 0 };
...@@ -202,12 +221,15 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass) ...@@ -202,12 +221,15 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
parent_class = g_type_class_peek_parent (klass); parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gtk_menu_shell_finalize;
widget_class->realize = gtk_menu_shell_realize; widget_class->realize = gtk_menu_shell_realize;
widget_class->button_press_event = gtk_menu_shell_button_press; widget_class->button_press_event = gtk_menu_shell_button_press;
widget_class->button_release_event = gtk_menu_shell_button_release; widget_class->button_release_event = gtk_menu_shell_button_release;
widget_class->key_press_event = gtk_menu_shell_key_press; widget_class->key_press_event = gtk_menu_shell_key_press;
widget_class->enter_notify_event = gtk_menu_shell_enter_notify; widget_class->enter_notify_event = gtk_menu_shell_enter_notify;
widget_class->leave_notify_event = gtk_menu_shell_leave_notify; widget_class->leave_notify_event = gtk_menu_shell_leave_notify;
widget_class->screen_changed = gtk_menu_shell_screen_changed;
container_class->add = gtk_menu_shell_add; container_class->add = gtk_menu_shell_add;
container_class->remove = gtk_menu_shell_remove; container_class->remove = gtk_menu_shell_remove;
...@@ -308,6 +330,8 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass) ...@@ -308,6 +330,8 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
GDK_F10, GDK_SHIFT_MASK, GDK_F10, GDK_SHIFT_MASK,
"cycle_focus", 1, "cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD); GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
g_type_class_add_private (object_class, sizeof (GtkMenuShellPrivate));
} }
static GType static GType
...@@ -319,6 +343,8 @@ gtk_menu_shell_child_type (GtkContainer *container) ...@@ -319,6 +343,8 @@ gtk_menu_shell_child_type (GtkContainer *container)
static void static void
gtk_menu_shell_init (GtkMenuShell *menu_shell) gtk_menu_shell_init (GtkMenuShell *menu_shell)
{ {
GtkMenuShellPrivate *priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell);
menu_shell->children = NULL; menu_shell->children = NULL;
menu_shell->active_menu_item = NULL; menu_shell->active_menu_item = NULL;
menu_shell->parent_menu_shell = NULL; menu_shell->parent_menu_shell = NULL;
...@@ -327,8 +353,26 @@ gtk_menu_shell_init (GtkMenuShell *menu_shell) ...@@ -327,8 +353,26 @@ gtk_menu_shell_init (GtkMenuShell *menu_shell)
menu_shell->have_xgrab = FALSE; menu_shell->have_xgrab = FALSE;
menu_shell->button = 0; menu_shell->button = 0;
menu_shell->activate_time = 0; menu_shell->activate_time = 0;
priv->mnemonic_hash = NULL;
priv->key_hash = NULL;
} }
static void
gtk_menu_shell_finalize (GObject *object)
{
GtkMenuShell *menu_shell = GTK_MENU_SHELL (object);
GtkMenuShellPrivate *priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell);
if (priv->mnemonic_hash)
_gtk_mnemonic_hash_free (priv->mnemonic_hash);
if (priv->key_hash)
_gtk_key_hash_free (priv->key_hash);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
void void
gtk_menu_shell_append (GtkMenuShell *menu_shell, gtk_menu_shell_append (GtkMenuShell *menu_shell,
GtkWidget *child) GtkWidget *child)
...@@ -563,11 +607,10 @@ gtk_menu_shell_button_release (GtkWidget *widget, ...@@ -563,11 +607,10 @@ gtk_menu_shell_button_release (GtkWidget *widget,
} }
static gint static gint
gtk_menu_shell_key_press (GtkWidget *widget, gtk_menu_shell_key_press (GtkWidget *widget,
GdkEventKey *event) GdkEventKey *event)
{ {
GtkMenuShell *menu_shell; GtkMenuShell *menu_shell;
GtkWidget *toplevel;
g_return_val_if_fail (GTK_IS_MENU_SHELL (widget), FALSE); g_return_val_if_fail (GTK_IS_MENU_SHELL (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE); g_return_val_if_fail (event != NULL, FALSE);
...@@ -580,12 +623,7 @@ gtk_menu_shell_key_press (GtkWidget *widget, ...@@ -580,12 +623,7 @@ gtk_menu_shell_key_press (GtkWidget *widget,
if (gtk_bindings_activate_event (GTK_OBJECT (widget), event)) if (gtk_bindings_activate_event (GTK_OBJECT (widget), event))
return TRUE; return TRUE;
toplevel = gtk_widget_get_toplevel (widget); return gtk_menu_shell_activate_mnemonic (menu_shell, event);
if (GTK_IS_WINDOW (toplevel) &&
gtk_window_activate_key (GTK_WINDOW (toplevel), event))
return TRUE;
return FALSE;
} }
static gint static gint
...@@ -673,6 +711,13 @@ gtk_menu_shell_leave_notify (GtkWidget *widget, ...@@ -673,6 +711,13 @@ gtk_menu_shell_leave_notify (GtkWidget *widget,
return TRUE; return TRUE;
} }
static void
gtk_menu_shell_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen)
{
gtk_menu_shell_reset_key_hash (GTK_MENU_SHELL (widget));
}
static void static void
gtk_menu_shell_add (GtkContainer *container, gtk_menu_shell_add (GtkContainer *container,
GtkWidget *widget) GtkWidget *widget)
...@@ -1218,3 +1263,120 @@ gtk_menu_shell_cancel (GtkMenuShell *menu_shell) ...@@ -1218,3 +1263,120 @@ gtk_menu_shell_cancel (GtkMenuShell *menu_shell)
g_signal_emit (menu_shell, menu_shell_signals[CANCEL], 0); g_signal_emit (menu_shell, menu_shell_signals[CANCEL], 0);
} }
static GtkMnemonicHash *
gtk_menu_shell_get_mnemonic_hash (GtkMenuShell *menu_shell,
gboolean create)
{
GtkMenuShellPrivate *private = GTK_MENU_SHELL_GET_PRIVATE (menu_shell);
if (!private->mnemonic_hash && create)
private->mnemonic_hash = _gtk_mnemonic_hash_new ();
return private->mnemonic_hash;
}
static void
menu_shell_add_mnemonic_foreach (guint keyval,
GSList *targets,
gpointer data)
{
GtkKeyHash *key_hash = data;
_gtk_key_hash_add_entry (key_hash, keyval, 0, GUINT_TO_POINTER (keyval));
}
static GtkKeyHash *
gtk_menu_shell_get_key_hash (GtkMenuShell *menu_shell,
gboolean create)
{
GtkMenuShellPrivate *private = GTK_MENU_SHELL_GET_PRIVATE (menu_shell);
GtkWidget *widget = GTK_WIDGET (menu_shell);
if (!private->key_hash && create && gtk_widget_has_screen (widget))
{
GtkMnemonicHash *mnemonic_hash = gtk_menu_shell_get_mnemonic_hash (menu_shell, FALSE);
GdkScreen *screen = gtk_widget_get_screen (widget);
GdkKeymap *keymap = gdk_keymap_get_for_display (gdk_screen_get_display (screen));
if (!mnemonic_hash)
return NULL;
private->key_hash = _gtk_key_hash_new (keymap, NULL);
_gtk_mnemonic_hash_foreach (mnemonic_hash,
menu_shell_add_mnemonic_foreach,
private->key_hash);
}
return private->key_hash;
}
static void
gtk_menu_shell_reset_key_hash (GtkMenuShell *menu_shell)
{
GtkMenuShellPrivate *private = GTK_MENU_SHELL_GET_PRIVATE (menu_shell);
if (private->key_hash)
{
_gtk_key_hash_free (private->key_hash);
private->key_hash = NULL;
}
}
static gboolean
gtk_menu_shell_activate_mnemonic (GtkMenuShell *menu_shell,
GdkEventKey *event)
{
GtkMnemonicHash *mnemonic_hash;
GtkKeyHash *key_hash;
GSList *entries;
gboolean result = FALSE;
mnemonic_hash = gtk_menu_shell_get_mnemonic_hash (menu_shell, FALSE);
if (!mnemonic_hash)
return FALSE;
key_hash = gtk_menu_shell_get_key_hash (menu_shell, TRUE);
if (!key_hash)
return FALSE;
entries = _gtk_key_hash_lookup (key_hash,
event->hardware_keycode,
event->state,
gtk_accelerator_get_default_mod_mask (),
event->group);
if (entries)
result = _gtk_mnemonic_hash_activate (mnemonic_hash,
GPOINTER_TO_UINT (entries->data));
return result;
}
void
_gtk_menu_shell_add_mnemonic (GtkMenuShell *menu_shell,
guint keyval,
GtkWidget *target)
{
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
g_return_if_fail (GTK_IS_WIDGET (target));
_gtk_mnemonic_hash_add (gtk_menu_shell_get_mnemonic_hash (menu_shell, TRUE),
keyval, target);
gtk_menu_shell_reset_key_hash (menu_shell);
}
void
_gtk_menu_shell_remove_mnemonic (GtkMenuShell *menu_shell,
guint keyval,
GtkWidget *target)
{
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
g_return_if_fail (GTK_IS_WIDGET (target));
_gtk_mnemonic_hash_remove (gtk_menu_shell_get_mnemonic_hash (menu_shell, TRUE),
keyval, target);
gtk_menu_shell_reset_key_hash (menu_shell);
}
...@@ -118,6 +118,13 @@ void _gtk_menu_shell_activate (GtkMenuShell *menu_shell); ...@@ -118,6 +118,13 @@ void _gtk_menu_shell_activate (GtkMenuShell *menu_shell);
gint _gtk_menu_shell_get_popup_delay (GtkMenuShell *menu_shell); gint _gtk_menu_shell_get_popup_delay (GtkMenuShell *menu_shell);
void gtk_menu_shell_cancel (GtkMenuShell *menu_shell); void gtk_menu_shell_cancel (GtkMenuShell *menu_shell);
void _gtk_menu_shell_add_mnemonic (GtkMenuShell *menu_shell,
guint keyval,
GtkWidget *target);
void _gtk_menu_shell_remove_mnemonic (GtkMenuShell *menu_shell,
guint keyval,
GtkWidget *target);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
......
/* gtkmnemonichash.c: Sets of mnemonics with cycling
*
* GTK - The GIMP Toolkit
* Copyright (C) 2002, Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "gtkmnemonichash.h"
struct _GtkMnemnonicHash
{
GHashTable *hash;
};
GtkMnemonicHash *
_gtk_mnemonic_hash_new (void)
{
GtkMnemonicHash *mnemonic_hash = g_new (GtkMnemonicHash, 1);
mnemonic_hash->hash = g_hash_table_new (g_direct_hash, NULL);
return mnemonic_hash;
}
static void
mnemonic_hash_free_foreach (gpointer key,
gpointer value,
gpointer user)
{
guint keyval = GPOINTER_TO_UINT (key);
GSList *targets = value;
gchar *name = gtk_accelerator_name (keyval, 0);
g_warning ("mnemonic \"%s\" wasn't removed for widget (%p)",
name, targets->data);
g_free (name);
g_slist_free (targets);
}
void
_gtk_mnemonic_hash_free (GtkMnemonicHash *mnemonic_hash)