Commit Graph

88 Commits

Author SHA1 Message Date
Timm Bäder
24866c5d12 radiomenuitem: Remove GtkActivatable code 2016-10-18 00:29:18 +02:00
Benjamin Otte
e1a03ead7a Use NULL for generic marshallers in g_signal_new()
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
Cosimo Cecchi
5a87b5bbce menuitem: deprecate toggle-spacing style property
We can move this to just use the actual GtkCssGadget of the menu item.
2015-12-19 21:21:16 -08:00
Matthias Clasen
2f544655f9 Revise CSS node documentation
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
2015-12-16 10:58:47 -05:00
Matthias Clasen
8e5c7ac028 menu: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
aede5c65d3 menu item: Use CSS nodes
Use the element name menuitem for GtkMenuItem, GtkCheckMenuItem
and GtkRadioMenuItem. GtkSeparatorMenuItem gets the name separator.
Add a subnode with name arrow if a submenu is attached.
Give the radio and check menu items a subnode with name check or
radio.
2015-11-02 23:42:14 -05:00
Matthias Clasen
5c5464a469 radio-menu-item: Add join_group()
The other Radio* widgets have this convenience method that removes the
memory management of the opaque GSList used to handle the group from the
API usable from language bindings (especially the ones not based on
introspection).

This commit adds gtk_radio_menu_item_join_group().

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 02:10:38 -04:00
Matthias Clasen
ad05d84897 radio-menu-item: Allow arguments to be NULL
Some arguments, like the group and the label of a RadioMenuItem, can be
NULL: the RadioMenuItem has all the code to deal with them. The argument
validation is too strict, though, for instance doing:

  return_if_fail (IS_RADIO_MENU_ITEM (foo))

  if (foo != NULL)
    set_foo (foo)

Which is obviously incorrect.

This commit also modifies the annotations of the API, to ensure that
language bindings do the right thing.

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 02:10:38 -04:00
Emmanuele Bassi
955aed9227 radio-menu-item: Handle a !NULL group
If we create a RadioMenuItem without a group, and then set a group, the
menu item will still be set as active, which means an inconsistently
drawn radio menu item - as the RadioMenuItem will set the active flag on
itself, but then it won't reset it when it gets a new group.

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 02:10:37 -04:00
John Lindgren
75b0180829 Allow gtk_radio_menu_item_set_group() to be called twice without crashing.
https://bugzilla.gnome.org/show_bug.cgi?id=726859
2014-03-26 20:35:24 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
William Jon McCann
63e887e165 docs: replace all <examples> with markdown headings 2014-02-04 16:58:54 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
Torsten Schönfeld
904bc27250 gtkradio*: add (allow-none) annotations were appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=679563
2013-12-06 23:57:16 +01:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
William Jon McCann
c96a1c4980 Deprecate GtkAction and GtkUIManager
It is recommended to use GAction et al and GtkBuilder.
2013-06-30 11:19:50 -04:00
jjacky
e916568781 Fix #673243: accelerators not visible on GtkRadioMenu
Also fixes a bug in set_property handler, where setting group to NULL would
cause a warning.

Signed-off-by: jjacky <i.am.jack.mail@gmail.com>
2013-02-18 19:38:48 -05:00
Cosimo Cecchi
261d2d96e3 radiobutton: add missing (element-type) annotation for radio groups
The GSLists should specify their element-type in every annotation. We
are missing some.

https://bugzilla.gnome.org/show_bug.cgi?id=677127
2012-06-25 14:49:11 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Torsten Schönfeld
4ef61e2311 gtk: add annotations for some GtkRadio* constructors
Since constructors like gtk_radio_button_new_from_widget take an
instance of their type as the first argument, the gi scanner interprets
them as methods.

