Commit Graph

72 Commits

Author SHA1 Message Date
Timm Bäder
c7294ab90e button: Remove priv pointer
This way we can also move the GtkButtonPrivate definition into
gtkbutton.c
2018-02-25 16:47:20 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Benjamin Otte
f53b72e5ff button: Get rid of icon size
In fact, make gtk_button_new_from_icon_name() just set the icon-name
property instead of creating a GtkImage.
2017-11-15 14:22:16 -05:00
Timm Bäder
3b970f4555 button: Remove _get_event_window 2016-11-05 11:56:36 +01:00
Timm Bäder
f65af48d51 button: Fix icon-name implementation 2016-10-20 20:12:05 +02:00
Timm Bäder
be2f19663b button: Add icon-name property
Remove the old-style button construction that allowed to show both an
icon and a label and change visibility based on a GtkSetting.
2016-10-18 00:29:19 +02:00
Timm Bäder
10e24d58c3 button: Remove _{get,set}_focus_click
Deprecated for the GtkWidget variant. Also remove some unused fields
from the GtkButtonPrivate struct.
2016-10-16 18:17:21 +02:00
Timm Bäder
10a92a210b button: Remove deprecated style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
590cd6a9f2 button: Remove GtkStock API 2016-10-16 18:17:21 +02:00
Timm Bäder
485d1b9835 Button: Remove alignment API 2016-10-16 18:17:21 +02:00
Florian Müllner
9a29a2768b Deprecate widget-specific :focus-on-click properties
The differences between the existing properties and the newly added
GtkWidget:focus-on-click property are minimal (different owner_type
in GParamSpec), so it is extremely unlikely that dropping the former
would break anything.

https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Matthias Clasen
598777166f GtkButton: Use FLAT style class
This commit makes button always draw background and frame.
Buttons with relief none get a new style class, FLAT, which
allows themes to style these buttons as they like.

We also (finally) mark GTK_RELIEF_HALF as deprecated. It
has never done anything different from GTK_RELIEF_NORMAL.

https://bugzilla.gnome.org/show_bug.cgi?id=732256
2014-06-26 22:02:18 -04:00
Matthias Clasen
f6af96723c GtkButton: Deprecated setters and getters as well
gtk_button_set/get_alignment should be deprecated together
with the properties they are setters/getters for.
2014-05-13 22:19:30 -04:00
William Jon McCann
add1ca00f4 docs: add Gtk*Class docs
https://bugzilla.gnome.org/show_bug.cgi?id=81006
2014-01-20 12:31:21 -05:00
Yosef Or Boczko
2f77a61e61 Add gtk_button_new_from_icon_name
This function is a convenience wrapper around
gtk_button_new() and gtk_button_set_image().

https://bugzilla.gnome.org/show_bug.cgi?id=705918

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-08-14 10:41:42 +03:00
William Jon McCann
424e1d0059 Start deprecating some GtkStock API 2013-06-25 19:05:32 -04:00
Matthias Clasen
20c8c8b91c Add annotations to gtk headers
Add annotations to all exported functions in GTK+ headers.
2013-05-05 15:38:47 -04:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Matthias Clasen
41f6d189f9 Add GDK_AVAILABLE annotations to new API 2012-07-15 00:53:46 -04:00
Cosimo Cecchi
385a2398ce button: fix variable name in function declaration
Or gtk-doc/introspection scanners will complain.
2012-05-21 17:26:43 -04:00
William Jon McCann
346b933a85 Provide a way to force showing icons in buttons
https://bugzilla.gnome.org/show_bug.cgi?id=676429
2012-05-21 13:57:18 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
a78ab0cfa1 Drop use of GDK_DISABLE_DEPRECATED guards in gtk
We now use function attributes for deprecation so the build-breaking
guards are no longer needed.
2011-11-09 22:02:42 -05:00
Matthias Clasen
9e0efc5022 Add deprecation annotations for deprecated functions
We define our own GDK_DEPRECATED[_FOR] macros for this
and allow it to be turned off by defining the
GDK_DISABLE_DEPRECATION_WARNINGS macro.
2011-10-11 15:03:46 -04:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Javier Jardón
23dda3ea8e gtkbutton: Move private functions to private header
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-06 11:58:07 +01:00
Carlos Garnacho
e0e36b621f Update _gtk_button_paint() arguments to GtkStyleContext
The detail strings weren't in use anymore, and the state
argument is now a GtkStateFlags. GtkToggleButton has been
updated as well.
2011-01-10 03:49:59 +01:00
Javier Jardón
c295ab0943 gtktbutton: Move public members to private structure 2010-11-19 06:15:26 +01:00
Benjamin Otte
748d3d612d button: Port to draw vfunc
Also port togglebutton, they use the same paint function.
2010-09-26 15:11:39 +02:00
Mirsal Ennaime
23a61525f6 Add an accessor for the GSEALed Gtkbutton's event_window attribute
* Add the gtk_button_get_event_window() function

