summaryrefslogtreecommitdiff
path: root/gtk/gtkaccellabel.c
Commit message (Collapse)AuthorAgeFilesLines
* GtkAccelLabel: adjust recent accel changesRyan Lortie2012-09-181-8/+22
| | | | | | | | | | In the event that a GtkAccelKey was present for the closure but it contained a keyval of 0 the previous code would show "". After the recent adjustments, "-/-" would be shown in this case. It turns out to be a pretty common case, so fix the logic to stop using '0' as a magic value to mean "don't have an accel" and add a separate boolean for that purpose.
* GtkAccelLabel: add manual accel APIRyan Lortie2012-09-171-6/+48
| | | | | | | | | | | | | | | | | Add an API to GtkAccelLabel for hardcoding the accel key to be displayed (ie: allowing us to bypass the GtkAccelGroup lookup). Use that from the GMenuModel-based GtkMenu construction code instead of passing around the accel group. This makes accel labels work in bloatpad again. This patch effectively removes any hope of automatic runtime accel changes in GMenuModel-based menus without additional application support but it leaves the door open for this to be supported again in the future (if we decide that it's important). https://bugzilla.gnome.org/show_bug.cgi?id=683738
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* accellabel: Stop setting state flags on the style context for drawingRui Matos2011-12-191-1/+0
|
* Use a weak ref in GtkAccelLabelMatthias Clasen2011-08-241-18/+34
| | | | | | | GtkAccelLabel was holding a strong reference on its parent, which could, depending on the circumstances, lead to leaks. https://bugzilla.gnome.org/show_bug.cgi?id=344858
* accellabel: Use gtk_widget_class_set_accessible_role()Benjamin Otte2011-07-181-0/+2
|
* gtkaccellabel: Do not use GET_PRIV macroJavier Jardón2011-06-021-5/+6
|
* Fix an exampleMatthias Clasen2011-05-311-1/+1
|
* accellabel: Remove leftover debug codeBenjamin Otte2011-05-021-1/+1
| | | | | | | The disabling of the check was added in 63a0ab5e73a618e4fe907f69a1bd6a74cb399dc2 Ooops.
* accellabel: Only daw accelerator after natural size has been reachedBenjamin Otte2011-05-011-2/+2
|
* GtkAccelLabel: Improve struct packingMatthias Clasen2011-04-121-2/+2
|
* Don't try to modify readonly stringsMatthias Clasen2011-02-091-22/+22
| | | | | | | | This was an oversight in the recent accel label improvement. When we get an untranslated string back from gettext(), it is not ok to replace '_' by ' ' in-place. Instead, do it while appending to the GString. https://bugzilla.gnome.org/show_bug.cgi?id=641912
* Strip XF86 prefix from untranslated keysymsMatthias Clasen2011-02-041-2/+17
| | | | | When we don't have translations, at least remove the ugly XF86 prefix.
* Remove latest bits of GtkItemFactoryJavier Jardón2011-02-041-1/+1
|
* Drop explicit includes of gdkkeysyms.hMatthias Clasen2011-01-041-2/+0
| | | | | These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h to use the new GDK_KEY_ symbols.
* Make GtkAccelLabel use GtkStyleContext.Carlos Garnacho2010-12-241-8/+8
|
* Move destroy signal to GtkWidgetJavier Jardón2010-09-261-9/+7
| | | | Also make GtkWidget derive from GInitiallyUnowned
* accellabel: Remove gtk_widget_is_drawable() check from draw vfuncBenjamin Otte2010-09-261-70/+65
|
* Move GtkSizeRequest into GtkWidgetBenjamin Otte2010-09-261-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make sense to keep them separate as GtkSizeRequest requires a GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have one without the other. It also makes the code a lot easier because no casts are required when calling functions. Also, the names would translate to gtk_widget_get_width() and people agreed that this would be a too generic name, so a "preferred" was added to the names. So this patch moves the functions: gtk_size_request_get_request_mode() => gtk_widget_get_request_mode() gtk_size_request_get_width() => gtk_widget_get_preferred_width() gtk_size_request_get_height() => gtk_widget_get_preferred_height() gtk_size_request_get_size() => gtk_widget_get_preferred_size() gtk_size_request_get_width_for_height() => gtk_widget_get_preferred_width_for_height() gtk_size_request_get_height_for_width() => gtk_widget_get_preferred_height_for_width() ... and moves the corresponding vfuncs to the GtkWidgetClass. The patch also renames the implementations of the vfuncs in widgets to include the word "preferrred".
* API: Rename gtk_cairo_paint_*() to gtk_paint_*()Benjamin Otte2010-09-261-1/+1
| | | | | | Large patch, but just renaming. Indentation should still mostly be correct because I took care of keeping the indentation for this function name.
* accellabel: Port to draw vfuncBenjamin Otte2010-09-261-20/+26
|
* Tons of transfer annotationsMatthias Clasen2010-09-211-1/+1
|
* Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()Javier Jardón2010-09-151-1/+2
| | | | | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598 Signed-off-by: Javier Jardón <jjardon@gnome.org> Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
* Update for GDK key name changesKristian Rietveld2010-09-131-13/+13
|
* Fixed accel label to do its derived work in ->get_width() instead of the old ↵Tristan Van Berkom2010-08-181-10/+28
| | | | ->size_request()
* gtkaccellabel: Remove unused class membersJavier Jardón2010-08-101-5/+1
| | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=97414
* gtk/: fully remove gtkalias hacksJavier Jardón2010-07-101-4/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=623845
* Fix compilation warning: cast to GTK_WIDGETJavier Jardón2010-05-031-1/+1
|
* Move GSEAL'd members of GtkAccelLabel into private struct.Cody Russell2010-05-031-64/+88
|
* Don't use GTK_WIDGET_STATE in internal code anymoreJavier Jardón2010-03-091-1/+1
| | | | | | Use gtk_widget_get/set_state() instead https://bugzilla.gnome.org/show_bug.cgi?id=69872
* Deprecate widget flag: GTK_WIDGET_DRAWABLEJavier Jardón2010-03-011-1/+1
| | | | | | Use gtk_widget_is_drawable() instead. https://bugzilla.gnome.org/show_bug.cgi?id=69872
* Move documentation to inline comments: GtkAccelLabelJavier Jardón2010-02-091-2/+84
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=403485
* More conversion to C_()Matthias Clasen2008-10-271-7/+3
| | | | svn path=/trunk/; revision=21717
* Use C_() instead of Q_(). String change!Matthias Clasen2008-10-271-19/+8
| | | | | | | | | | | | | | | | 2008-10-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkaccellabel.c: * gtk/gtkcalendar.c: * gtk/gtkcellrendereraccel.c: * gtk/gtkcellrendererprogress.c: * gtk/gtkimmulticontext.c: * gtk/gtkrecentchoosermenu.c: * gtk/gtkvolumebutton.c: Use C_() instead of Q_(). String change! svn path=/trunk/; revision=21716
* gtk/gtkaccellabel.c gtk/gtkaction.c gtk/gtkclist.c gtk/gtkcolorbutton.cSven Neumann2008-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-12 Sven Neumann <sven@gimp.org> * gtk/gtkaccellabel.c * gtk/gtkaction.c * gtk/gtkclist.c * gtk/gtkcolorbutton.c * gtk/gtkctree.c * gtk/gtkdialog.c * gtk/gtkdnd-quartz.c * gtk/gtkdnd.c * gtk/gtkentry.c * gtk/gtkfilechooserdefault.c * gtk/gtkfilesel.c * gtk/gtkgamma.c * gtk/gtkiconview.c * gtk/gtkkeyhash.c * gtk/gtklabel.c * gtk/gtkmenu.c * gtk/gtkmenubar.c * gtk/gtkpaned.c * gtk/gtkrecentchooserdialog.c * gtk/gtkrecentchooserutils.c * gtk/gtkselection.c * gtk/gtksizegroup.c * gtk/gtktextbtree.c * gtk/gtktextbuffer.c * gtk/gtktextview.c * gtk/gtktoolbar.c * gtk/gtktreemodel.c * gtk/gtkuimanager.c * gtk/gtkwindow-decorate.c * gtk/gtkwindow.c: use canonical signal names in some more places that I missed earlier. Also changed this in the documentation and comments. svn path=/trunk/; revision=21094
* gtk/gtkaccellabel.c gtk/gtkcalendar.c gtk/gtkclist.c gtk/gtkentry.cMichael Natterer2008-08-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-12 Michael Natterer <mitch@imendio.com> * gtk/gtkaccellabel.c * gtk/gtkcalendar.c * gtk/gtkclist.c * gtk/gtkentry.c * gtk/gtkeventbox.c * gtk/gtkfilechooserbutton.c * gtk/gtkfilechooserdefault.c * gtk/gtkhandlebox.c * gtk/gtkhsv.c * gtk/gtkiconview.c * gtk/gtkimage.c * gtk/gtklayout.c * gtk/gtklistitem.c * gtk/gtkmenuitem.c * gtk/gtkmessagedialog.c * gtk/gtknotebook.c * gtk/gtkpaned.c * gtk/gtkpathbar.c * gtk/gtkplug.c * gtk/gtkprintunixdialog.c * gtk/gtkrange.c * gtk/gtkrecentchooserdefault.c * gtk/gtkruler.c * gtk/gtksocket.c * gtk/gtktext.c * gtk/gtktextview.c * gtk/gtktoolbar.c * gtk/gtktreeitem.c * gtk/gtktreeview.c * gtk/gtkviewport.c * gtk/gtkwin32embedwidget.c: chain up unconditionally in realize(), unrealize(), map(), unmap(), style_set(), key_press_event() and size_request() svn path=/trunk/; revision=21088
* 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.