Commit Graph

32 Commits

Author SHA1 Message Date
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
f3aebf0c15 gio: Add various missing property documentation comments
Previously these properties would have been documented using the strings
from the pspec, but those will be removed in the following commit. Re-add
the documentation using those strings, but as gi-docgen documentation
comments.

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

Helps: #2991
2023-11-29 13:41:12 +00:00
Philip Withnall
ac6cc7e2b6 docs: Move the GEmblemedIcon SECTION
Move it to the struct docs.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Helps: #3037
2023-10-23 13:43:27 +01: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
Geyslan G. Bem
6b867cd474 docs: Standardize spelling of serializ*
Changes serialis* to serializ*.

Fixes: #2399

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
2021-05-10 15:28:12 -03: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
Piotr Drąg
10c490cdfe Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772221
2016-10-12 21:30:42 +02:00
Matthias Clasen
42cf80780b Docs: Big entity cleanup
Strip lots of entity use from |[ ]| examples (which are now
implicit CDATA). Also remove many redundant uses of <!-- -->.
2014-02-01 12:00:30 -05:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Emmanuele Bassi
54cc43630d Rename the generated private data getter function
As it turns out, we have examples of internal functions called
type_name_get_private() in the wild (especially among older libraries),
so we need to use a name for the per-instance private data getter
function that hopefully won't conflict with anything.
2013-06-24 15:43:04 +01:00
Emmanuele Bassi
32747def4b gio: Use the new private instance data declaration
Use the newly added macros, and remove the explicit calls to
g_type_class_add_private().

https://bugzilla.gnome.org/show_bug.cgi?id=700035
2013-06-24 14:18:01 +01:00
Matthias Clasen
9d69c274e0 Silently handle icon being NULL
While an emblemed icon without a base icon is not very
useful, no need to crash here.
This was crashing the object finalization test in gtk.
2013-05-02 21:02:37 -04:00
Ryan Lortie
c16f914b40 GIcon: add g_icon_[de]serialize()
Add support for serialising a GIcon to a GVariant and deserialising the
result back to a GIcon.

This solves a number of problems suffered by the existing to_string()
API, primarily these:

 - not forcing the icon to be a utf8 string means that we can
   efficiently encode a PNG (ie: just give the array of bytes)

 - there is no need to ensure that proper types are loaded before using
   the deserialisation interface.  'Foreign' icon types will probably
   emit a serialised format the deserialises to a GBytesIcon.

We additionally clearly document what is required for being a consumer
or implementation of #GIcon.

Further patches will be required to GdkPixbuf and GVfsIcon to bring
their implementations in line with the new rules (essentially: introduce
implementations of the new serialize() API).

https://bugzilla.gnome.org/show_bug.cgi?id=688820
2013-04-21 16:31:14 -04:00
Evan Nemerson
c3d6595f5a GIO: add lots of annotations for Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=667447
2012-01-11 15:50:08 -05:00
Javier Jardón
928d2cea61 gio/*: Use g_list_free_full() convenience function 2012-01-03 16:53:47 +01:00
Pavel Holejsovsky
5a8d012d29 Add GI annotations to GIcon and related classes and interfaces 2010-12-27 16:08:46 +01:00
Cosimo Cecchi
01ba7bd8e8 emblemedicon: make GEmblemedIcon subclassable
Hiding the object/class structs in the source file makes this class not
subclassable.

Move them to the public header, and add a property for the icon, so that
subclasses can just use

  g_object_new (DERIVED_TYPE,
                "gicon", icon,
                NULL);

to create an emblemed icon.

https://bugzilla.gnome.org/show_bug.cgi?id=636892
2010-12-20 15:39:00 +01:00
Cosimo Cecchi
9411d0c108 docs: fix a typo 2010-12-15 12:50:59 +01:00
Cosimo Cecchi
bfee021cfb emblemedicon: add docs for _clear_emblems() 2010-12-15 12:49:22 +01:00
Cosimo Cecchi
f53d518a3d emblemedicon: add g_emblemed_icon_clear_emblems()
https://bugzilla.gnome.org/show_bug.cgi?id=637171
2010-12-15 11:45:20 +01:00
Cosimo Cecchi
d28bce02dc emblemed-icon: allow passing a NULL emblem to g_emblemed_icon_new()
So that if we already have a list of emblems we know we want to add to
the icon, we can use e.g. a for loop to add them all, without picking
the first and looping from the second.

https://bugzilla.gnome.org/show_bug.cgi?id=634504
2010-11-10 19:08:52 +01:00
Johan Dahlin
30132c44c1 Add a lot of missing annotations 2010-09-24 18:24:41 -03: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
Christian Persch
9493925854 Make g_emblemed_icon_add_emblem() keep the list sorted
Fixes bug #628317.
2010-08-30 18:34:14 +02:00
Ryan Lortie
5b946e0504 gio/: fully remove gioalias hacks 2010-07-07 19:53:22 -04:00
David Zeuthen
e38e6aafe0 Bug 540461 – GEmblemedIcon leak
2009-02-27  David Zeuthen  <davidz@redhat.com>

        Bug 540461 – GEmblemedIcon leak

        * gemblemedicon.c (g_emblemed_icon_finalize):
        Avoid leaking a GList.


svn path=/trunk/; revision=7920
2009-02-27 18:19:05 +00:00
Dan Winship
7943f976d4 cast a "char **" to "const char **" to avoid a warning.
* gdesktopappinfo.c (update_mimeapps_list): cast a "char **" to
	"const char **" to avoid a warning.

	* gemblem.c (g_emblem_from_tokens):
	* gemblemedicon.c (g_emblemed_icon_from_tokens):
	* xdgmime/xdgmime.c (xdg_mime_get_icon): remove unused
	variables

svn path=/trunk/; revision=7775
2009-01-05 16:57:55 +00:00
Alexander Larsson
4f0b18d203 Bug 555740 - gicon serialization Based on patch from David Zeuthen
2008-10-21  Alexander Larsson  <alexl@redhat.com>

	Bug 555740 - gicon serialization
	Based on patch from David Zeuthen
	
        * gicon.[ch]:
        * gio.symbols:
	Add g_icon_to_string() and g_icon_new_for_string().
	
        * gemblem.c:
        * gemblemedicon.c:
        * gfileicon.c:
        * gthemedicon.c:
	Implement icon serialization for built-in icon types
	
        * tests/Makefile.am:
        * tests/g-icon.c:
	Added GIcon serialization test



svn path=/trunk/; revision=7618
2008-10-21 11:51:48 +00:00
Matthias Clasen
291eb30803 Fix docs
svn path=/trunk/; revision=7425
2008-09-02 16:57:59 +00:00
Matthias Clasen
001bb527b6 Forgotten commit
svn path=/trunk/; revision=7300
2008-08-04 17:19:30 +00:00
Matthias Clasen
a2b61b1e46 Add a GIcon implementation that can add an emblem to another icon.
2008-07-28  Matthias Clasen  <mclasen@redhat.com>

        * gemblemedicon.[hc]: Add a GIcon implementation that can
        add an emblem to another icon.

        * gio.h:
        * Makefile.am:
        * gio.symbols: Glue

        * gloadableicon.c:
        * gfileicon.c: Small documenatation additions.


svn path=/trunk/; revision=7263
2008-07-28 15:35:07 +00:00