https://bugzilla.gnome.org/show_bug.cgi?id=661858
2011-11-06 16:50:57 +01:00
Matthias Clasen
5ff8fe6971 Documentation fixes
Mostly making sure that return values and varargs don't loose
their docs.
2011-09-25 21:04:49 -04:00
Benjamin Otte
fa16a54b21 a11y: Rename radiosubmenuitem to radiomenuitem 2011-07-18 19:01:40 +02:00
Benjamin Otte
438b78a27d a11y: Remove gtkradiomenuitemaccessible.[ch]
We use gtkradiosubmenuitemaccessible exclusively these days.
2011-07-18 18:47:12 +02:00
Benjamin Otte
552113131c menuitems: Use submenuitem accessible exclusively
Submenus can come and go, so we cannot use an accessible that doesn't
allow for that.

Also, this fixes a rather large refleak.
2011-07-06 18:47:00 +02:00
Matthias Clasen
209a2d1ba0 Convert GailCheck(Sub)MenuItem to GtkAccessible classes
This is along the same lines as the previous commit,
with the same caveat.
2011-07-05 16:08:57 -04:00
Matthias Clasen
64b9599866 Convert GailRadio(Sub)MenuItem to GtkAccessible classes
The way submenus are handled here isn't really right, since
they can come and go at runtime, but I've left it like this
for now. A side-effect is that we can't use
gtk_widget_class_set_accessible_type here, but have to
override get_accessible.
2011-07-05 16:08:57 -04:00
Diego Celix
cb03ea518c gtk/gtkradiomenuitem: gtk_misc_set_alignment
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkradiomenuitem.c

https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-06-10 17:59:46 -04:00
Javier Jardón
c029306b4c Move documentation to inline comments: GtkRadioMenuItem 2011-04-18 02:08:36 +01:00
Pavel Holejsovsky
3c8fc21e9b [GI] Fixes of existing incorrect annotations 2011-01-20 13:56:06 +01:00
Pavel Holejsovsky
9389054da2 [GI] Add (type) annotations to real types 2011-01-20 10:38:38 +01:00
Javier Jardón
eac1959d2c Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Javier Jardón
9ee3d73a19 Add _gtk_check_menu_item_set_active() internal function
It's needed by gtkradiomenuitem

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624432
2010-07-19 16:08:07 +02:00
Javier Jardón
133502d798 GtkRadioMenuItem: Move public members to private structure 2010-07-13 19:40:49 +02:00
Javier Jardón
94fd7a3502 Use accessor functions to access GtkCheckMenuItem 2010-07-13 19:40:46 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Matthias Clasen
bb72b647f6 i Bug 560228 – Add "action-controller" property to GtkWidgetClass
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
2009-01-23 15:15:28 +00:00
Michael Natterer
8371b465dc gtk/gtkclist.c gtk/gtkcontainer.c gtk/gtkfilechooserbutton.c
2008-08-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkclist.c
	* gtk/gtkcontainer.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkgamma.c
	* gtk/gtkmenutoolbutton.c
	* gtk/gtkoptionmenu.c
	* gtk/gtkradiobutton.c
	* gtk/gtkradiomenuitem.c
	* gtk/gtktipsquery.c
	* gtk/gtktree.c
	* gtk/gtktreeview.c: chain up unconditionally in destroy().

	* gtk/gtkhandlebox.c: remove empty destroy() implementation.


svn path=/trunk/; revision=21035
2008-08-07 14:12:32 +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
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
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
2008-06-22 14:28:52 +00:00
Michael Natterer
ac6c371997 gtk/gtkcellview.c gtk/gtklabel.c gtk/gtklayout.c gtk/gtklist.c
2008-02-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcellview.c
	* gtk/gtklabel.c
	* gtk/gtklayout.c
	* gtk/gtklist.c
	* gtk/gtkmenu.c
	* gtk/gtkmenushell.c
	* gtk/gtkmisc.c
	* gtk/gtkoptionmenu.c
	* gtk/gtkplug.c
	* gtk/gtkpreview.c
	* gtk/gtkprogress.c
	* gtk/gtkradiomenuitem.c
	* gtk/gtkscale.c
	* gtk/gtkscrolledwindow.c
	* gtk/gtksocket.c: remove g_return_if_fail() from private
	functions and virtual function implementations.


svn path=/trunk/; revision=19492
2008-02-07 16:59:42 +00:00
Matthias Clasen
5962480827 Fix typo
svn path=/trunk/; revision=18013
2007-06-03 04:56:00 +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
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +00:00