forked from AuroraMiddleware/gtk
Restructure the code to make sense, and don't leak an empty accel.
2007-07-24 Matthias Clasen <mclasen@redhat.com> * gtk/gtkmenubar.c (window_key_press_handler): * gtk/gtkmenu.c (gtk_menu_key_press): Restructure the code to make sense, and don't leak an empty accel. (#459515, Owen Taylor) svn path=/trunk/; revision=18535
This commit is contained in:
parent
17aacf414d
commit
55c23d2b22
@ -1,3 +1,9 @@
|
||||
2007-07-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkmenubar.c (window_key_press_handler):
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): Restructure the code
|
||||
to make sense, and don't leak an empty accel. (#459515, Owen Taylor)
|
||||
|
||||
2007-07-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktooltip.c (gtk_tooltip_set_custom): Protect against
|
||||
|
@ -2786,7 +2786,6 @@ gtk_menu_key_press (GtkWidget *widget,
|
||||
{
|
||||
guint keyval = 0;
|
||||
GdkModifierType mods = 0;
|
||||
gboolean handled = FALSE;
|
||||
|
||||
gtk_accelerator_parse (accel, &keyval, &mods);
|
||||
|
||||
@ -2797,15 +2796,15 @@ gtk_menu_key_press (GtkWidget *widget,
|
||||
* thing, to properly consider i18n etc., but that probably requires
|
||||
* AccelGroup changes etc.
|
||||
*/
|
||||
if (event->keyval == keyval &&
|
||||
(mods & event->state) == mods)
|
||||
gtk_menu_shell_cancel (menu_shell);
|
||||
|
||||
g_free (accel);
|
||||
|
||||
if (handled)
|
||||
return TRUE;
|
||||
if (event->keyval == keyval && (mods & event->state) == mods)
|
||||
{
|
||||
gtk_menu_shell_cancel (menu_shell);
|
||||
g_free (accel);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (accel);
|
||||
|
||||
switch (event->keyval)
|
||||
{
|
||||
|
@ -634,10 +634,10 @@ window_key_press_handler (GtkWidget *widget,
|
||||
retval = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (accel);
|
||||
}
|
||||
|
||||
g_free (accel);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user