summaryrefslogtreecommitdiff
path: root/gtk/gtkbutton.c
Commit message (Collapse)AuthorAgeFilesLines
* Make stock buttons have mnemonics againMatthias Clasen2009-07-011-13/+13
| | | | | We used to treat stock buttons as having an implicit use-underline. A recent but fix lost that.
* Fix an oversight in mnemonic handlingMatthias Clasen2009-06-181-3/+8
| | | | | In some situations, GtkButton would ignore the use-underline property. This was reported in bug 586330.
* Rename gtk_activatable_reset to gtk_activatable_sync_action_properties,Matthias Clasen2009-02-221-25/+25
| | | | | | | | | | * gtk/gtk.symbols: * gtk/gtkactivatable.[hc]: Rename gtk_activatable_reset to gtk_activatable_sync_action_properties, since the previous name was deemed too generic. Update all implementations. svn path=/trunk/; revision=22389
* Activate the action in a regular clicked handler instead of the defaultMatthias Clasen2009-01-271-29/+35
| | | | | | | | | * gtk/gtkbutton.c: Activate the action in a regular clicked handler instead of the default handler, to make it work with derived classes which don't chain up their clicked handler. svn path=/trunk/; revision=22227
* i Bug 560228 – Add "action-controller" property to GtkWidgetClassMatthias Clasen2009-01-231-7/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the way actions and proxies interact, to make the interaction less ad hoc, more extensible, and better suited for support in GUI builders like glade. To be used as a proxy, a widget must now implement the GtkActivatable interface, and GtkActivatable implementations are responsible for syncing their appearance with the action and for activating the action. All the widgets that are commonly used as proxies implement GtkActivatable now. Patch by Tristan van Berkom. * gtk/gtkactivatable.[hc]: The GtkActivatable interface. * gtk/gtkbutton.c: * gtk/gtktogglebutton.c: * gtk/gtktoolitem.c: * gtk/gtktoolbutton.c: * gtk/gtktoggletoolbutton.c: * gtk/gtkmenuitem.c: * gtk/gtkcheckmenuitem.c: * gtk/gtkimagemenuitem.c: * gtk/gtkradiomenuitem.c: * gtk/gtkrecentchooserprivate.h: * gtk/gtkrecentchooser.c: * gtk/gtkrecentchooserdefault.c: * gtk/gtkrecentchoosermenu.c: Implement GtkActivatable. * gtk/gtkaction.[hc]: Move appearance synchronization to GtkActivatable implementations. * gtk/gtkradioaction.c: * gtk/gtkrecentaction.c: * gtk/gtktoggleaction.c: * gtk/gtkactiongroup.c: Adapt. * gtk/gtk.h: Include gtkactivatable.h * gtk/gtk.symbols: Add new functions svn path=/trunk/; revision=22195
* Improve documentation of "gtk-button-images" settingChristian Dywan2008-08-151-5/+5
| | | | svn path=/trunk/; revision=21123
* consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance)Michael Natterer2008-08-121-8/+8
| | | | | | | | | | | 2008-08-12 Michael Natterer <mitch@imendio.com> * gtk/*.c: consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance) instead of (*GTK_FOO_CLASS(parent_class))->bar(instance). svn path=/trunk/; revision=21085
* Bug 56070 – Can't click button after setting it sensitive.Cody Russell2008-08-011-1/+2
| | | | | | | | | | | | | | | | | | | | | 2008-07-31 Cody Russell <bratsche@gnome.org> Bug 56070 – Can't click button after setting it sensitive. * gtk/gtkwidget.[ch] * gtk/gtkwindow.c * gtk/gtkmain.c * gtk/gtkbutton.c * gtk/gtkprivate.h * gdk/gdkevents.h: Synthesize crossing events events where necessary. * gtk/tests/crossingevents.c: Add unit tests for crossing events. Big thanks to Ed Catmur, Matthias Clasen, and everyone else who has worked on and helped out with this. svn path=/trunk/; revision=20924
* 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
* Document a style propertyJohan Dahlin2008-06-211-3/+9
| | | | | | | | | 2008-06-20 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbutton.c: Document a style property svn path=/trunk/; revision=20664
* Fix up deprecated markup syntax. Add version numbers and a message on theJohan Dahlin2008-06-201-4/+4
| | | | | | | | | | | | | | | 2008-06-20 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkbutton.c: * gtk/gtkcolorsel.c: * gtk/gtkentry.c: * gtk/gtkitemfactory.c: * gtk/gtknotebook.c: Fix up deprecated markup syntax. Add version numbers and a message on the remaning ones. svn path=/trunk/; revision=20655
* Don't markup deprecated in italics.Johan Dahlin2008-06-181-4/+4
| | | | | | | | | | | 2008-06-17 Johan Dahlin <jdahlin@async.com.br> * gtk/gtkaboutdialog.c: * gtk/gtkbutton.c (gtk_button_class_init): Don't markup deprecated in italics. svn path=/trunk/; revision=20441
* gtk/gtkbutton.h gtk/gtkcellrenderer.h gtk/gtkimcontext.h gtk/gtkstyle.hMichael Natterer2008-01-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-25 Michael Natterer <mitch@imendio.com> * gtk/gtkbutton.h * gtk/gtkcellrenderer.h * gtk/gtkimcontext.h * gtk/gtkstyle.h * gtk/gtktoolbar.h * gtk/gtktooltip.h * gtk/gtktreeprivate.h * gtk/gtktreeviewcolumn.h * gtk/gtkwidget.h: add const to constant structs which are passed into GTK+. Also add some forgotten const for const strings. * gtk/gtkbutton.c * gtk/gtkcellrenderer.c * gtk/gtkimcontext.c * gtk/gtkstyle.c * gtk/gtktoolbar.c * gtk/gtktooltip.c * gtk/gtktreeview.c * gtk/gtktreeviewcolumn.c * gtk/gtkwidget.c: changed accordingly. svn path=/trunk/; revision=19399
* Don't leave priv->image dangling when use-stock is set to FALSE. (#437281,Matthias Clasen2007-07-031-3/+3
| | | | | | | | | | | 2007-07-03 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_construct_child): Don't leave priv->image dangling when use-stock is set to FALSE. (#437281, Jochen Baier) svn path=/trunk/; revision=18362
* Require gtk-doc 1.6, for signal and property links.Matthias Clasen2007-05-261-10/+10
| | | | | | | | | | | | | | | | | | | 2007-05-26 Matthias Clasen <mclasen@redhat.com> * configure.in: Require gtk-doc 1.6, for signal and property links. * gtk/gtkbox.c: * gtk/gtkbutton.c: * gtk/gtkcontainer.c: * gtk/gtkdialog.c: * gtk/gtkentry.c: * gtk/gtkimage.c: * gtk/gtklabel.c: * gtk/gtkmisc.c: * gtk/gtksettings.c: * gtk/gtkwidget.c: Documentation improvements, link signals and properties where it makes sense. svn path=/trunk/; revision=17924
* Unparent the old image before overwriting priv->image. (#437281, JochenMatthias Clasen2007-05-101-1/+4
| | | | | | | | | | 2007-05-10 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_set_image): Unparent the old image before overwriting priv->image. (#437281, Jochen Baier) svn path=/trunk/; revision=17816
* When shift-clicking, keep the larger part of the selection selected.Matthias Clasen2006-12-241-3/+3
| | | | | | | | | | | 2006-12-24 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c (gtk_entry_button_press): When shift-clicking, keep the larger part of the selection selected. (#353709, Benjamin Otte) * gtk/gtkbutton.c (gtk_button_get_props): Use gtk_border_free when freeing borders.
* Be more careful when faking a button release. (#323146, Travis Abbott)Matthias Clasen2006-12-241-1/+8
| | | | | | | | 2006-12-24 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_grab_notify): Be more careful when faking a button release. (#323146, Travis Abbott)
* Replace a lot of idle and timeout calls by the new gdk_threads api.Matthias Clasen2006-12-221-5/+1
| | | | | | | 2006-12-22 Matthias Clasen <mclasen@redhat.com> * *.c: Replace a lot of idle and timeout calls by the new gdk_threads api.
* Apply a cleanup patch by Kjartan Maraas (#341812)Matthias Clasen2006-10-081-1/+1
| | | | | | 2006-10-08 Matthias Clasen <mclasen@redhat.com> * Apply a cleanup patch by Kjartan Maraas (#341812)
* Don't call construct_child here, since some apps make assumptions aboutMatthias Clasen2006-06-081-1/+30
| | | | | | | | 2006-06-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_style_set): Don't call construct_child here, since some apps make assumptions about the lifecycle of the constructed label.
* Add an icon-spacing style property for the same purpose.Matthias Clasen2006-06-011-6/+41
| | | | | | | | | | | 2006-06-01 Matthias Clasen <mclasen@redhat.com> * gtk/gtktoolbutton.c (gtk_tool_button_class_init): Add an icon-spacing style property for the same purpose. * gtk/gtkbutton.c (gtk_button_class_init): Add an image-spacing style property that allows to adjust the spacing between image and label in button. (#320431, James Moger)
* Add a GtkButton::image-position property with getter and setter, to allowMatthias Clasen2006-05-311-14/+105
| | | | | | | | | | 2006-05-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtk.symbols: * gtk/gtkbutton.h: * gtk/gtkbutton.c: Add a GtkButton::image-position property with getter and setter, to allow constructing buttons with the image stacked on top of the label. (#342930, Johan Dahlin)
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Boilerplate reductionMatthias Clasen2006-05-021-44/+12
|
* Fix handling of image-only buttons. (#332985, Kalle Vahlmann, #333555)Matthias Clasen2006-03-061-22/+33
| | | | | | | | | | | 2006-03-05 Matthias Clasen <mclasen@redhat.com> Fix handling of image-only buttons. (#332985, Kalle Vahlmann, #333555) * gtk/gtkbutton.c (gtk_button_construct_child): Don't return early if there an image to show. (show_image): Always return TRUE if there is no text.
* remove the "child-spacing" style property again and add "inner-border"Michael Natterer2006-01-171-24/+43
| | | | | | | | 2006-01-17 Michael Natterer <mitch@imendio.com> * gtk/gtkbutton.c: remove the "child-spacing" style property again and add "inner-border" instead. That's far more flexible and "child-spacing" was a bad name anyway.
* applied patch from maemo-gtk which adds a child-spacing style property.Michael Natterer2006-01-161-10/+28
| | | | | | | 2006-01-16 Michael Natterer <mitch@imendio.com> * gtk/gtkbutton.c: applied patch from maemo-gtk which adds a child-spacing style property. Fixes bug #327202.
* Check arguments. (#317491, Paolo Borelli)Matthias Clasen2005-09-291-1/+6
| | | | | | | 2005-09-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_set_image): Check arguments. (#317491, Paolo Borelli)
* No point in using a mem chunk for window groups, buttons, labels.Matthias Clasen2005-09-141-1/+1
| | | | | | | | | 2005-09-14 Matthias Clasen <mclasen@redhat.com> * gtk/gtklabel.c (gtk_label_get_type): * gtk/gtkbutton.c (gtk_button_get_type): * gtk/gtkwindow.c (gtk_window_group_get_type): No point in using a mem chunk for window groups, buttons, labels.
* Intern some more strings.Matthias Clasen2005-09-011-8/+8
| | | | | | | | | 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().
* Also intern static strings passed to g_object_set_data()Matthias Clasen2005-08-311-1/+1
|
* 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.
* declare _gdk_xgrab_check_button_event.Manish Singh2005-06-301-46/+46
| | | | | | | | Thu Jun 30 14:17:24 2005 Manish Singh <yosh@gimp.org> * gdk/x11/gdkprivate-x11.h: declare _gdk_xgrab_check_button_event. * gtk/gtkbutton.c: fix signature of gtk_button_grab_broken.
* Handle broken grabs.Matthias Clasen2005-06-301-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | 2005-06-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_grab_broken): Handle broken grabs. * gtk/gtkrange.c (gtk_range_grab_broken): Handle broken grabs. * gdk/gdkevents.h: Add a boolean to specify wether the broken grab was implicit. * gdk/x11/gdkdisplay-x11.c (gdk_display_pointer_is_grabbed): As the documentation states, don't return TRUE for implicit grabs. * gdk/x11/gdkdisplay-x11.h (struct _GdkDisplayX11): Add a boolean field to store wether a pointer grab is implicit. * gdk/x11/gdkmain-x11.c (_gdk_xgrab_check_button_event): Track implicit grabs. * gdk/x11/gdkevents-x11.c (gdk_event_translate): Call _gdk_xgrab_check_button_event for button events.
* Continue to activate even if we can't grab the keyboard.Matthias Clasen2005-06-271-13/+29
| | | | | | | | | 2005-06-27 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_real_button_activate): Continue to activate even if we can't grab the keyboard. (gtk_button_finish_activate): Only ungrab when we have a keyboard grab. (#172998, William Jon McCann)
* Don't trigger warnings if there are extra references to the hbox.Matthias Clasen2005-06-231-1/+5
| | | | | | | | 2005-06-23 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_construct_child): Don't trigger warnings if there are extra references to the hbox. (#308677, Dan Winship)
* Document several button signals as not useful. `Matthias Clasen2005-06-171-0/+42
| | | | | | | | 2005-06-17 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_class_init): Document several button signals as not useful. `
* Add some more docs. (#307818, Christian Persch)Matthias Clasen2005-06-161-1/+2
| | | | | | | 2005-06-16 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_set_image): Add some more docs. (#307818, Christian Persch)
* Merged from gtk-2-6:Sven Neumann2005-03-311-0/+2
| | | | | | | | | 2005-03-31 Sven Neumann <sven@gimp.org> Merged from gtk-2-6: * gtk/gtkbutton.c * gtk/gtkiconview.c: fixed gtk-doc comments.
* Use canonical names for g_object_notify() as well.Matthias Clasen2005-03-261-15/+15
| | | | | | | | 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-16/+15
| | | | | | | | | | | | 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-14/+16
|
* Make PLT-reduction work with gcc4, and don't include everything inMatthias Clasen2005-03-201-2/+3
| | | | | | | | | | | | | | | | | | 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.
* xMatthias Clasen2005-03-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-03-08 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextbuffer.c (gtk_text_buffer_class_init): * gtk/gtkrange.c (gtk_range_class_init): * gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): * gtk/gtktexttag.c (gtk_text_tag_class_init): * gtk/gtktextview.c (gtk_text_view_class_init): * gtk/gtkscrollbar.c (gtk_scrollbar_class_init): * gtk/gtknotebook.c (gtk_notebook_class_init): * gtk/gtkentry.c (gtk_entry_class_init): * gtk/gtkexpander.c (gtk_expander_class_init): * gtk/gtkarrow.c (gtk_arrow_class_init): * gtk/gtkalignment.c (gtk_alignment_class_init): * gtk/gtkbutton.c (gtk_button_class_init): * gtk/gtklabel.c (gtk_label_class_init): * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_class_init): * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init): x * gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init): * gtk/gtktreeview.c (gtk_tree_view_class_init): * gtk/gtkbox.c (gtk_box_class_init): * gtk/gtkwindow.c (gtk_window_class_init, gtk_window_class_init): * gtk/gtkcontainer.c (gtk_container_class_init): * gtk/gtkwidget.c (gtk_widget_class_init): * gtk/gtkobject.c (gtk_object_class_init): Use canonical names when registering param specs.
* Fix docs. (#165180, Jeff Franks)Matthias Clasen2005-01-251-1/+1
| | | | | | | 2005-01-25 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_set_image): Fix docs. (#165180, Jeff Franks)
* Allow unsetting the custom image by passing NULL. (gtk_button_init):Matthias Clasen2005-01-021-1/+2
| | | | | | | | | | 2005-01-01 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_set_image): Allow unsetting the custom image by passing NULL. (gtk_button_init): Initialize image_is_stock to TRUE, fixing a problem with changing stock labels. (#162273, Marcin Krzyzanowski)
* Fix a stupid oversight.Matthias Clasen2004-11-171-1/+1
|