added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:06:38 2001 Tim Janik <timj@gtk.org> * added gtkaccelmap.sgml. other updates. Mon Nov 12 23:08:37 2001 Tim Janik <timj@gtk.org> * gtk/maketypes.awk: fix type utils generation on unix. * gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator registry. * gtk/gtkaccelgroup.[hc]: major API/implementation revamp: removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default, gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry, gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove, gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object. introduced ::accel_changed signal for change notification, and gtk_accel_group_connect/disconnect to connect closures to accel groups. made gtk_accel_group_attach/detach and gtk_accel_group_activate private functions. deprecated gtk_accel_group_ref/unref. * gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention to accel group changed notification and basically operate on closures. removed gtk_accel_label_get_accel_object and gtk_accel_label_set_accel_object. introduced gtk_accel_label_set_accel_closure, and for convenience, gtk_accel_label_set_accel_widget. * gtk/gtkitemfactory.[hc]: removed accelerator propagation code which mostly moved into gtkaccelmap.[hc]. removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_* and gtk_item_factory_print_func. * gtk/gtkmain.c: call _gtk_accel_map_init(). * gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(), that associates an accelerator path with menu items, through which persistent accelerator settings on menu items are enabled. * gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator paths of menu item can be default constructed to allow installation of accelerators on menu items that don't come with an accelerator binding by default. * gtk/gtksettings.c: fix STRING type rc settings by special casing them appropriately in the parser. * gtk/gtksignal.[hc]: allow a class function offset of 0 for gtk_signal_newv(). * gtk/gtkwidget.[hc]: accelerator API revamp. removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal, gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and gtk_widget_(un)lock_accelerators. accelerators maintained through gtk_widget_add/remove_accelerator() are not runtime changable now, the correct sequence to setup a widget for runtime changable accelerators is now: gtk_accel_map_add_entry(accel_path, key, mods); _gtk_widget_set_accel_path(widget, accel_path, accel_group); * gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel group changes (as well as mnemonic changes) through the new signal ::accels_changed. Sat Nov 10 12:08:56 2001 Tim Janik <timj@gtk.org> * gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle GString->string conversions.
This commit is contained in:
@ -3047,7 +3047,7 @@ create_menus (void)
|
||||
NULL);
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_accel_group_attach (accel_group, G_OBJECT (window));
|
||||
gtk_window_add_accel_group (window, accel_group);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "menus");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
@ -3103,7 +3103,7 @@ create_menus (void)
|
||||
accel_group,
|
||||
GDK_F1,
|
||||
0,
|
||||
GTK_ACCEL_VISIBLE | GTK_ACCEL_SIGNAL_VISIBLE);
|
||||
GTK_ACCEL_VISIBLE);
|
||||
menuitem = gtk_check_menu_item_new_with_label ("Accelerator Locked");
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
@ -3128,7 +3128,6 @@ create_menus (void)
|
||||
GDK_F3,
|
||||
0,
|
||||
GTK_ACCEL_VISIBLE);
|
||||
gtk_widget_lock_accelerators (menuitem);
|
||||
|
||||
optionmenu = gtk_option_menu_new ();
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu);
|
||||
@ -3287,7 +3286,7 @@ dump_accels (gpointer callback_data,
|
||||
guint callback_action,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
gtk_item_factory_dump_items (NULL, FALSE, gtk_item_factory_print_func, stdout);
|
||||
gtk_accel_map_save_fd (1 /* stdout */);
|
||||
}
|
||||
|
||||
static GtkItemFactoryEntry menu_items[] =
|
||||
@ -3360,7 +3359,7 @@ create_item_factory (void)
|
||||
"<main>",
|
||||
item_factory,
|
||||
(GtkDestroyNotify) gtk_object_unref);
|
||||
gtk_accel_group_attach (accel_group, G_OBJECT (window));
|
||||
gtk_window_add_accel_group (window, accel_group);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Item Factory");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
|
||||
|
||||
@ -26,6 +26,9 @@ double-click_timeout = 42
|
||||
bell-duration = 39
|
||||
bell_duration = 40
|
||||
|
||||
gtk-cursor-blink-time = 200
|
||||
# gtk-menu-bar-accel = F10
|
||||
|
||||
style "global-style-properties"
|
||||
{
|
||||
# xthickness = 20
|
||||
|
||||
Reference in New Issue
Block a user