Commit Graph

152 Commits

Author SHA1 Message Date
Michael Natterer
a362eecc4a gtk/gtkbutton.h gtk/gtkcellrenderer.h gtk/gtkimcontext.h gtk/gtkstyle.h
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
2008-01-25 09:30:40 +00:00
Matthias Clasen
34e44d63ea Don't leave priv->image dangling when use-stock is set to FALSE. (#437281,
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
2007-07-03 17:09:42 +00:00
Matthias Clasen
b80b526080 Require gtk-doc 1.6, for signal and property links.
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
2007-05-26 06:59:36 +00:00
Matthias Clasen
75092d295b Unparent the old image before overwriting priv->image. (#437281, Jochen
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
2007-05-10 20:19:38 +00:00
Matthias Clasen
a9d25d6235 When shift-clicking, keep the larger part of the selection selected.
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.
2006-12-24 06:32:07 +00:00
Matthias Clasen
650fd1fd27 Be more careful when faking a button release. (#323146, Travis Abbott)
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)
2006-12-24 06:06:37 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Matthias Clasen
07e7719441 Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
2006-10-08 05:07:55 +00:00
Matthias Clasen
bb6b1f152f Don't call construct_child here, since some apps make assumptions about
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.
2006-06-08 12:47:05 +00:00
Matthias Clasen
9095bd257b Add an icon-spacing style property for the same purpose.
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)
2006-06-01 13:42:14 +00:00
Matthias Clasen
e26ffe55e1 Add a GtkButton::image-position property with getter and setter, to allow
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)
2006-05-31 00:22:19 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
459eeebde9 Fix handling of image-only buttons. (#332985, Kalle Vahlmann, #333555)
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.
2006-03-06 03:47:06 +00:00
Michael Natterer
fbcf588227 remove the "child-spacing" style property again and add "inner-border"
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.
2006-01-17 15:49:18 +00:00
Michael Natterer
52ee8588c2 applied patch from maemo-gtk which adds a child-spacing style property.
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.
2006-01-16 14:49:36 +00:00
Matthias Clasen
56b4314ae9 Check arguments. (#317491, Paolo Borelli)
2005-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Check arguments.  (#317491,
	Paolo Borelli)
2005-09-29 13:42:21 +00:00
Matthias Clasen
ece1601498 No point in using a mem chunk for window groups, buttons, labels.
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.
2005-09-14 04:31:23 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
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().
2005-09-01 05:11:46 +00:00
Matthias Clasen
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
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.
2005-08-31 16:53:43 +00:00
Manish Singh
5cc0696de6 declare _gdk_xgrab_check_button_event.
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.
2005-06-30 21:18:34 +00:00
Matthias Clasen
87cafe5b4b Handle broken grabs.
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.
2005-06-30 03:35:30 +00:00
Matthias Clasen
f49eab1248 Continue to activate even if we can't grab the keyboard.
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)
2005-06-27 20:04:33 +00:00
Matthias Clasen
3be3d84b6a Don't trigger warnings if there are extra references to the hbox.
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)
2005-06-23 04:24:24 +00:00
Matthias Clasen
c06b5609d2 Document several button signals as not useful. `
2005-06-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_class_init): Document
	several button signals as not useful.
`
2005-06-17 18:42:49 +00:00
Matthias Clasen
8f95bb18f6 Add some more docs. (#307818, Christian Persch)
2005-06-16  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Add some more
	docs.  (#307818, Christian Persch)
2005-06-16 12:51:00 +00:00
Sven Neumann
5fc338544b Merged from gtk-2-6:
2005-03-31  Sven Neumann  <sven@gimp.org>

	Merged from gtk-2-6:

	* gtk/gtkbutton.c
	* gtk/gtkiconview.c: fixed gtk-doc comments.
2005-03-31 17:04:25 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
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.
2005-03-22 02:14:55 +00:00
Matthias Clasen
b6c29a5f1a : Mark param spec strings as static. 2005-03-21 06:02:43 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
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.
2005-03-20 07:01:23 +00:00
Matthias Clasen
263bce4445 x
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.
2005-03-09 04:04:40 +00:00
Matthias Clasen
35819662f8 Fix docs. (#165180, Jeff Franks)
2005-01-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Fix docs.  (#165180,
	Jeff Franks)
2005-01-25 20:54:00 +00:00
Matthias Clasen
4a6b6aa45c Allow unsetting the custom image by passing NULL. (gtk_button_init):
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)
2005-01-02 03:14:34 +00:00
Matthias Clasen
283ce68f83 Fix a stupid oversight. 2004-11-17 01:21:16 +00:00
Matthias Clasen
d651bb25cd Really free the list. (#158422, Morten Welinder)
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)
2004-11-16 02:06:20 +00:00
Matthias Clasen
a5869f4c50 Use GPOINTER_TO_UINT()/GUINT_TO_POINTER() for guints. (#158420, Morten
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)
2004-11-16 02:01:41 +00:00
Matthias Clasen
10132d37c9 *** empty log message *** 2004-11-15 20:56:28 +00:00
Matthias Clasen
5cfa1d1b20 *** empty log message *** 2004-11-15 18:07:22 +00:00
Matthias Clasen
32e685c8d4 Revert the button state to !button_down, if we're missing the release
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.
2004-09-26 05:47:11 +00:00
Matthias Clasen
ecc1ceee3c Remove unnecessary g_return_if_fail()s from virtual functions. (#153469,
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)
2004-09-22 20:39:56 +00:00
Matthias Clasen
ef7455d981 Add a boolean ::displace-focus style property and apply child displacement
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)
2004-09-20 14:43:18 +00:00
Matthias Clasen
e4e4aca0fc Fix #150125:
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.
2004-08-16 05:43:50 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
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
2004-08-09 16:59:53 +00:00
Matthias Clasen
d287b71399 Add a note about the !CAN_FOCUS quirk in the button size allocation code.
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.
2004-06-05 03:58:50 +00:00
Matthias Clasen
85eb55763f Go back to the initial fix for the focus-overdrawing problem, which was
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.
2004-05-18 17:50:04 +00:00
Matthias Clasen
a455537074 Allocate space for the focus rectangle only if necessary. (#142668,
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)
2004-05-17 18:51:24 +00:00
Matthias Clasen
a4f0cc112b Don't let the child draw over the focus rectangle.
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.
2004-05-07 15:26:35 +00:00
Matthias Clasen
ead11a6119 Doc fixes.
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.
2004-04-15 14:31:02 +00:00