summaryrefslogtreecommitdiff
path: root/gio/gicon.c
AgeCommit message (Collapse)Author
2023-11-29gicon: Fix an invalid introspection annotationPhilip Withnall
`(hash)` is not an annotation — it’s probably a typo for `(virtual hash)`. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3037
2023-10-23docs: Move the GIcon SECTIONPhilip Withnall
Move it to the struct docs. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk> Helps: #3037
2023-10-23docs: Replace deprecated Virtual tagEmmanuele Bassi
Use the (virtual) symbol annotation.
2022-10-06gicon: Do not mark g_icon_to_string() as to_tokens() invokerMarco Trevisan (Treviño)
That's not strictly true as they've different signature, and this leads to some introspection and documentation errors.
2022-10-06gicon: Add virtual invokers for equal() and serialize()Marco Trevisan (Treviño)
2022-10-06gicon: Force g_icon_hash argument to be Gio.Icon for bindingsMarco Trevisan (Treviño)
2022-05-18gio: Add SPDX license headers automaticallyPhilip Withnall
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
2020-12-18Fix signedness warning in gio/gicon.c:g_icon_to_string_tokenized()Emmanuel Fleury
gio/gicon.c: In function ‘g_icon_to_string_tokenized’: gio/gicon.c:165:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} 165 | for (i = 0; i < tokens->len; i++) | ^
2020-11-11gio: Add missing nullable annotationsSebastian Dröge
2020-03-31gicon: Clarify GVariant refcounting in docsPhilip Withnall
Slightly unexpectedly, `g_icon_serialize()` doesn’t produce a floating `GVariant`, it produces one with full ownership and returns that. That’s not the convention for `GVariant` return values from functions which build variants, but there’s nothing we can do to change this now as that would be an API break. Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-09-13Fix g_icon_to_string() regression (doc inconsistency).Jehan
g_icon_new_for_string() docs states that it should return a single name when created with a single name. I add a second condition to this case: the themed icon must not include default fallbacks (i.e. it must not have been created with `g_themed_icon_new_with_default_fallbacks()`). Otherwise the return value of `g_icon_new_for_string()` would not recreate the same icon list when passed to `g_icon_new_for_string()` (which would be another documentation inconsistency). g_icon_new_for_string() is now back to old behavior for this specific case. I also revert the unit test for this case, and add a new unit test when using g_themed_icon_new_with_default_fallbacks() with a single name as well. Closes #1513.
2017-05-29gio/: LGPLv2+ -> LGPLv2.1+Sébastien Wilmet
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
2016-11-22introspection: use (nullable) or (optional) instead of (allow-none)Christian Hergert
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-10-12Use Unicode in translatable stringsPiotr Drąg
See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772221
2015-11-07glib: Add missing (nullable) and (optional) annotationsPhilip Withnall
Add various (nullable) and (optional) annotations which were missing from a variety of functions. Also port a couple of existing (allow-none) annotations in the same files to use (nullable) and (optional) as appropriate instead. Secondly, add various (not nullable) annotations as needed by the new default in gobject-introspection of marking gpointers as (nullable). See https://bugzilla.gnome.org/show_bug.cgi?id=729660. This includes adding some stub documentation comments for the assertion macro error functions, which weren’t previously documented. The new comments are purely to allow for annotations, and hence are marked as (skip) to prevent the symbols appearing in the GIR file. https://bugzilla.gnome.org/show_bug.cgi?id=719966
2014-05-23gio: port annotations from the Vala metadata.Evan Nemerson
https://bugzilla.gnome.org/show_bug.cgi?id=730493
2014-03-30docs: Remove escaping '\' from literalsVolker Sobek
commit 35066ed6c6b51317f49069f2564c547aa309f9f1 replaced entities, but escaped the replacement text also inside literals, which resulted in the escaping '\' to also appear in the documentation. https://bugzilla.gnome.org/show_bug.cgi?id=727320
2014-02-09Docs: Drop entities, switch away from sgml modeMatthias Clasen
Since all element markup is now gone from the doc comments, we can turn off the gtk-doc sgml mode, which means that from now on, docbook markup is no longer allowed in doc comments. To make this possible, we have to replace all remaining entities in doc comments by their replacement text, &amp; -> & and so on.
2014-02-06Docs: replace <literal> by `Matthias Clasen
2014-02-01GIcon: Convert docs to markdownMatthias Clasen
2014-01-31Updated FSF's addressDaniel Mustieles
2013-10-24Revert "Use g_return_val_if_fail() for developer-only messages"Colin Walters
This reverts commit 00f0795a84d23f2e2654a86f8bd3a233c8af3771. https://bugzilla.gnome.org/show_bug.cgi?id=569017
2013-10-17Use g_return_val_if_fail() for developer-only messagesIhar Hrachyshka
Replaced several usages of GError with g_return_val_if_fail() for developer-only messages. As additional value, it also removes those messages from the list to translate, simplifying translator's work a bit. https://bugzilla.gnome.org/show_bug.cgi?id=569017
2013-05-29icon deserialisation: fix uninitialised variableRyan Lortie
Deserialising an emblemed icon would make uninitialised use of a variable in the error case. Fix that.
2013-05-21Use 'dumb quotes' rather than `really dumb quotes'Dan Winship
Back in the far-off twentieth century, it was normal on unix workstations for U+0060 GRAVE ACCENT to be drawn as "‛" and for U+0027 APOSTROPHE to be drawn as "’". This led to the convention of using them as poor-man's ‛smart quotes’ in ASCII-only text. However, "'" is now universally drawn as a vertical line, and "`" at a 45-degree angle, making them an `odd couple' when used together. Unfortunately, there are lots of very old strings in glib, and also lots of new strings in which people have kept up the old tradition, perhaps entirely unaware that it used to not look stupid. Fix this by just using 'dumb quotes' everywhere. https://bugzilla.gnome.org/show_bug.cgi?id=700746
2013-04-24docs: fix docs for g_icon_[de]serialize()Cosimo Cecchi
2013-04-21GIcon: add g_icon_[de]serialize()Ryan Lortie
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-21GIcon: pure re-factor of _from_string()Ryan Lortie
Split out the 'simple string format' cases of URIs, file paths and themed icons to a separate function. This function will be shared by g_icon_deserialize(). https://bugzilla.gnome.org/show_bug.cgi?id=688820
2012-08-16Miscellaneous string fixesMatthias Clasen
Typo and punctuation fixes, and some rewording, based on a patch by Philip Withnall, bug https://bugzilla.gnome.org/review?bug=628193
2012-08-06gicon: make g_icon_new_for_string() recognize win32 pathsDan Winship
(but for compatibility, make it still recognize unix paths on win32 too) https://bugzilla.gnome.org/show_bug.cgi?id=669331
2012-05-15Add g_type_ensure() and use it rather than playing games with volatileDan Winship
https://bugzilla.gnome.org/show_bug.cgi?id=605976
2012-01-11Bug 666700 — Add some missing (allow-none) annotationsPhilip Withnall
Add some missing (allow-none) annotations to GContentType, GIcon and GHashTable methods. Closes: bgo#666700
2011-06-04Fix links in gio docsMatthias Clasen
2011-04-08Silence a bunch of -Wunused-but-set-variable warningsDavid Zeuthen
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-12-27Add GI annotations to GIcon and related classes and interfacesPavel Holejsovsky
2010-09-24Add a lot of missing annotationsJohan Dahlin
2010-07-07gio/: fully remove gioalias hacksRyan Lortie
2009-12-01Use G_DEFINE_INTERFACE in gioDan Winship
Note: Since we export types with Iface in the name rather than Interface we have to use some typedefs to make this work. New interfaces should probably use Interface as the public name.
2008-12-12free the tokens when done with themRyan Lortie
2008-12-12 Ryan Lortie <desrt@desrt.ca> * gio/gicon.c (g_icon_to_string_tokenized): free the tokens when done with them svn path=/trunk/; revision=7743
2008-10-21Bug 555740 - gicon serialization Based on patch from David ZeuthenAlexander Larsson
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-07-20543504 – crash in Epiphany Web Browser: Opening local fileMatthias Clasen
2008-07-19 Matthias Clasen <mclasen@redhat.com> 543504 – crash in Epiphany Web Browser: Opening local file * gappinfo.c: * gasyncresult.c: * gdesktopappinfo.c: * gdrive.c: * gfile.c: * gicon.c: * gloadableicon.c: * gmount.c: * gseekable.c: * gvolume.c: Register types thread-safely. Patch by Christian Persch svn path=/trunk/; revision=7208
2008-06-22Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin
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 svn path=/trunk/; revision=7092
2008-02-21Doc fixesMatthias Clasen
svn path=/trunk/; revision=6554
2007-12-18Fix up includes in section docsMatthias Clasen
svn path=/trunk/; revision=6149
2007-12-01Doc improvementsMatthias Clasen
svn path=/trunk/; revision=6005
2007-11-30More coding style fixesMatthias Clasen
svn path=/trunk/; revision=5999
2007-11-29Fixes unknown meaning in GAppLaunchContext docs. Clarify asynchronous ops.Andrew Walton
* gappinfo.c: Fixes unknown meaning in GAppLaunchContext docs. * gfile.c: Clarify asynchronous ops. * gfileattribute.c: Fix entity tag docs. * gicon.c: * gthemedicon.c: Provides missing gtk-doc section, fixes API docs slighly. * gsimpleasyncresult.c: Fill in missing info in docs. * gunixinputstream.c: * gunixoutputstream.c: Be more expressive in short description. * gunixvolume.c: Remove gtk-doc stubs for non-public API. svn path=/trunk/; revision=5994
2007-11-28Added. Added. Added. Added.Alexander Larsson
2007-11-28 Alexander Larsson <alexl@redhat.com> * Makefile.am: * abicheck.sh: Added. * makegioalias.pl: Added. * pltcheck.sh: Added. * gio.symbols: Added. * *.c: * inotify/*.c Initial work on adding symbol handling. * gvfs.h: Correct ifdef guard name * fam/Makefile.am: * inotify/Makefile.am: * xdgmime/Makefile.am: Include toplevel Makefile.decl svn path=/trunk/; revision=5972
2007-11-27 Bumps documentation to 93% symbol coverage, touching most Andrew Walton
of the public files. Fixes broken function documentation prototypes. Fixes GCancellable inaccuracies. Removes unnecessary incomplete gtk-doc headers in private files. svn path=/trunk/; revision=5953
2007-11-26gio/ docs/reference/gio Merged gio-standalone into glib.Alexander Larsson
2007-11-26 Alexander Larsson <alexl@redhat.com> * Makefile.am: * configure.in: * gio-2.0-uninstalled.pc.in: * gio-2.0.pc.in: * gio-unix-2.0-uninstalled.pc.in: * gio-unix-2.0.pc.in: * gio/ * docs/reference/gio Merged gio-standalone into glib. * glib/glibintl.h: * glib/gutils.c: Export glib_gettext so that gio can use it Add P_ (using same domain for now) Add I_ as g_intern_static_string svn path=/trunk/; revision=5941