summaryrefslogtreecommitdiff
path: root/gtk/gtkbutton.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Really free the list. (#158422, Morten Welinder)Matthias Clasen2004-11-161-3/+4
| | | | | | | | 2004-11-15 Matthias Clasen <mclasen@redhat.com> * gtk/gtkimagemenuitem.c (gtk_image_menu_item_setting_changed): * gtk/gtkbutton.c (gtk_button_setting_changed): Really free the list. (#158422, Morten Welinder)
* Use GPOINTER_TO_UINT()/GUINT_TO_POINTER() for guints. (#158420, MortenMatthias Clasen2004-11-161-3/+3
| | | | | | | | | 2004-11-15 Matthias Clasen <mclasen@redhat.com> * gtk/gtkimagemenuitem.c (gtk_image_menu_item_screen_changed): * gtk/gtkbutton.c (gtk_button_screen_changed): Use GPOINTER_TO_UINT()/GUINT_TO_POINTER() for guints. (#158420, Morten Welinder)
* *** empty log message ***Matthias Clasen2004-11-151-6/+95
|
* *** empty log message ***Matthias Clasen2004-11-151-28/+46
|
* Revert the button state to !button_down, if we're missing the releaseMatthias Clasen2004-09-261-3/+36
| | | | | | | | | | 2004-09-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c: Revert the button state to !button_down, if we're missing the release event due to grab shadowing or insensitivation. * gtk/gtkpathbar.c: Make the slider buttons scroll.
* Remove unnecessary g_return_if_fail()s from virtual functions. (#153469,Matthias Clasen2004-09-221-4/+0
| | | | | | | | | 2004-09-22 Matthias Clasen <mclasen@redhat.com> * gtk/gtkrange.c (gtk_range_map, gtk_range_unmap): * gtk/gtkbutton.c (gtk_button_map, gtk_button_unmap): Remove unnecessary g_return_if_fail()s from virtual functions. (#153469, (Tristan Van Berkom)
* Add a boolean ::displace-focus style property and apply child displacementMatthias Clasen2004-09-201-0/+31
| | | | | | | | 2004-09-20 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_class_init): Add a boolean ::displace-focus style property and apply child displacement to the focus rectangle if it is TRUE. (#141170, Soeren Sandmann)
* Fix #150125:Matthias Clasen2004-08-161-1/+1
| | | | | | | | | | | Mon Aug 16 01:35:25 2004 Matthias Clasen <maclas@gmx.de> Fix #150125: * gtk/gtkcombobox.[hc]: Add a ::focus-on-click property and change the default behaviour to focus on click. * gtk/gtkbutton.c (gtk_button_set_focus_on_click): Typo fix.
* 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
* Add a note about the !CAN_FOCUS quirk in the button size allocation code.Matthias Clasen2004-06-051-4/+7
| | | | | | | | | | | | 2004-06-04 Matthias Clasen <mclasen@redhat.com> * docs/widget_geometry.txt: Add a note about the !CAN_FOCUS quirk in the button size allocation code. * gtk/gtkbutton.c (gtk_button_size_allocate): Give the space requested for drawing the focus indicator to the child in the !CAN_FOCUS case. This should fix issues which the Gimp has with the button allocation changes in 2.4.2.
* Go back to the initial fix for the focus-overdrawing problem, which wasMatthias Clasen2004-05-181-18/+10
| | | | | | | | | | | 2004-05-18 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c: Go back to the initial fix for the focus-overdrawing problem, which was actually correct according to docs/widget_geometry.txt. * gtk/gtkarrow.c (gtk_arrow_class_init): Bump the initial arrow size from 11 to 15 to compensate for that.
* Allocate space for the focus rectangle only if necessary. (#142668,Matthias Clasen2004-05-171-9/+16
| | | | | | | | | 2004-05-17 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_size_request) (gtk_button_size_allocate, _gtk_button_paint): Allocate space for the focus rectangle only if necessary. (#142668, Michael Natterer)
* Don't let the child draw over the focus rectangle.Matthias Clasen2004-05-071-0/+12
| | | | | | | 2004-05-07 Matthias Clasen <mclasen@redhat.com> * gtk/gtkbutton.c (gtk_button_size_allocate): Don't let the child draw over the focus rectangle.
* Doc fixes.Matthias Clasen2004-04-151-0/+1
| | | | | | | 2004-04-15 Matthias Clasen <mclasen@redhat.com> * gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init): * gtk/gtkbutton.c (gtk_button_class_init): Doc fixes.
* Fix #136614 in a better way:Matthias Clasen2004-03-101-12/+23
| | | | | | | | | | | | | Wed Mar 10 01:49:27 2004 Matthias Clasen <maclas@gmx.de> Fix #136614 in a better way: * gtk/gtkoptionmenu.c (gtk_option_menu_init): Undo the last change. * gtk/gtkbutton.c (struct _GtkButtonPrivate): Add a flag, align_set. * gtk/gtkbutton.c (gtk_button_init): Initialize align_set to 0. * gtk/gtkbutton.c (maybe_set_alignment): Rework to only set the alignment if priv->align_set is set. * gtk/gtkbutton.c (gtk_button_set_alignment): Set align_set to 1.
* actually use gtk_button_add.Jonathan Blandford2004-03-071-0/+1
| | | | | | | | | | | | | | | | Sun Mar 7 17:38:03 2004 Jonathan Blandford <jrb@gnome.org> * gtk/gtkbutton.c (gtk_button_class_init): actually use gtk_button_add. * gtk/gtkfilechooserdefault.c (error_building_filename_dialog): use the uri, not the path, #136317 (renderer_edited_cb): ditto (shortcuts_add_bookmark_from_path): ditto (remove_bookmark_button_clicked_cb): ditto (gtk_file_chooser_default_remove_shortcut): ditto (update_from_entry): ditto (up_folder_handler): ditto