X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgthemedicon.c;h=3d72bc25ffce9acea65323a0fc1b3ee3173bf6a1;hb=4482977238ae80f64c2fe318d1500f4662c73980;hp=ba658fabc64622212146e626fc25cd49f71d61df;hpb=0a7d1084a5917815eef34cf9a0bc2d140fcaa190;p=platform%2Fupstream%2Fglib.git
diff --git a/gio/gthemedicon.c b/gio/gthemedicon.c
index ba658fa..3d72bc2 100644
--- a/gio/gthemedicon.c
+++ b/gio/gthemedicon.c
@@ -13,9 +13,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see .
*
* Author: Alexander Larsson
*/
@@ -259,7 +257,7 @@ g_themed_icon_class_init (GThemedIconClass *klass)
*
* For example, if the icon name was "gnome-dev-cdrom-audio", the array
* would become
- * |[
+ * |[
* {
* "gnome-dev-cdrom-audio",
* "gnome-dev-cdrom",
@@ -347,7 +345,7 @@ g_themed_icon_new_from_names (char **iconnames,
* that can be created by shortening @iconname at '-' characters.
*
* In the following example, @icon1 and @icon2 are equivalent:
- * |[
+ * |[
* const char *names[] = {
* "gnome-dev-cdrom-audio",
* "gnome-dev-cdrom",
@@ -392,10 +390,8 @@ g_themed_icon_get_names (GThemedIcon *icon)
*
* Append a name to the list of icons from within @icon.
*
- *
* Note that doing so invalidates the hash computed by prior calls
* to g_icon_hash().
- *
*/
void
g_themed_icon_append_name (GThemedIcon *icon,
@@ -421,10 +417,8 @@ g_themed_icon_append_name (GThemedIcon *icon,
*
* Prepend a name to the list of icons from within @icon.
*
- *
* Note that doing so invalidates the hash computed by prior calls
* to g_icon_hash().
- *
*
* Since: 2.18
*/
@@ -514,7 +508,17 @@ g_themed_icon_from_tokens (gchar **tokens,
gchar **names;
int n;
- g_return_val_if_fail (version == 0, NULL);
+ icon = NULL;
+
+ if (version != 0)
+ {
+ g_set_error (error,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ _("Can't handle version %d of GThemedIcon encoding"),
+ version);
+ goto out;
+ }
names = g_new0 (gchar *, num_tokens + 1);
for (n = 0; n < num_tokens; n++)
@@ -524,6 +528,7 @@ g_themed_icon_from_tokens (gchar **tokens,
icon = g_themed_icon_new_from_names (names, num_tokens);
g_free (names);
+ out:
return icon;
}