gimp r25139 - in trunk: . app/plug-in



Author: neo
Date: Thu Mar 20 11:56:13 2008
New Revision: 25139
URL: http://svn.gnome.org/viewvc/gimp?rev=25139&view=rev

Log:
2008-03-20  Sven Neumann  <sven gimp org>

	* app/plug-in/gimppluginprocedure.c
	(gimp_plug_in_procedure_set_file_proc): don't allow "file:" to be
	registered as prefix. This seems to happen with the uri-gio plug-in
	when no gvfs backends are installed.



Modified:
   trunk/ChangeLog
   trunk/app/plug-in/gimppluginprocedure.c

Modified: trunk/app/plug-in/gimppluginprocedure.c
==============================================================================
--- trunk/app/plug-in/gimppluginprocedure.c	(original)
+++ trunk/app/plug-in/gimppluginprocedure.c	Thu Mar 20 11:56:13 2008
@@ -848,6 +848,8 @@
                                       const gchar         *prefixes,
                                       const gchar         *magics)
 {
+  GSList *list;
+
   g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
 
   proc->file_proc = TRUE;
@@ -888,6 +890,19 @@
 
   proc->prefixes_list = extensions_parse (proc->prefixes);
 
+  /* don't allow "file:" to be registered as prefix */
+  for (list = proc->prefixes_list; list; list = g_slist_next (list))
+    {
+      const gchar *prefix = list->data;
+
+      if (prefix && strcmp (prefix, "file:") == 0)
+        {
+          g_free (list->data);
+          proc->prefixes_list = g_slist_delete_link (proc->prefixes_list, list);
+          break;
+        }
+    }
+
   /*  magics  */
 
   if (proc->magics != magics)



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