summaryrefslogtreecommitdiff
path: root/gtk/gtkaccellabel.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* Practically everything changed.Cody Russell2008-06-301-1/+1
| | | | | | | | | | | | | 2008-06-30 Cody Russell <bratsche@gnome.org> * Practically everything changed. Change all references of GIMP Toolkit (and variations of it) to GTK+ Toolkit, showing no mercy at all to our beloved ancestry. (#540529) svn path=/trunk/; revision=20709
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 2008-06-21 Johan Dahlin <jdahlin@async.com.br> * *.[ch]: Include "config.h" instead of <config.h> Command used: find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g' Rubberstamped by Mitch and Tim svn path=/trunk/; revision=20669
* Bug 503071 – Application direction changes to right to left even ifBehdad Esfahbod2008-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-06-11 Behdad Esfahbod <behdad@gnome.org> Bug 503071 – Application direction changes to right to left even if theres no translation * configure.in: Bump glib requirement. * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): * gtk/gtkactiongroup.c (dgettext_swapped): * gtk/gtkbuilder.c (gtk_builder_class_init): * gtk/gtkbuilderparser.c (_dpgettext), (_gtk_builder_parser_translate): * gtk/gtkfilechooserdefault.c (list_size_data_func): * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): * gtk/gtkintl.h: * gtk/gtkmain.c (setlocale_initialization), (do_pre_parse_initialization), (gettext_initialization): * gtk/gtkstock.c (gtk_stock_lookup), (sgettext_swapped): Use g_dgettext() and g_dngettext(). svn path=/trunk/; revision=20358
* Bug 530353 – Mac-like gtk_accelerator_get_label()Richard Hult2008-05-261-1/+105
| | | | | | | | | | | | | | 2008-05-26 Richard Hult <richard@imendio.com> Bug 530353 – Mac-like gtk_accelerator_get_label() * gtk/gtkaccellabel.c: (gtk_accel_label_class_init), (append_keyval_symbol), (_gtk_accel_label_class_get_accelerator_label): On quartz, make gtk_accelerator_get_label() format a Mac-like string, using unicode characters for modifier keys, arrows, delete etc. Patch from Yevgen Muntyan. svn path=/trunk/; revision=20175
* Bug 503071 - Application direction changes to right to left even if theres14:27:34 Tim Janik2008-05-201-1/+1
| | | | | | | | | | | 2008-05-20 14:27:34 Tim Janik <timj@imendio.com> * reverted recent unapproved changes by Yair Hershkovitz, regarding: Bug 503071 - Application direction changes to right to left even if theres no translation. svn path=/trunk/; revision=20116
* call g_i18n_init() in gettext_initialization(). do gettext_initializationYair Hershkovitz2008-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | 2008-05-11 Yair Hershkovitz <yairhr@gmail.com> * gtk/gtkmain.c: call g_i18n_init() in gettext_initialization(). do gettext_initialization only once. * gtk/gtkbuilderparser.c: use glib i18n api. removed dpgettext() as it duplicates g_dpgettext() and added _g_dpgettext() to wrap g_dpgettext with the extended functionality that was in the removed dpgettext(). * gtk/gtkaccellabelc: * gtk/gtkstock.c: * gtk/gtkimmulticontext.c: * gtk/gtkactiongroup.c: * gtk/gtkintl.h: use glib i18n api. svn path=/trunk/; revision=20091
* add new boolean settings gtk-enable-accels and gtk-enable-mnemonics whichMichael Natterer2007-02-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | 2007-02-05 Michael Natterer <mitch@imendio.com> * gtk/gtksettings.c: add new boolean settings gtk-enable-accels and gtk-enable-mnemonics which enable/disable accelerators and mnemonics (bug #72375, based on a patch from Tommi Komulainen). * gtk/gtkwindow.c (gtk_window_activate_key) * gtk/gtkmenushell.c (gtk_menu_shell_key_press): don't invoke them if the resp. setting is FALSE. * gtk/gtkaccellabel.c (gtk_accel_label_refetch) * gtk/gtklabel.c (gtk_label_set_pattern_internal): don't display them if the setting is FALSE. * gtk/gtklabel.c: added signal connection to the screen's settings object and traverse all widgets on the screen when the setting changes. It's slightly ugly to also update GtkAccelLabels here, but less ugly than connecting and traversing all widgets twice. svn path=/trunk/; revision=17262
* Improve translators comments. (#389298, Christian Persch)Matthias Clasen2006-12-241-3/+6
| | | | | | | 2006-12-24 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccellabel.c: Improve translators comments. (#389298, Christian Persch)
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Boilerplate reductionMatthias Clasen2006-05-021-41/+9
|
* Various cleanups. (#315360, Kjartan Maraas)Matthias Clasen2005-09-131-4/+0
| | | | | | 2005-09-13 Matthias Clasen <mclasen@redhat.com> * gtk/*.c: Various cleanups. (#315360, Kjartan Maraas)
* Don't use GDK_ALT_MASK.Matthias Clasen2005-09-061-1/+1
| | | | | | | | | | 2005-09-06 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccelgroup.c (gtk_accelerator_parse): * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): Don't use GDK_ALT_MASK. * gdk/gdktypes.h: No need to introduce GDK_ALT_MASK
* Add tests for extra virtual modifiers.Matthias Clasen2005-09-061-1/+75
| | | | | | | | | | | | | | 2005-09-06 Matthias Clasen <mclasen@redhat.com> * tests/testgtk.c (create_key_lookup): Add tests for extra virtual modifiers. * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Try to match both against Mod2 - Mod5 and against Super, Hyper, Meta. * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): * gtk/gtkaccelgroup.c (gtk_accelerator_parse) (gtk_accelerator_name): Support Super, Hyper Meta and Mod2 - Mod5.
* Intern some more strings.Matthias Clasen2005-09-011-1/+1
| | | | | | | | | 2005-09-01 Matthias Clasen <mclasen@redhat.com> * gdk/*.c: Intern some more strings. * gtk/gtkintl.h: * gtk/*.c: Define an I_() macro and use it instead of the bulky g_intern_static_string().
* Intern type names in code generated by glib-mkenums, too.Matthias Clasen2005-08-311-1/+1
| | | | | | | | | | | | | 2005-08-31 Matthias Clasen <mclasen@redhat.com> * gdk/Makefile.am: * gtk/Makefile.am: Intern type names in code generated by glib-mkenums, too. * gtk/*.c: * gdk/x11/*.c: * gdk/*.c: Intern type names before registering the type to avoid unnecessary copies.
* Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)Matthias Clasen2005-06-131-16/+18
| | | | | | | 2005-06-13 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): Try harder not to modify readonly strings. (#307541, Torsten Schoenfeld)
* Don't modify strings returned from gettext().Matthias Clasen2005-06-111-2/+7
| | | | | | | 2005-06-10 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): Don't modify strings returned from gettext().
* Generate N_() calls for translatable key names.Matthias Clasen2005-06-101-10/+24
| | | | | | | | | | | | | | | | | 2005-06-10 Matthias Clasen <mclasen@redhat.com> * gdk/gen-keyname-table.pl: Generate N_() calls for translatable key names. * gdk/keynames.txt: Mark some key names as translatable. * gdk/keyname-table.h: Regenerated. * gtk/gtkaccellabel.c (gtk_accel_label_class_init): Add some context to the msg ids for keyboard modifiers and key names. (_gtk_accel_label_class_get_accelerator_label): Try to translate key names. (#300224, Christian Rose)
* Use canonical names for g_object_notify() as well.Matthias Clasen2005-03-261-2/+2
| | | | | | | | 2005-03-26 Matthias Clasen <mclasen@redhat.com> * gtk/*.c: * gdk/gdkdisplaymanager.c: Use canonical names for g_object_notify() as well.
* Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITEMatthias Clasen2005-03-221-4/+3
| | | | | | | | | | | | 2005-03-21 Matthias Clasen <mclasen@redhat.com> * gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like their G_ counterparts, but also mark the name, nick and blurb as static. * gtk/*.c: Mark param spec strings as static, using the new macros.
* : Mark param spec strings as static.Matthias Clasen2005-03-211-2/+4
|
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-1/+4
| | | | | | | | | | | | | | | | | | 2005-03-20 Matthias Clasen <mclasen@redhat.com> Make PLT-reduction work with gcc4, and don't include everything in gdkalias.h: * gtk/grk.symbols: Group symbols by header and source file. * gtk/makegtkalias.pl: Protect definitions by the same preprocessor symbols used to guard the headers. Move the alias declarations to a separate file which is produced when calling makegtkalias.pl -def * gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate this file. * gtk/*.c: Include gtkalias.h after the other headers, include gtkaliasdef.c at the bottom. * gtk/*.h: Small cleanups.
* More canonical property names.Matthias Clasen2005-03-091-2/+2
|
* Don't access label->layout directly. (#157080, Adam Hooper)Matthias Clasen2004-11-031-5/+6
| | | | | | | 2004-11-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Don't access label->layout directly. (#157080, Adam Hooper)
* Provide access to the string representation of accelerators used inMatthias Clasen2004-10-051-60/+74
| | | | | | | | | | | | | | | | | 2004-10-05 Matthias Clasen <mclasen@redhat.com> Provide access to the string representation of accelerators used in GtkAccelLabel. (#154068, John Spray) * gtk/gtkaccelgroup.h: * gtk/gtkaccelgroup.c (gtk_accelerator_get_label): New function to return the accelerator label used in GtkAccelLabel. (gtk_accelerator_name): Update docs to point to gtk_accelerator_get_label(). * gtk/gtkaccellabel.h: * gtk/gtkaccellabel.c (_gtk_accel_label_class_get_accelerator_label): New auxiliary function which creates the string representing the accelerator.
* Make accel labels ellipsize correctly. (#151559, Christian Persch)Matthias Clasen2004-09-011-0/+10
| | | | | | | Wed Sep 1 02:38:48 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Make accel labels ellipsize correctly. (#151559, Christian Persch)
* Add hidden aliases for exported symbols which are used internally in orderMatthias Clasen2004-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de> Add hidden aliases for exported symbols which are used internally in order to get rid of many PLT entries. (#145519, Arjan van de Ven) * gtk/Makefile.am: Add rules to generate gtk.def and from gtk.symbols, and make make check check the abi with abicheck.sh. (gtk_private_h_sources): Add gtkinternals.h (gtk_built_private_headers): Add gtkalias.h (gtk_extra_sources): Add gtk.symbols (EXTRA_DIST): Add makegtkalias.pl and abicheck.sh * gtk/gtk.symbols: New file. Definition of the GTK+ ABI. The file can be processed by cpp to filter out certain subsets of symbols. * gtk/abicheck.sh: New file. Script to check the actually symbols exported from libgtk-x11.2.0.so against the symbols found in gtk.symbols. * gtk/makegtkalias.pl: New file. Perl script to generate the header containing the alias definitions for internally used exported symbols from a list of symbols. * gtk/gtkinternals.h: New file. An uninstalled header listing symbols which must be exported for some reason and do not appear in any other header. * gtk/*.c: Include gtkalias.h
* Fixes #136082 and #135265, patch by Morten Welinder.Federico Mena Quintero2004-03-061-0/+1
| | | | | | | | | | 2004-03-05 Federico Mena Quintero <federico@ximian.com> Fixes #136082 and #135265, patch by Morten Welinder. * configure.in: Use AC_SYS_LARGEFILE. * */*.c: #include <config.h>
* Convert underscores in keyval names to spaces. (#131480)Owen Taylor2004-02-241-0/+14
| | | | | | | Tue Feb 24 17:51:49 2004 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c (gtk_accel_label_refetch): Convert underscores in keyval names to spaces. (#131480)
* The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog andMatthias Clasen2004-01-161-4/+4
| | | | | | | | | | | | | | | | | | | | Fri Jan 16 23:59:01 2004 Matthias Clasen <maclas@gmx.de> The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and po/ChangeLog): * gtk/gtkintl.h: * gdk-pixbuf/gdk-pixbuf-i18n.h: * gdk/gdkintl.h: Define P_() for property blurbs and nicks. * gdk/gdkdisplaymanager.c: * gdk-pixbuf/gdk-pixbuf.c: * modules/input/gtkimcontextxim.c: * gtk/*.c: Mark property blurbs and nicks with P_(). * po/Makefile.in.in: Add --keyword=P_ to the xgettext invocation, since property blurbs and nicks are now marked with P_().
* Implement Owen's susggestion from #80764. Fixes #101314.Soeren Sandmann2002-12-161-24/+48
| | | | | | | Mon Dec 16 17:20:02 2002 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtkaccellabel.c: Implement Owen's susggestion from #80764. Fixes #101314.
* Don't recalculate the acceleration label in an idle handler.Soeren Sandmann2002-12-141-37/+2
| | | | | | | Sat Dec 14 01:22:05 2002 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtkaccellabel.[ch] (gtk_accel_label_refetch): Don't recalculate the acceleration label in an idle handler.
* Automatic RTL flipping for some more widgets.Matthias Clasen2002-11-021-4/+12
|
* Fix use of uninitialized variable.Owen Taylor2002-10-181-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | Thu Oct 17 17:17:05 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkcheckbutton.c (gtk_check_button_size_request): Fix use of uninitialized variable. Thu Oct 17 14:38:37 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Align the baseline of the accelerator label with the first baseline of the main label of the menu item. (#76593) Wed Oct 16 18:25:24 2002 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkevents-x11.c (translate_key_event): Use gdk_keymap_translate_keyboard_state() rather than XLookupString() to get the keysymbol, since XLookupString can confuse the input method handling. (#93575) * gdk/x11/gdkkeys-x11.c: Rewrite the handling of key translation for the non-XKB case to properly handle Shift_Lock, Caps_Lock, Num_Lock according to the Xlib spec. (#67066)
* Deprecation cleanupManish Singh2002-10-111-23/+24
| | | | | | | | | | Fri Oct 11 15:56:20 2002 Manish Singh <yosh@gimp.org> * gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch] gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch] gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch] gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation cleanup
* Patch from Erwann Chenede, #73900 fixing a lot of warnings with Forte CC,Owen Taylor2002-03-201-2/+2
| | | | | | | | | | | Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com> * gtk/*.c: Patch from Erwann Chenede, #73900 fixing a lot of warnings with Forte CC, mostly implicit casts between void * and function pointers. * gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's state field is not a GdkModifierType. (Also #73900)
* Mark <Control>, <Shift>, <Release>, <Alt> for translation.Owen Taylor2002-02-271-3/+18
| | | | | | | | | | Wed Feb 27 18:01:03 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c (gtk_accelerator_name) po/POTFILES.in: Mark <Control>, <Shift>, <Release>, <Alt> for translation. * gtk/gtkfontsel.c: Mark PREVIEW_TEXT for translation. (Vlad Harchev, #53223)
* Register all stock icons "unscaled" so that we don't have icons onlyOwen Taylor2002-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkiconfactory.c: Register all stock icons "unscaled" so that we don't have icons only available at some sizes. (#68896) Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com> Some ASCII vs. locale fixes from Darin Adler (#55837) * gtk/gtkcombo.c (gtk_combo_find): Implement real case-insensitive comparison using g_utf8_casefold(). * gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix assignment of gunichar to char by replacing g_unichar_totitle with g_ascii_toupper ... the contents would only be ascii here anyways. * gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale) * gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts): Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
* Display any "g_unicode_isgraph()" char literally, not just latin1.Owen Taylor2002-02-261-6/+7
| | | | | | | | Tue Feb 26 18:38:17 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c (gtk_accel_label_refetch): Display any "g_unicode_isgraph()" char literally, not just latin1. (#65679)
* isspace -> g_ascii_isspace Remove gdki8n.h include. Remove <ctype.h>Darin Adler2002-02-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | * demos/gtk-demo/main.c: (load_file): isspace -> g_ascii_isspace * gdk/x11/gdkim-x11.c: Remove gdki8n.h include. * gdk/x11/gdkkeys-x11.c: Remove <ctype.h> include. * gdk/x11/gdkmain-x11.c: Remove <ctype.h> include. * gtk/fnmatch.c: Remove <ctype.h> include. * gtk/gtkaccelgroup.c: Remove <ctype.h> include. * gtk/gtkaccellabel.c: (gtk_accel_label_refetch): toupper -> g_unichar_toupper, toupper -> g_unichar_totile * gtk/gtkbindings.c: Remove <ctype.h> include. * gtk/gtkfontsel.c: Remove <ctype.h> include. * gtk/gtkiconfactory.c: Remove <ctype.h> include. * gtk/gtkinputdialog.c: Remove <ctype.h> include. * gtk/gtklabel.c: Remove <ctype.h> include. * gtk/gtkmain.c: Remove <ctype.h> include. * gtk/gtkmenu.c: Remove <ctype.h> include. * gtk/gtkoldeditable.c: Remove <ctype.h> include. * gtk/gtkrc.c: Remove <ctype.h> include. * gtk/gtktextbtree.c: Remove <ctype.h> include. * gtk/gtktextiter.c: Remove <ctype.h> include. * gtk/gtktextsegment.c: Remove <ctype.h> include.
* Remove excess calls to g_return_if_fail from static and virtual functions.Matthias Clasen2002-01-301-19/+4
|
* Replace GTK_NO_CHECK_CASTS by G_DISABLE_CAST_CHECKS.Matthias Clasen2002-01-071-0/+8
| | | | | | | | | | | | | | | | | | * docs/debugging.txt: Replace GTK_NO_CHECK_CASTS by G_DISABLE_CAST_CHECKS. * gtk/gtkaccelgroup.c (gtk_accel_group_from_accel_closure, gtk_accel_group_query, gtk_accel_group_find, gtk_accel_groups_from_object): Document. * gtk/gtkaccellabel.c (gtk_accel_label_set_accel_closure): Document. * gtk/tmpl/gtktypeutils.sgml: Replace GTK_NO_CHECK_CASTS by G_DISABLE_CAST_CHECKS, fix some markup and add stuff. * gtk/tmpl/gtkaccelgroup.sgml, gtk/tmpl/gtkwidget.sgml: Additions. * gtk/gtk-sections.txt: Make gtk_accel_group_get_type private.
* Fix some warnings.Darin Adler2001-12-151-1/+0
| | | | | | | | | | | * gdk/x11/gdkproperty-x11.c: (gdk_property_get): Fix wrong type in g_new -- bug if sizeof (GtkAtom) != sizeof (GtkAtom *). * gdk/x11/gdkwindow-x11.c: (create_moveresize_window): FALSE -> NULL * gtk/gtkaccellabel.c: (gtk_accel_label_refetch): Remove unused local. * gtk/gtklistitem.c: (gtk_list_item_expose): Remove unused local. * gtk/gtktextiter.c: (_gtk_text_iter_backward_indexable_segment): Restructure loop to get rid of uninitialized variable warning. Also gives a tiny efficiency gain.
* Forgotten file.Matthias Clasen2001-12-061-0/+7
|
* Return FALSE from expose handlers.Alex Larsson2001-12-031-1/+1
| | | | | | | | | | | | | | | 2001-12-03 Alex Larsson <alexl@redhat.com> * gtk/gtkaccellabel.c: * gtk/gtkarrow.c: * gtk/gtkcolorsel.c: * gtk/gtkcontainer.c: * gtk/gtklabel.c: * gtk/gtktextview.c: * gtk/gtktogglebutton.c: * gtk/gtktreeview.c: * gtk/gtkwindow.c: Return FALSE from expose handlers.
* Remove improper use of g_locale_to_utf8() to convert from latin-1, and doOwen Taylor2001-11-291-8/+1
| | | | | | | | Wed Nov 28 20:05:44 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkaccellabel.c (gtk_accel_label_refetch): Remove improper use of g_locale_to_utf8() to convert from latin-1, and do it the easy way by building the string correctly in the first place.
* applied patch from owen to get rid of accel map notifiers. changed thingsTim Janik2001-11-201-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tue Nov 20 21:25:08 2001 Tim Janik <timj@gtk.org> * applied patch from owen to get rid of accel map notifiers. changed things to fix reentrancy and API as discussed on gtk-devel. * gtk/gtkaccelgroup.[hc]: (gtk_accel_group_finalize): unregister this accel group from all accel map paths. (accel_closure_invalidate): handle invalidation of closures by disconnecting their accelerators. (quick_accel_add): move closure connection and changed notification into this function to reduce code duplication. don't emit change notification on closurers without accelerators. (quick_accel_remove): rewrite, do the exact opposite of quick_accel_add for a GtkAccelGroupEntry. (gtk_accel_group_connect): get rid of the accel_path_quark argument. (gtk_accel_group_connect_by_path): new function to add accelerators with an accel path. (gtk_accel_group_disconnect_closure): new function, disconnect a closure from of an accel group. (gtk_accel_group_disconnect): loop over all closure for a accel_ley, accel_mods pair and remove them. (_gtk_accel_group_reconnect): new function that basically does gtk_accel_group_disconnect_closure() and gtk_accel_group_connect_by_path() once an accel path changed. (gtk_accel_groups_disconnect_closure): remove this, there's gtk_accel_group_disconnect_closure(). * gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now, nuke notifiers. (_gtk_accel_path_is_valid): make this non-static for gtkwidget.c and gtkaccelgroup.c assertions. (gtk_accel_map_add_notifer): removed this function. (gtk_accel_map_remove_notifer): same. (_gtk_accel_map_add_group): (_gtk_accel_map_remove_group): (un-)register accel groups, with accel paths for correct propagation. (gtk_accel_map_add_entry): return void. (gtk_accel_map_lookup): return gboolean instead of GQuark. * gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always set accel_path on widgets. * gtk/gtkwidget.[hc]: (accel_path_changed): got rid of this, changes are handled by accel maps internally now. (_gtk_widget_set_accel_path): get things to work without notifiers. (gtk_widget_list_accel_closures): list accel closures of a widget. * gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
* fix allocation to be relative to paned->allocation, now that this is aTim Janik2001-11-201-5/+5
| | | | | | | | | | | | Tue Nov 20 14:49:59 2001 Tim Janik <timj@gtk.org> * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): fix allocation to be relative to paned->allocation, now that this is a NO_WINDOW widget. * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): same here. * gtk/gtkaccellabel.c (gtk_accel_label_class_init): ::closure needs to be a boxed property.
* added gtkaccelmap.sgml. other updates.Tim Janik2001-11-131-155/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.