gtk+ r20332 - in trunk: . gtk



Author: matthiasc
Date: Sun Jun  8 05:50:46 2008
New Revision: 20332
URL: http://svn.gnome.org/viewvc/gtk+?rev=20332&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/gtk/gtkfilefilter.c
   trunk/gtk/gtkrecentfilter.c
   trunk/gtk/gtkrecentmanager.c

Modified: trunk/gtk/gtkfilefilter.c
==============================================================================
--- trunk/gtk/gtkfilefilter.c	(original)
+++ trunk/gtk/gtkfilefilter.c	Sun Jun  8 05:50:46 2008
@@ -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 @@
       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:

Modified: trunk/gtk/gtkrecentfilter.c
==============================================================================
--- trunk/gtk/gtkrecentfilter.c	(original)
+++ trunk/gtk/gtkrecentfilter.c	Sun Jun  8 05:50:46 2008
@@ -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 @@
       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:

Modified: trunk/gtk/gtkrecentmanager.c
==============================================================================
--- trunk/gtk/gtkrecentmanager.c	(original)
+++ trunk/gtk/gtkrecentmanager.c	Sun Jun  8 05:50:46 2008
@@ -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"
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]