gnome-terminal r2384 - in trunk: . src



Author: chpe
Date: Mon Feb 11 22:02:24 2008
New Revision: 2384
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2384&view=rev

Log:
2008-01-30  Andre Klapper  <a9016009 gmx de>

	Bug 511700 â port to gio

	* configure.in:
	* src/profile-editor.c:
	* src/terminal-screen.c: Port to gio, cleanup.
 

Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/src/profile-editor.c
   trunk/src/terminal-screen.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Feb 11 22:02:24 2008
@@ -30,8 +30,6 @@
 GCONF_REQUIRED=2.14.0
 STARTUP_NOTIFICATION_REQUIRED=0.8
 VTE_REQUIRED=0.15.3
-GNOMEVFS_REQUIRED=2.4
-GLIB_REQUIRED=2.12.0
 LIBGNOME_REQUIRED=2.14.0
 
 ## here we get the flags we'll actually use
@@ -39,13 +37,12 @@
  glib-2.0 >= $GLIB_REQUIRED dnl
  gtk+-2.0 >= $GTK_REQUIRED dnl
  gconf-2.0 >= $GCONF_REQUIRED dnl
+ gio-2.0 dnl
  libglade-2.0 dnl
  libgnomeui-2.0 dnl
  libgnome-2.0 >= $LIBGNOME_REQUIRED dnl
  libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_REQUIRED dnl
- vte >= $VTE_REQUIRED dnl
- gnome-vfs-2.0 >= $GNOMEVFS_REQUIRED dnl
- glib-2.0 >= $GLIB_REQUIRED)
+ vte >= $VTE_REQUIRED)
 
 TERM_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $TERM_LIBS"
 TERM_CFLAGS="$X_CFLAGS $TERM_CFLAGS"

Modified: trunk/src/profile-editor.c
==============================================================================
--- trunk/src/profile-editor.c	(original)
+++ trunk/src/profile-editor.c	Mon Feb 11 22:02:24 2008
@@ -24,10 +24,10 @@
 #include "terminal-intl.h"
 #include "terminal.h"
 #include <glade/glade.h>
+#include <gio/gio.h>
 #include <libgnomeui/gnome-file-entry.h>
 #include <libgnomeui/gnome-icon-entry.h>
 #include <libgnomeui/gnome-thumbnail.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
 #include <string.h>
 #include <math.h>
 #include "terminal-widget.h"
@@ -810,18 +810,28 @@
     if (g_file_test (file, G_FILE_TEST_EXISTS) == TRUE) {
 
       GnomeThumbnailFactory *thumbs;
-      gchar *mime_type;
+      const char *mime_type = NULL;
+      GFile *file1;
+      GFileInfo *file_info;
+
+      file1 = g_file_new_for_uri (file);
+      file_info = g_file_query_info (file1, 
+                                     G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+                                     0, NULL, NULL);
+      if (file_info != NULL) {
+        mime_type = g_file_info_get_content_type (file_info);
+      }
+      g_object_unref (file1);
 
-      mime_type = (gchar *)gnome_vfs_get_mime_type (file);
       if (mime_type != NULL) {
         thumbs = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
 
         pixbuf = gnome_thumbnail_factory_generate_thumbnail (thumbs,
                                                              file,
                                                              mime_type);
-        g_free (mime_type);
         g_object_unref (thumbs);
       }
+      g_object_unref (file_info);
     }
   }				
   return pixbuf;

Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c	(original)
+++ trunk/src/terminal-screen.c	Mon Feb 11 22:02:24 2008
@@ -36,7 +36,6 @@
 #include "skey-popup.h"
 #include <libgnome/gnome-util.h> /* gnome_util_user_shell */
 #include <libgnome/gnome-url.h> /* gnome_url_show */
-#include <libgnomevfs/gnome-vfs-utils.h> /* gnome_vfs_make_uri_from_input */
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>



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