Commit Graph

44 Commits

Author SHA1 Message Date
Sudhanshu Tiwari
57d6b945f1 Ported the remaining documentation comments in gio/gaction.c to GI-Docgen 2024-04-01 16:00:23 +01:00
Sudhanshu Tiwari
fa5237650b Ported the first 3 documentation comments in gaction.c to gi-docgen 2024-03-20 11:34:33 +00:00
Sophie Herold
0d268c4825 Remove all nicks and blurbs from param specs
Nicks and blurbs don't have any practical use for gio/gobject libraries.
Leaving tests untouched since this features is still used by other libraries.

Closes #2991
2023-11-29 13:41:34 +00:00
Philip Withnall
635100b1f5 gio: Fix invalid doc links
Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Helps: #3037
2023-10-23 11:26:53 +01:00
Matthias Clasen
34bdf32b38 docs: Move the GAction SECTION
Move it to the struct docs.

Helps: #3037
2023-10-17 10:56:42 +01:00
Philip Withnall
d470e7227a gaction: Improve documentation around floating GVariants
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-15 17:59:36 +00:00
Philip Withnall
4748db5fd3 gaction: Improve docs formatting for g_action_parse_detailed_name()
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-15 17:59:36 +00:00
Philip Withnall
5ac06ac8ea gaction: Add missing annotations to g_action_parse_detailed_name()
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-15 17:59:36 +00:00
Philip Withnall
5942cd7984 gio: Add SPDX license headers automatically
Add SPDX license (but not copyright) headers to all files which follow a
certain pattern in their existing non-machine-readable header comment.

