Commit e0ca75c1 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Replace uses of xdgmime with g_content_type.

2008-06-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkrecentmanager.c:
        * gtk/gtkrecentfilter.c:
        * gtk/gtkfilefilter.c: Replace uses of xdgmime with
        g_content_type.


svn path=/trunk/; revision=20332
parent dcc94280
2008-06-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentmanager.c:
* gtk/gtkrecentfilter.c:
* gtk/gtkfilefilter.c: Replace uses of xdgmime with
g_content_type.
2008-06-08 Christian Persch <chpe@gnome.org>
Bug 535608 – do not string-copy accel paths in the menu code
......
......@@ -27,11 +27,6 @@
#include "gtkalias.h"
#ifdef G_OS_UNIX
#define XDG_PREFIX _gtk_xdg
#include "xdgmime/xdgmime.h"
#endif
typedef struct _GtkFileFilterClass GtkFileFilterClass;
typedef struct _FilterRule FilterRule;
......@@ -381,12 +376,8 @@ gtk_file_filter_filter (GtkFileFilter *filter,
switch (rule->type)
{
case FILTER_RULE_MIME_TYPE:
if (filter_info->mime_type != NULL
#ifdef G_OS_UNIX
&& xdg_mime_mime_type_subclass (filter_info->mime_type, rule->u.mime_type))
#else
&& strcmp (rule->u.mime_type, filter_info->mime_type) == 0)
#endif
if (filter_info->mime_type != NULL &&
g_content_type_is_a (filter_info->mime_type, rule->u.mime_type))
return TRUE;
break;
case FILTER_RULE_PATTERN:
......
......@@ -27,11 +27,6 @@
#include "gtkalias.h"
#ifdef G_OS_UNIX
#define XDG_PREFIX _gtk_xdg
#include "xdgmime/xdgmime.h"
#endif
typedef struct _GtkRecentFilterClass GtkRecentFilterClass;
typedef struct _FilterRule FilterRule;
......@@ -490,12 +485,8 @@ gtk_recent_filter_filter (GtkRecentFilter *filter,
switch (rule->type)
{
case FILTER_RULE_MIME_TYPE:
if ((filter_info->mime_type != NULL)
#ifdef G_OS_UNIX
&& (xdg_mime_mime_type_subclass (filter_info->mime_type, rule->u.mime_type)))
#else
&& (strcmp (filter_info->mime_type, rule->u.mime_type) == 0))
#endif
if (filter_info->mime_type != NULL &&
g_content_type_is_a (filter_info->mime_type, rule->u.mime_type))
return TRUE;
break;
case FILTER_RULE_APPLICATION:
......
......@@ -41,11 +41,6 @@
#include "gtkmarshalers.h"
#include "gtkalias.h"
#ifdef G_OS_UNIX
#define XDG_PREFIX _gtk_xdg
#include "xdgmime/xdgmime.h"
#endif
/* the file where we store the recently used items */
#define GTK_RECENTLY_USED_FILE ".recently-used.xbel"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment