Commit b21fe174 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

New function to emit the "cancel" signal on a menu shell.

Sun Dec 21 01:54:40 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenushell.h:
	* gtk/gtkmenushell.c (gtk_menu_shell_cancel): New function
	to emit the "cancel" signal on a menu shell.

	* gtk/gtkmenu.c (gtk_menu_key_press):
	* gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
	* gtk/gtkmenubar.c (_gtk_menu_bar_cycle_focus): Use the
	new function instead of directly emitting the
	signal.  (#81803, Owen Taylor)
parent f3faa16d
Sun Dec 21 01:54:40 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenushell.h:
* gtk/gtkmenushell.c (gtk_menu_shell_cancel): New function
to emit the "cancel" signal on a menu shell.
* gtk/gtkmenu.c (gtk_menu_key_press):
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
* gtk/gtkmenubar.c (_gtk_menu_bar_cycle_focus): Use the
new function instead of directly emitting the
signal. (#81803, Owen Taylor)
Sun Dec 21 00:39:50 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
Fix the "language_set" blurb. (#129720, Christian Rose)
Fix the "language_set" blurb.
Sat Dec 20 22:06:03 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): do not invalidate
......
Sun Dec 21 01:54:40 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenushell.h:
* gtk/gtkmenushell.c (gtk_menu_shell_cancel): New function
to emit the "cancel" signal on a menu shell.
* gtk/gtkmenu.c (gtk_menu_key_press):
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
* gtk/gtkmenubar.c (_gtk_menu_bar_cycle_focus): Use the
new function instead of directly emitting the
signal. (#81803, Owen Taylor)
Sun Dec 21 00:39:50 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
Fix the "language_set" blurb. (#129720, Christian Rose)
Fix the "language_set" blurb.
Sat Dec 20 22:06:03 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): do not invalidate
......
Sun Dec 21 01:54:40 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenushell.h:
* gtk/gtkmenushell.c (gtk_menu_shell_cancel): New function
to emit the "cancel" signal on a menu shell.
* gtk/gtkmenu.c (gtk_menu_key_press):
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
* gtk/gtkmenubar.c (_gtk_menu_bar_cycle_focus): Use the
new function instead of directly emitting the
signal. (#81803, Owen Taylor)
Sun Dec 21 00:39:50 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
Fix the "language_set" blurb. (#129720, Christian Rose)
Fix the "language_set" blurb.
Sat Dec 20 22:06:03 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): do not invalidate
......
Sun Dec 21 01:54:40 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenushell.h:
* gtk/gtkmenushell.c (gtk_menu_shell_cancel): New function
to emit the "cancel" signal on a menu shell.
* gtk/gtkmenu.c (gtk_menu_key_press):
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
* gtk/gtkmenubar.c (_gtk_menu_bar_cycle_focus): Use the
new function instead of directly emitting the
signal. (#81803, Owen Taylor)
Sun Dec 21 00:39:50 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
Fix the "language_set" blurb. (#129720, Christian Rose)
Fix the "language_set" blurb.
Sat Dec 20 22:06:03 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): do not invalidate
......
Sun Dec 21 01:54:40 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkmenushell.h:
* gtk/gtkmenushell.c (gtk_menu_shell_cancel): New function
to emit the "cancel" signal on a menu shell.
* gtk/gtkmenu.c (gtk_menu_key_press):
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
* gtk/gtkmenubar.c (_gtk_menu_bar_cycle_focus): Use the
new function instead of directly emitting the
signal. (#81803, Owen Taylor)
Sun Dec 21 00:39:50 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
Fix the "language_set" blurb. (#129720, Christian Rose)
Fix the "language_set" blurb.
Sat Dec 20 22:06:03 2003 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): do not invalidate
......
Sun Dec 21 01:58:33 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_menu_shell_cancel.
Thu Dec 18 01:24:35 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_message_dialog_set_markup
......
......@@ -1983,6 +1983,7 @@ gtk_menu_shell_select_item
gtk_menu_shell_select_first
gtk_menu_shell_deselect
gtk_menu_shell_activate_item
gtk_menu_shell_cancel
GtkMenuDirectionType
<SUBSECTION Standard>
GTK_MENU_SHELL
......
......@@ -2461,9 +2461,7 @@ gtk_menu_key_press (GtkWidget *widget,
*/
if (event->keyval == keyval &&
(mods & event->state) == mods)
{
g_signal_emit_by_name (menu, "cancel", 0);
}
gtk_menu_shell_cancel (menu_shell);
g_free (accel);
......
......@@ -582,7 +582,7 @@ _gtk_menu_bar_cycle_focus (GtkMenuBar *menubar,
g_list_free (menubars);
}
g_signal_emit_by_name (menubar, "cancel", 0);
gtk_menu_shell_cancel (GTK_MENU_SHELL (menubar));
if (to_activate)
g_signal_emit_by_name (to_activate, "activate_item");
......
......@@ -1182,3 +1182,19 @@ _gtk_menu_shell_get_popup_delay (GtkMenuShell *menu_shell)
return popup_delay;
}
}
/**
* gtk_menu_shell_cancel:
* @menu_shell: a #GtkMenuShell
*
* Cancels the selection within the menu shell.
*
* Since: 2.4
*/
void
gtk_menu_shell_cancel (GtkMenuShell *menu_shell)
{
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
g_signal_emit (menu_shell, menu_shell_signals[CANCEL], 0);
}
......@@ -116,6 +116,7 @@ void _gtk_menu_shell_select_last (GtkMenuShell *menu_shell,
gboolean search_sensitive);
void _gtk_menu_shell_activate (GtkMenuShell *menu_shell);
gint _gtk_menu_shell_get_popup_delay (GtkMenuShell *menu_shell);
void gtk_menu_shell_cancel (GtkMenuShell *menu_shell);
#ifdef __cplusplus
}
......
......@@ -305,7 +305,7 @@ gtk_option_menu_remove_menu (GtkOptionMenu *option_menu)
if (option_menu->menu)
{
if (GTK_MENU_SHELL (option_menu->menu)->active)
g_signal_emit_by_name (option_menu->menu, "cancel", 0);
gtk_menu_shell_cancel (GTK_MENU_SHELL (option_menu->menu));
gtk_menu_detach (GTK_MENU (option_menu->menu));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment