X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgicon.c;h=b5080dae28e195c0daa29310e5feff40e155033f;hb=51fac05d73f8363de821eb0d6940dedca13a8c0f;hp=be5e5b77b48c702a6d75e11d4e018f656b2dfe76;hpb=03dd6cf1b55fbef243e90ee3253dacecae06cf61;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gicon.c b/gio/gicon.c index be5e5b7..b5080da 100644 --- a/gio/gicon.c +++ b/gio/gicon.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 */ @@ -195,23 +193,18 @@ g_icon_to_string_tokenized (GIcon *icon, GString *s) * The encoding of the returned string is proprietary to #GIcon except * in the following two cases * - * - * - * If @icon is a #GFileIcon, the returned string is a native path - * (such as /path/to/my icon.png) without escaping - * if the #GFile for @icon is a native file. If the file is not - * native, the returned string is the result of g_file_get_uri() - * (such as sftp://path/to/my%20icon.png). - * - * - * If @icon is a #GThemedIcon with exactly one name, the encoding is - * simply the name (such as network-server). - * - * + * - If @icon is a #GFileIcon, the returned string is a native path + * (such as `/path/to/my icon.png`) without escaping + * if the #GFile for @icon is a native file. If the file is not + * native, the returned string is the result of g_file_get_uri() + * (such as `sftp://path/to/my%20icon.png`). + * + * - If @icon is a #GThemedIcon with exactly one name, the encoding is + * simply the name (such as `network-server`). * * Virtual: to_tokens - * Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't - * be serialized. Use g_free() to free. + * Returns: (nullable): An allocated NUL-terminated UTF8 string or + * %NULL if @icon can't be serialized. Use g_free() to free. * * Since: 2.20 */ @@ -546,6 +539,8 @@ g_icon_deserialize_emblemed (GVariant *value) g_object_unref (main_icon); } + else + icon = NULL; g_variant_iter_free (emblems); g_variant_unref (icon_data); @@ -664,7 +659,7 @@ g_icon_serialize (GIcon *icon) if (!iface->serialize) { - g_critical ("g_icon_serialize() on icon type `%s' is not implemented", G_OBJECT_TYPE_NAME (icon)); + g_critical ("g_icon_serialize() on icon type '%s' is not implemented", G_OBJECT_TYPE_NAME (icon)); return NULL; } @@ -676,8 +671,8 @@ g_icon_serialize (GIcon *icon) if (!g_variant_is_of_type (result, G_VARIANT_TYPE ("(sv)"))) { - g_critical ("g_icon_serialize() on icon type `%s' returned GVariant of type `%s' but it must return " - "one with type `(sv)'", G_OBJECT_TYPE_NAME (icon), g_variant_get_type_string (result)); + g_critical ("g_icon_serialize() on icon type '%s' returned GVariant of type '%s' but it must return " + "one with type '(sv)'", G_OBJECT_TYPE_NAME (icon), g_variant_get_type_string (result)); g_variant_unref (result); result = NULL; }