diff options
author | Christian Neumair <cneumair@gnome.org> | 2007-06-02 09:12:29 +0000 |
---|---|---|
committer | Christian Neumair <cneumair@gnome.org> | 2007-06-02 09:12:29 +0000 |
commit | 792b0a2942299e3daa233c22b61d776acce4615e (patch) | |
tree | ec46e76c662ce46f75ef351dd90b56a7a35ee5d0 /src/xdgmime.c | |
parent | 6e4ce1287447f1c08ea825543e1492dcd40f8163 (diff) |
2007-06-02 Christian Neumair <cneumair@gnome.org>
* src/xdgmime.[ch]: Move xdg_mime_type_unknown to .rodata.
* src/xdgmime.h: Add XDG_ENTRY() entry for xdg_mime_dump.
GTK+ resync.
* src/xdgmime.c: (_xdg_mime_alias_list_lookup): Initialize mime_type
to NULL instead of 0, GNOME #341812. Thanks to Kjartan Maraas
<kmaraas@gnome.org>.
* src/xdgmime.[ch]: (xdg_mime_media_type_equal),
(_xdg_mime_media_type_equal): Add private version of
xdg_mime_media_type_equal that doesn't call xdg_mime_init(), use it in
_xdg_mime_mime_type_subclass.
Diffstat (limited to 'src/xdgmime.c')
-rw-r--r-- | src/xdgmime.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/xdgmime.c b/src/xdgmime.c index 132af2b..e236e24 100644 --- a/src/xdgmime.c +++ b/src/xdgmime.c @@ -60,7 +60,7 @@ static XdgCallbackList *callback_list = NULL; XdgMimeCache **_caches = NULL; static int n_caches = 0; -const char *xdg_mime_type_unknown = "application/octet-stream"; +const char xdg_mime_type_unknown[] = "application/octet-stream"; enum @@ -677,8 +677,8 @@ xdg_mime_mime_type_equal (const char *mime_a, } int -xdg_mime_media_type_equal (const char *mime_a, - const char *mime_b) +_xdg_mime_media_type_equal (const char *mime_a, + const char *mime_b) { char *sep; @@ -692,6 +692,15 @@ xdg_mime_media_type_equal (const char *mime_a, return 0; } +int +xdg_mime_media_type_equal (const char *mime_a, + const char *mime_b) +{ + xdg_mime_init (); + + return _xdg_mime_media_type_equal (mime_a, mime_b); +} + #if 0 static int xdg_mime_is_super_type (const char *mime) @@ -728,7 +737,7 @@ _xdg_mime_mime_type_subclass (const char *mime, #if 0 /* Handle supertypes */ if (xdg_mime_is_super_type (ubase) && - xdg_mime_media_type_equal (umime, ubase)) + _xdg_mime_media_type_equal (umime, ubase)) return 1; #endif |