This commit was entirely generated using the command:
```
git ls-files gio/*.[ch] | xargs perl -0777 -pi -e 's/\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/\n \*\n \* SPDX-License-Identifier: LGPL-2.1-or-later\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/igs'
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1415
2022-05-18 09:18:52 +01:00
Sebastian Dröge
705a59a315 gio: Add missing nullable annotations 2020-11-11 13:15:21 +02:00
Дилян Палаузов
512655aa12 minor typos in the documentation (a/an) 2019-08-24 19:14:05 +00:00
Sébastien Wilmet
3bf4a720c3 gio/: LGPLv2+ -> LGPLv2.1+
Sub-directories inside gio/ already processed in a previous commit:
- fam/
- gdbus-2.0/ (which contains only codegen/)
- gvdb/
- inotify/
- tests/
- win32/
- xdgmime/

Other sub-directories inside gio/:
- completion/: no license headers
- kqueue/: not LGPL, BSD-style license

https://bugzilla.gnome.org/show_bug.cgi?id=776504
2017-05-29 19:53:34 +02:00
Christian Hergert
18a33f72db introspection: use (nullable) or (optional) instead of (allow-none)
If we have an input parameter (or return value) we need to use (nullable).
However, if it is an (inout) or (out) parameter, (optional) is sufficient.

It looks like (nullable) could be used for everything according to the
Annotation documentation, but (optional) is more specific.
2016-11-22 14:14:37 -08:00
Sébastien Wilmet
d16abd3df3 docs: fix function name
g_action_parse_detailed_action_name() doesn't exist, it's
g_action_parse_detailed_name() instead.
2016-04-09 13:01:53 +02:00
Sebastian Geiger
7f60cbb701 gio: fix documentation of GAction 2016-02-29 15:47:32 +01:00
Xavier Claessens
74c22150cf docs: fix up docs issues in gio/ 2015-02-05 16:20:43 +01:00
Evan Nemerson
570b27b9ac gio: port annotations from the Vala metadata.
https://bugzilla.gnome.org/show_bug.cgi?id=730493
2014-05-23 10:04:06 -07:00
Philip Withnall
99b67614b7 gaction: Minor clarifications in the GAction documentation
https://bugzilla.gnome.org/show_bug.cgi?id=728350
2014-04-23 13:02:41 +01:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Matthias Clasen
fc6d6b6e10 GAction: remove a lie
Not only was the link to GtkAction broken, it is not true.

https://bugzilla.gnome.org/show_bug.cgi?id=722591
2014-01-20 07:37:42 -05:00
Matthias Clasen
3872049445 Add includes to all gio docs 2014-01-07 22:55:43 -05:00
Ryan Lortie
cdff4a331e Fix g_return_if_fail vs. return_val_if_fail 2013-07-13 15:48:39 -04:00
Ryan Lortie
c04a063b78 GAction: add function for printing detailed names
A counterpart for parsing of detailed actions into (name, target) pairs,
this new function prints them back.

We also add a new function to check for validity of action names.  Only
valid action names are allowed when printing.  Parsing accepts _some_
invalid names for backwards compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=704157
2013-07-13 13:41:03 -04:00
Christian Persch
1d310cf5db app: Document when floating variants are consumed
Bug #700203.
2013-05-13 13:45:11 +02:00
Ryan Lortie
8cddb54659 gaction: add parser for detailed action names
Expand and formalise the syntax for detailed action names, adding a
well-documented (and tested) public parser API for them.

Port the only GLib-based user of detailed action names to the new API:
g_menu_item_set_detailed_action().  The users in Gtk+ will also be
ported soon.

https://bugzilla.gnome.org/show_bug.cgi?id=688954
2013-04-01 16:53:54 -04:00
Ryan Lortie
ebf572cdd8 GAction: back out changes to property flags
41e5ba86a7 introduced some changes to the
property flags of GAction.  These changes were not a reflection of the
actual interface of GAction but were necessary due to GObject being
overly-sensitive to flag changes on property overrides.

Now that the GObject bug is fixed, we can restore the GAction flags to
their correct values.

https://bugzilla.gnome.org/show_bug.cgi?id=666615
2011-12-20 14:58:38 -05:00
Ryan Lortie
829b4dfb43 Clean up GApplication docs
Clean up the docs for GApplication and related classes.

I'm no longer writing documentation for the structure type of classes
and interfaces.  See https://bugzilla.gnome.org/show_bug.cgi?id=665926
for discussin on the correct way forward on this point.

Also: stop putting gtk-doc comments in installed headers.
2011-12-10 17:23:28 -05:00
Matthias Clasen
eb09099f65 Minor doc improvements 2011-12-08 18:05:14 -05:00
Colin Walters
41e5ba86a7 GSimpleAction: Fix to comply with constructor rules
foo_new_*() must be pure wrappers around g_object_new(), otherwise
their functionality is inaccessible to bindings.
2011-12-08 18:05:14 -05:00
Ryan Lortie
bde41dacf7 GAction: make GObject properties read-only
GAction is a read-only interface (as is visible by the lack of _set() functions
on its API).  The properties on the interface currently force implementors to
support writing of the properties at construct time, however.

Lift that restriction.

Take advantage of this from GSimpleAction by nuking the set_property
function and setting the fields directly in the constructor.
2011-06-29 17:32:21 +01:00
Ryan Lortie
5ff65d8695 Make 4 incompatible changes to the GAction API
This commit represents an API break to GAction in the following ways:

  - the 'set_state' entry in the GActionInterface vtable has been
    renamed to 'change_state'.  The number and order of vtable items has
    not otherwise changed.

  - g_action_set_state() has been renamed to g_action_change_state() to
    match the updated vtable entry.

  - the "state" property of the GAction interface has been changed to
    read-only to reflect the fact that g_action_set_state() no longer
    exists.

  - GSimpleActionClass has been hidden.  GSimpleAction can no longer be
    subclassed.

>> Rationale

g_action_set_state() has never been a true setter in the sense that
calling it will update the value of the "state" property.  It has always
been closer to "request 'state' to be changed to this value" with
semantics defined by the implementor of the interface.  This is why the
equivalent method in GActionGroup had its name changed from 'set' to
'change'.  This change makes the two interfaces more consistent and
removes any implication about the effect that calling set_state() should
have on the 'state' property.

>> Impact

This incompatible API break was undertaken only because I strongly
suspect that it will go entirely unnoticed.  If the break actually
affects anybody, then we will accommodate them (possibly going as far as
to revert this commit entirely).

The virtual table change only impacts implementors of GAction.  I
strongly suspect that this is nobody (except for GSimpleAction).

The hiding of GSimpleActionClass only impacts impacts subclasses of
GSimpleAction.  I strongly suspect that none of these exist.

The changing of the property to be read-only only affects people who
were trying to change the state by using GObject properties.  I strongly
suspect that this is nobody at all.

The removal of the g_action_set_state() call is the most dangerous, but
I still suspect that it will impact nobody outside of GLib.  If anybody
is impacted by this change then, at their request, I will reintroduce
the API as a deprecated alias for g_action_change_state().
2011-06-29 11:38:21 +01:00
Matthias Clasen
01f63b19f9 Fix links in gio docs 2011-06-04 18:48:19 -04:00
Cosimo Cecchi
408a9fcbcc gaction: update property flags to match needs of GSimpleAction
Commit 068d53358b uncovered this mismatch
between properties on the interface and those on the implementation.
Update them so they match.
2010-12-28 12:24:39 +01:00
Matthias Clasen
eed36d38d1 Various doc tweaks 2010-11-28 23:55:43 -05:00
Ryan Lortie
04b58a3e27 Change 'Since:' to 2.28 for action classes 2010-10-19 01:16:46 +02:00
Johan Dahlin
835f9cb310 [introspection] Move over annotations
Move all the annotations over from gobject-introspection.

They will not be used directly by the introspection scanner for now,
instead they will be extracted by a script and updated manually
until introspection is properly integrated into the glib build
2010-09-24 15:52:38 -03:00
Ryan Lortie
846b0b3466 GAction is now an interface
the new class GSimpleAction is the implementation half
2010-08-30 19:26:37 +02:00
Ryan Lortie
6cd62920bb GActionGroup is now an interface
- make GAction.get_state() return a reference
 - fix some leaks/warnings in the tests
 - fix signal propagation in GSimpleActionGroup
2010-08-30 19:26:37 +02:00
Matthias Clasen
33b775308b Document behaviour wrt. to floating variants 2010-08-21 19:18:17 -04:00
Matthias Clasen
e8ffb1ae83 Add some annotations 2010-08-21 18:12:18 -04:00
Ryan Lortie
5b38bc5ad5 Simplify/fix state logic in GAction, test it. 2010-08-21 17:35:32 -04:00
Emmanuele Bassi
81b91a8852 action: Minor fixes
• Argument validation.

• Since: annotations.

• Remove (allow-none) annotations from return values.

• Coding style fixes.
2010-08-18 16:55:40 +01:00
Ryan Lortie
8014e9c6e6 add testcase for GAction
fix some small bugs it found
2010-08-18 01:55:48 -04:00
Ryan Lortie
8475d6d7d0 add GAction base class 2010-08-18 01:45:15 -04:00