totem r5397 - in trunk: . browser-plugin
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5397 - in trunk: . browser-plugin
- Date: Thu, 8 May 2008 17:30:50 +0100 (BST)
Author: hadess
Date: Thu May 8 16:30:50 2008
New Revision: 5397
URL: http://svn.gnome.org/viewvc/totem?rev=5397&view=rev
Log:
2008-05-08 Bastien Nocera <hadess hadess net>
* browser-plugin/totemBasicPlugin.cpp: Add Totem specific
application/x-totem-plugin mime-type (Closes: #531734)
* browser-plugin/totemPluginGlue.cpp: Use GIO to get the description
of mime-types
Modified:
trunk/ChangeLog
trunk/browser-plugin/totemBasicPlugin.cpp
trunk/browser-plugin/totemPluginGlue.cpp
Modified: trunk/browser-plugin/totemBasicPlugin.cpp
==============================================================================
--- trunk/browser-plugin/totemBasicPlugin.cpp (original)
+++ trunk/browser-plugin/totemBasicPlugin.cpp Thu May 8 16:30:50 2008
@@ -64,6 +64,7 @@
{ "audio/mpeg", "mp3", NULL },
{ "application/x-nsv-vp3-mp3", "nsv", "video/x-nsv" },
{ "video/flv", "flv", "application/x-flash-video" },
+ { "application/x-totem-plugin", "", "application/octet-stream" },
};
totemScriptablePlugin::totemScriptablePlugin (totemPlugin *aPlugin)
Modified: trunk/browser-plugin/totemPluginGlue.cpp
==============================================================================
--- trunk/browser-plugin/totemPluginGlue.cpp (original)
+++ trunk/browser-plugin/totemPluginGlue.cpp Thu May 8 16:30:50 2008
@@ -23,9 +23,7 @@
#include <mozilla-config.h>
#include "config.h"
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <libgnomevfs/gnome-vfs-mime-info.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
+#include <gio/gio.h>
#include <dlfcn.h>
#include "npapi.h"
@@ -370,24 +368,25 @@
PRUint32 count;
totemScriptablePlugin::PluginMimeTypes (&mimetypes, &count);
for (PRUint32 i = 0; i < count; ++i) {
- const char *desc;
+ char *desc;
if (totem_plugin_mimetype_is_disabled (mimetypes[i].mimetype, system, user))
continue;
- desc = gnome_vfs_mime_get_description (mimetypes[i].mimetype);
+ desc = g_content_type_get_description (mimetypes[i].mimetype);
if (desc == NULL && mimetypes[i].mime_alias != NULL) {
- desc = gnome_vfs_mime_get_description
+ desc = g_content_type_get_description
(mimetypes[i].mime_alias);
}
if (desc == NULL) {
- desc = mimetypes[i].mime_alias;
+ desc = g_strdup (mimetypes[i].mime_alias);
}
g_string_append_printf (list,"%s:%s:%s;",
mimetypes[i].mimetype,
mimetypes[i].extensions,
desc ? desc : "-");
+ g_free (desc);
}
mime_list = g_string_free (list, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]