Closes: bgo#622581
2010-06-26 21:22:02 -04:00
Michael Natterer
5e29973773 Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDES
...and disallow inclusion of individual files unconditionally.
2010-05-03 01:51:18 +02:00
Christian Dywan
da8dde446d Deprecate functions according to deprecated GtkButton signals
https://bugzilla.gnome.org/show_bug.cgi?id=599218
2009-10-27 22:42:25 +01:00
Michael Natterer
3544c28133 no need to include <gtk/gtkenums.h> in headers which somehow include
2008-10-30  Michael Natterer  <mitch@imendio.com>

	* gtk/*.h: no need to include <gtk/gtkenums.h> in headers which
	somehow include gtkobject.h or another header which includes it.


svn path=/trunk/; revision=21734
2008-10-30 16:34:16 +00:00
Michael Natterer
e7b18d2a61 no need to include <gdk/gdk.h> in any widget header, it's included via
2008-10-30  Michael Natterer  <mitch@imendio.com>

	* gtk/*.h: no need to include <gdk/gdk.h> in any widget header,
	it's included via gtkwidget.h anyway.


svn path=/trunk/; revision=21732
2008-10-30 15:58:06 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
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
2008-06-30 23:01:56 +00:00
Tim Janik
cd19149ad5 Switch to "guint GSEAL (foo) : width;" when packing fields in guints.
* gtk/gtkbox.h:
* gtk/gtkbutton.h:
* gtk/gtkcellrenderer.h:
* gtk/gtkcellrenderertext.h:
* gtk/gtkcheckmenuitem.h:
* gtk/gtkcontainer.h:
* gtk/gtkentry.h:
* gtk/gtkhandlebox.h:
* gtk/gtkimcontextsimple.h:
* gtk/gtklabel.h:
* gtk/gtkliststore.h:
* gtk/gtkmenu.h:
* gtk/gtkmenuitem.h:
* gtk/gtkmenushell.h:
* gtk/gtknotebook.h:
* gtk/gtkpaned.h:
* gtk/gtkplug.h:
* gtk/gtkprintjob.h:
* gtk/gtkprogressbar.h:
* gtk/gtkrange.h:
* gtk/gtkscale.h:
* gtk/gtkscrolledwindow.h:
* gtk/gtksizegroup.h:
* gtk/gtksocket.h:
* gtk/gtkspinbutton.h:
* gtk/gtkstatusbar.h:
* gtk/gtktable.h:
* gtk/gtktearoffmenuitem.h:
* gtk/gtktextbuffer.h:
* gtk/gtktextview.h:
* gtk/gtktogglebutton.h:
* gtk/gtktoolbar.h:
* gtk/gtktreestore.h:
* gtk/gtktreeviewcolumn.h:
* gtk/gtkwindow.h: Do not specify width inside GSEAL() when packing fields in guints.

svn path=/trunk/; revision=20621
2008-06-20 11:09:49 +00:00
Tim Janik
7f4da5ab85 Seal 3 remaining fields in GtkButton.
svn path=/trunk/; revision=20556
2008-06-20 11:03:57 +00:00
Tim Janik
81acd2e7be Deprecate direct access to public variables in GtkButton.
* gtk/gtkbutton.h: Deprecate direct access through GSEAL().

svn path=/trunk/; revision=20491
2008-06-20 10:58:02 +00:00
Michael Natterer
2c5f8a5c2b whitespace cleanup: remove trailing whitespace and excess newlines and
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk*.h: whitespace cleanup: remove trailing whitespace and
	excess newlines and sprinkled some newlines where needed. Zero
	code or formatting changes included.


svn path=/trunk/; revision=20225
2008-05-28 15:35:43 +00:00
Michael Natterer
eff99c282c define __GTK_H_INSIDE__ around including all other headers.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtk.h: define __GTK_H_INSIDE__ around including all other
	headers.

	* gtk/gtktypebuiltins.h.template
	* gtk/gtkversion.h.in
	* gtk/gtk*.h: add single-include guards that #error out if
	GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
	included individually.

	* gtk/gtkprintbackend.h
	* gtk/gtkprinter-private.h
	* gtk/gtktextlayout.h
	* gtk/gtktexttagprivate.h
	* gtk/gtktexttypes.h
	* gtk/gtktreedatalist.h: include <gtk/gtk.h> instead of individual
	headers in these private or semi-private headers.

	* gtk/gtkimmodule.h: also here because it's not in gtk.h.

	* gtk/gtkpagesetupunixdialog.h
	* gtk/gtkprinter.h
	* gtk/gtkprintjob.h
	* gtk/gtkprintunixdialog.h: likewise in the gtkunixprint headers.

	* gtk/gtkclist.h
	* gtk/gtkcombo.h
	* gtk/gtkctree.h
	* gtk/gtkfilesel.h
	* gtk/gtkitemfactory.h
	* gtk/gtklist.h
	* gtk/gtklistitem.h
	* gtk/gtkoldeditable.h
	* gtk/gtkoptionmenu.h
	* gtk/gtkpixmap.h
	* gtk/gtkpreview.h
	* gtk/gtksignal.h
	* gtk/gtktipsquery.h: whenever possible, include only <gtk/gtk.h>
	instead of individual headers in these deprecated headers. They
	don't get included at all when GTK_DISABLE_DEPRECATED is defined,
	so if an app needs them anyway, it must undef GTK_DISABLE_DEPRECATED
	and include them individually, which should continue to work.

	* gtk/gtkclist.c: include "gtkctree.h" because of the change
	above.


svn path=/trunk/; revision=20221
2008-05-28 15:07:04 +00:00
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
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
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
10132d37c9 *** empty log message *** 2004-11-15 20:56:28 +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
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
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
Owen Taylor
e5d1ea8cfe Massive padding addition to class structures.
Sat Feb 23 11:54:12 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/*.h gdk/*.h: Massive padding addition to class structures.

        * gtk/gtktextmark.h: Fix a FIXME about G_CONST_RETURN.
2002-02-23 20:22:05 +00:00
Soeren Sandmann
5d81847f20 feedback when check and radio buttons are depressed.
Fri Feb 22 14:08:38 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkradiobutton.c, gtk/gtkcheckbutton.c, gtkbutton.h,
	gtktogglebutton.c: feedback when check and radio buttons are
	depressed.
2002-02-22 13:34:28 +00:00