Commit Graph

136 Commits

Author SHA1 Message Date
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
Matthias Clasen
8f52057bbc Fix #136614 in a better way:
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.
2004-03-10 00:46:51 +00:00
Jonathan Blandford
afec1da061 actually use gtk_button_add.
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
2004-03-07 22:49:44 +00:00
Matthias Clasen
e2f66ec797 Don't use xthickness in the height calculation.
Sun Mar  7 22:24:28 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.c (_gtk_button_paint): Don't use xthickness in the
	height calculation.
2004-03-07 21:20:50 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
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>
2004-03-06 03:38:59 +00:00
Matthias Clasen
20cafaeefc Don't let the priv->image pointer dangle. (#136259, Padraig O'Briain)
Fri Mar  5 22:37:15 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.c (gtk_button_construct_child): Don't let
	the priv->image pointer dangle.  (#136259, Padraig O'Briain)
2004-03-05 21:36:03 +00:00
Matthias Clasen
add52ebbbf Fixes for #82099:
Thu Feb 19 23:41:06 2004  Matthias Clasen  <maclas@gmx.de>

	Fixes for #82099:

	* gdk/x11/gdkevents-x11.c: Introduce new XSettings "Gtk/ButtonImages"
	and "Gtk/MenuImages" and map them to "gtk-button-images" and
	"gtk-menu-images".

	* gtk/gtkimagemenuitem.c: Add a boolean setting "gtk-menu-images" and use
	it to set the visibility of the embedded image.

	* gtk/gtkbutton.c: Add a boolean setting "gtk-button-images" and use
	it to set the visibility of an embedded image.
2004-02-19 22:39:58 +00:00
Matthias Clasen
e4d55e75e0 Don't draw bevels around active, RELIEF_NONE buttons that aren't
Fri Feb 13 01:31:44 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around
	active, RELIEF_NONE buttons that aren't depressed. This improves
	the appearance of buttons in notebook tabs.  (#109213, reported
	by Benjamin Otte, patch by Rodney Dawes)
2004-02-13 00:31:19 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
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_().
2004-01-16 23:10:05 +00:00
Matthias Clasen
3050f437c5 Correct misleading docs. Add docs for the "activate" signal. (#129358,
Thu Dec 18 01:37:59 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwidget.c (gtk_widget_activate): Correct misleading docs.
	* gtk/gtkbutton.c (gtk_button_class_init): Add docs for the
	"activate" signal.  (#129358, Ka-Hing Cheung)
2003-12-18 00:39:17 +00:00
Matthias Clasen
3fe038b505 Add new properties, xalign and yalign, with getter and setter
Mon Dec 15 00:56:54 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbutton.[hc]: Add new properties, xalign and yalign, with
	getter and setter gtk_button_[sg]et_alignment(), to set the
	alignment of the child.  (#70961, Jody Goldberg)
2003-12-15 00:00:19 +00:00
Matthias Clasen
96fb3e8832 Make string setters safe for self-assignment. (#122745, Soeren Sandmann)
Fri Nov  7 22:55:49 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwindow.c (gtk_window_set_role):
	* gtk/gtkwindow.c (gtk_window_set_title):
	* gtk/gtkwidget.c (gtk_widget_set_name):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_title):
	* gtk/gtkbutton.c (gtk_button_set_label): Make string setters
	safe for self-assignment.  (#122745, Soeren Sandmann)
2003-11-07 21:57:20 +00:00
Soeren Sandmann
81785924f9 remove GDK_EXPOSURE_MASK for INPUT_ONLY window same same same same
Tue Jul  8 21:10:14 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkbutton.c (gtk_button_realize): remove GDK_EXPOSURE_MASK
	for INPUT_ONLY window
	* gtk/gtkmenuitem.c (gtk_menu_item_realize): same
	* gtk/gtknotebook.c (gtk_notebook_realize): same
	* gtk/gtkexpander.c (gtk_expander_realize): same
	* gtk/gtkrange.c (gtk_range_realize): same

	Fix #116303
2003-07-08 18:59:16 +00:00
Matthias Clasen
913e6e9ea9 Document.
2003-04-13  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeviewcolumn.c
	(gtk_tree_view_column_cell_get_position): Document.

	* gtk/gtktextbuffer.c (gtk_text_buffer_select_range):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_[sg]et_expand):
	* gtk/gtkbutton.c (gtk_button_[sg]et_focus_on_click): Document
	these as 2.4 additions.
2003-04-12 22:25:21 +00:00
Soeren Sandmann
b5d8a668bd add property focus_on_click
Wed Apr  2 23:02:26 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkbutton.[ch] (gtk_button_class_init): add property
	focus_on_click

	* gtk/gtkwindow.c (gtk_window_focus): make arrow keyboard
	navigation not wrap around.
2003-04-02 21:50:45 +00:00
Matthias Clasen
14ee65b66a Data constness fixes. (#75754) 2002-12-10 21:39:53 +00:00
Manish Singh
f18d5d3510 Deprecation cleanup
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
2002-10-11 22:57:11 +00:00