Commit Graph

26 Commits

Author SHA1 Message Date
Javier Jardón
c6243026ed Fix compilation warning: Remove unused function 2009-11-17 20:44:10 +01:00
Matthias Clasen
e63262d49d Don't give up too early when collecting mime types
Since returning exactly one match has special significance, don't
give up matching before we've found at least 2 types. Also, make
sure that we don't return the same mime type more than once.
Bug 541236.
2009-10-25 02:55:46 -04:00
Alexander Larsson
2a3710872f xdgmime: sort glob hits with larger weight first
Higher weight is more important, so return these first meaning
they will be used as the default.
2009-10-08 12:02:52 +02:00
Alexander Larsson
07ad638adf remove xdgmime test
This is getting diverged from the xdgmime copy and we don't need it here.
2009-10-02 12:55:54 +02:00
Alexander Larsson
c7c0bcef89 xdgmime - Correct the range checks for magic matching 2009-10-02 12:55:54 +02:00
Alexander Larsson
2624e7d6c6 Remove unnecessary includes 2009-10-02 12:55:54 +02:00
Alexander Larsson
e1643fd76d xdgmime - support the new case sensitive flag 2009-10-02 12:55:54 +02:00
Alexander Larsson
7c27df1fee xdgmime - support cache files with minor version 2 2009-10-02 12:55:54 +02:00
Alexander Larsson
ce239a010e Read the new glob2 format with case sensitive flags 2009-10-02 12:55:54 +02:00
Dan Winship
92ac8d165e Misc warning fixes
glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add
back missing config.h includes, and this time add them to the copies
in glib/update-pcre/ too so they don't get lost again on the next PCRE
update.

glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts

gio/xdgmime/xdgmimeglob.c: remove unused variable

gio/tests/live-g-file.c: fix printf args on x86_64

tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX
2009-05-01 10:37:45 -04:00
Matthias Clasen
f8cfff0686 Don't assume filenames are UTF-8.
* xdgmime/xdgmimecache.c:
        * xdgmime/xdgmimeglob.c: Don't assume filenames are UTF-8.

svn path=/trunk/; revision=7784
2009-01-09 05:19:17 +00:00
Matthias Clasen
a6b965efa1 Make tests work with current shared-mime-info
svn path=/trunk/; revision=7783
2009-01-09 04:53:14 +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
Matthias Clasen
a8c88cae76 Bug 555711 – Wrong fallback order of mimetype icons
* gcontenttype.c: Don't prefer generic icons over
        default mimetype icons.

        * xdgmime/xdgmimecache.c (xdg_mime_cache_get_icon):
        * xdgmime/xdgmime.c (xdg_mime_get_icon): Don't fall back
        to generic icons.
        Patch by Krysztof Kosiński


svn path=/trunk/; revision=7587
2008-10-10 05:07:56 +00:00
Matthias Clasen
80e11e1d4f Bug 551149 – xdgmime mem leak
2008-09-06  Matthias Clasen  <mclasen@redhat.com>

        Bug 551149 – xdgmime mem leak

        * xdgmime/xdgmime.c (xdg_mime_init_from_directory): Plug
        a memory leak. Patch by Christian Persch


svn path=/trunk/; revision=7441
2008-09-07 03:28:56 +00:00
Carlos Garcia Campos
f5edeb8c0f Bug 546079 – leak in xdgmime
2008-08-03  Carlos Garcia Campos  <carlosgc@gnome.org>

	Bug 546079 – leak in xdgmime
	
	* xdgmime/xdgmime.c (xdg_mime_shutdown): Fix memory leak.


svn path=/trunk/; revision=7292
2008-08-03 18:49:12 +00:00
Johan Dahlin
761424465a Include "config.h" instead of <config.h> Command used: find -name
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-06-22 15:10:51 +00:00
Matthias Clasen
9331b3f1ce Fix the build
svn path=/trunk/; revision=6977
2008-06-09 21:38:35 +00:00
Matthias Clasen
2bd31c9e6c Sync with upstream
svn path=/trunk/; revision=6975
2008-06-09 16:45:19 +00:00
Matthias Clasen
9fd295d285 Rework the timestamp checking code to protect against duplicate
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        * xdgmime/xdgmime.c: Rework the timestamp checking code
        to protect against duplicate directories in XDG_DATA_DIRS.
        Fixes fd.o bug 12513, reported by Joe Shaw.



svn path=/trunk/; revision=6859
2008-04-16 21:55:32 +00:00
Matthias Clasen
07ad3555ed Partically revert the last commit after realizing that
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Partically revert the last commit after realizing that
        xdg_mime_media_type_equal doesn't have to init at all.

        * xdgmime/xdgmime.h:
        * xdgmime/xdgmime.c: Get rid of _xdg_mime_media_type_equal

        * xdgmime/xdgmimecache.c: Use xdg_mime_media_type_equal

svn path=/trunk/; revision=6857
2008-04-16 17:13:19 +00:00
Matthias Clasen
101521f6e4 Avoid possible memory corruption in xdgmime, fd.o bug 12512, reported by
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Avoid possible memory corruption in xdgmime, fd.o bug 12512,
        reported by Joe Shaw and Federico Mena Quintero.

        * xdgmime/xdgmime.c(_xdg_mime_media_type_equal): Implement.
        (xdg_mime_media_type_equal): Turn into a wrapper around the
        _-prefixed version.

        * xdgmime/xdgmimecache.c: Use the _-prefixed versions of comparison
        functions throughout.


svn path=/trunk/; revision=6854
2008-04-16 16:54:44 +00:00
Alexander Larsson
5241d96b21 Fix sparse warnings (#519489)
2008-03-06  Alexander Larsson  <alexl@redhat.com>

        * gdesktopappinfo.c:
        * gfilemonitor.c:
        * gthemedicon.c:
        * gunionvolumemonitor.c:
        * gunixmounts.c:
        * tests/g-file.c:
        * tests/live-g-file.c:
        * xdgmime/xdgmimecache.c:
	Fix sparse warnings (#519489)


svn path=/trunk/; revision=6632
2008-03-06 09:53:35 +00:00
Alexander Larsson
e064f28435 Use list_parents, not get_parents from xdgmime, because the later doesn't
2008-01-29  Alexander Larsson  <alexl@redhat.com>

        * gcontenttype.c:
        (_g_unix_content_type_get_parents):
	Use list_parents, not get_parents from xdgmime, because
	the later doesn't use the cache.
	
        * xdgmime/xdgmimecache.c:
        (_xdg_mime_cache_list_mime_parents):
	Don't list the same type as parent multiple times.


svn path=/trunk/; revision=6407
2008-01-29 10:20:49 +00:00
Alexander Larsson
7f3280230b Added. Added. Added. Added.
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-28 12:39:07 +00:00
Alexander Larsson
3781343738 gio/ docs/reference/gio Merged gio-standalone into glib.
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
2007-11-26 16:13:05 +00:00