libsounds r187 - trunk/libsounds
- From: rodrigo svn gnome org
- To: svn-commits-list gnome org
- Subject: libsounds r187 - trunk/libsounds
- Date: Mon, 11 Feb 2008 21:47:05 +0000 (GMT)
Author: rodrigo
Date: Mon Feb 11 21:47:04 2008
New Revision: 187
URL: http://svn.gnome.org/viewvc/libsounds?rev=187&view=rev
Log:
2008-02-11 Rodrigo Moya <rodrigo gnome-db org>
* sound-view.c (combo_box_changed_cb): replace GnomeVFS usage with
GIO equivalent.
Modified:
trunk/libsounds/ChangeLog
trunk/libsounds/sound-view.c
Modified: trunk/libsounds/sound-view.c
==============================================================================
--- trunk/libsounds/sound-view.c (original)
+++ trunk/libsounds/sound-view.c Mon Feb 11 21:47:04 2008
@@ -3,7 +3,6 @@
#include "sound-view.h"
#include <libgnome/libgnome.h>
#include <libgnomeui/libgnomeui.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
static GtkVBoxClass *sound_view_parent_class;
@@ -187,10 +186,17 @@
while(!valid_wav_file_chosen && gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT)
{
- gchar *mime_type;
+ gchar *mime_type, *file_contents;
+ gsize length;
+ gboolean uncertain;
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
- mime_type = gnome_vfs_get_mime_type (filename);
+
+ g_file_get_contents (filename, &file_contents, &length, NULL);
+ mime_type = g_content_type_guess (filename, (const guchar *) file_contents,
+ length, &uncertain);
+ g_free (file_contents);
+
if (mime_type && !strcmp (mime_type, "audio/x-wav") )
{
valid_wav_file_chosen = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]