[Xfce4-commits] r30057 - in thunar/branches/migration-to-gio: . docs/reference/thunarx docs/reference/thunarx/tmpl examples/tex-open-terminal plugins/thunar-apr plugins/thunar-sbr plugins/thunar-sendto-email plugins/thunar-uca plugins/thunar-wallpaper thunar thunarx
Jannis Pohlmann
jannis at xfce.org
Sat Jun 20 03:07:08 CEST 2009
Author: jannis
Date: 2009-06-20 01:07:08 +0000 (Sat, 20 Jun 2009)
New Revision: 30057
Added:
thunar/branches/migration-to-gio/thunarx/thunarx-2.pc.in
Removed:
thunar/branches/migration-to-gio/thunarx/thunarx-1.pc.in
Modified:
thunar/branches/migration-to-gio/ChangeLog
thunar/branches/migration-to-gio/configure.in.in
thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-docs.sgml
thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-sections.txt
thunar/branches/migration-to-gio/docs/reference/thunarx/tmpl/thunarx-file-info.sgml
thunar/branches/migration-to-gio/examples/tex-open-terminal/Makefile.am
thunar/branches/migration-to-gio/plugins/thunar-apr/Makefile.am
thunar/branches/migration-to-gio/plugins/thunar-apr/README
thunar/branches/migration-to-gio/plugins/thunar-sbr/Makefile.am
thunar/branches/migration-to-gio/plugins/thunar-sbr/README
thunar/branches/migration-to-gio/plugins/thunar-sbr/thunar-sbr-date-renamer.c
thunar/branches/migration-to-gio/plugins/thunar-sendto-email/Makefile.am
thunar/branches/migration-to-gio/plugins/thunar-sendto-email/main.c
thunar/branches/migration-to-gio/plugins/thunar-uca/Makefile.am
thunar/branches/migration-to-gio/plugins/thunar-uca/README
thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-model.c
thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-provider.c
thunar/branches/migration-to-gio/plugins/thunar-wallpaper/Makefile.am
thunar/branches/migration-to-gio/plugins/thunar-wallpaper/twp-provider.c
thunar/branches/migration-to-gio/thunar/Makefile.am
thunar/branches/migration-to-gio/thunar/main.c
thunar/branches/migration-to-gio/thunar/thunar-exec.h
thunar/branches/migration-to-gio/thunar/thunar-file.c
thunar/branches/migration-to-gio/thunar/thunar-file.h
thunar/branches/migration-to-gio/thunar/thunar-icon-factory.h
thunar/branches/migration-to-gio/thunar/thunar-renamer-dialog.c
thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c
thunar/branches/migration-to-gio/thunarx/Makefile.am
thunar/branches/migration-to-gio/thunarx/abicheck.sh
thunar/branches/migration-to-gio/thunarx/thunarx-file-info.c
thunar/branches/migration-to-gio/thunarx/thunarx-file-info.h
thunar/branches/migration-to-gio/thunarx/thunarx.symbols
Log:
* Makefile.am, configure.in.in, plugins/, thunarx/, thunar/:
thunarx-1 is dead, long live thunarx-2. thunarx-2 introduces three
new functions: thunarx_file_info_get_file_info() which returns the
GFileInfo of a ThunarxFileInfo,
thunarx_file_info_get_filesystem_info() which returns a GFileInfo
with filesystem information for a ThunarxFileInfo and
thunarx_file_info_get_location() which returns the GFile the
ThunarxFileInfo refers to. thunarx-2 doesn't have
thunarx_file_info_get_vfs_info() anymore. Port all plugins shipped
with Thunar from thunarx-1 to thunarx-2. Especially thunar-uca and
thunar-sendto-email need testing due to non-trivial changes. Don't
link Thunar against ThunarVFS anymore - ALL REFERENCES ARE GONE!
Modified: thunar/branches/migration-to-gio/ChangeLog
===================================================================
--- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/ChangeLog 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,3 +1,18 @@
+2009-06-20 Jannis Pohlmann <jannis at xfce.org>
+
+ * Makefile.am, configure.in.in, plugins/, thunarx/, thunar/:
+ thunarx-1 is dead, long live thunarx-2. thunarx-2 introduces three
+ new functions: thunarx_file_info_get_file_info() which returns the
+ GFileInfo of a ThunarxFileInfo,
+ thunarx_file_info_get_filesystem_info() which returns a GFileInfo
+ with filesystem information for a ThunarxFileInfo and
+ thunarx_file_info_get_location() which returns the GFile the
+ ThunarxFileInfo refers to. thunarx-2 doesn't have
+ thunarx_file_info_get_vfs_info() anymore. Port all plugins shipped
+ with Thunar from thunarx-1 to thunarx-2. Especially thunar-uca and
+ thunar-sendto-email need testing due to non-trivial changes. Don't
+ link Thunar against ThunarVFS anymore - ALL REFERENCES ARE GONE!
+
2009-06-19 Jannis Pohlmann <jannis at xfce.org>
* thunar/thunar-file.c: Nothing really.
Modified: thunar/branches/migration-to-gio/configure.in.in
===================================================================
--- thunar/branches/migration-to-gio/configure.in.in 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/configure.in.in 2009-06-20 01:07:08 UTC (rev 30057)
@@ -11,6 +11,8 @@
dnl ***************************
m4_define([thunar_verinfo], [5:1:3])
m4_define([thunar_version_api], [1])
+m4_define([thunarx_verinfo], [0:0:0])
+m4_define([thunarx_version_api], [2])
m4_define([thunar_version_major], [1])
m4_define([thunar_version_minor], [0])
m4_define([thunar_version_micro], [1])
@@ -74,12 +76,16 @@
dnl *** Substitute version information ***
dnl **************************************
THUNAR_VERINFO=thunar_verinfo()
+THUNARX_VERINFO=thunarx_verinfo()
THUNAR_VERSION_API=thunar_version_api()
+THUNARX_VERSION_API=thunarx_version_api()
THUNAR_VERSION_MAJOR=thunar_version_major()
THUNAR_VERSION_MINOR=thunar_version_minor()
THUNAR_VERSION_MICRO=thunar_version_micro()
AC_SUBST([THUNAR_VERINFO])
+AC_SUBST([THUNARX_VERINFO])
AC_SUBST([THUNAR_VERSION_API])
+AC_SUBST([THUNARX_VERSION_API])
AC_SUBST([THUNAR_VERSION_MAJOR])
AC_SUBST([THUNAR_VERSION_MINOR])
AC_SUBST([THUNAR_VERSION_MICRO])
@@ -499,7 +505,7 @@
thunar-vfs/thunar-vfs-1.pc
thunar-vfs/thunar-vfs-config.h
thunarx/Makefile
-thunarx/thunarx-1.pc
+thunarx/thunarx-2.pc
thunarx/thunarx-config.h
])
Modified: thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-docs.sgml
===================================================================
--- thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-docs.sgml 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-docs.sgml 2009-06-20 01:07:08 UTC (rev 30057)
@@ -208,8 +208,8 @@
<para>
Providers are <link linkend="ThunarxProviderPlugin"><type>ThunarxProviderPlugin</type></link>s loaded from shared libraries
- installed in <filename role="directory">$libdir/thunarx-1/</filename>. The shared libraries are linked against the
- <systemitem class="library">thunarx-1</systemitem> library.
+ installed in <filename role="directory">$libdir/thunarx-2/</filename>. The shared libraries are linked against the
+ <systemitem class="library">thunarx-2</systemitem> library.
</para>
<para>
@@ -317,13 +317,13 @@
The following interactive shell session demonstrates how <literal>pkg-config</literal>
is used (the actual output on your system will be different):
<screen>
-$ pkg-config --cflags thunarx-1
--DXTHREADS -DXUSE_MTSAFE_API -I/opt/local/include/thunarx-1 -I/usr/local/include/atk-1.0 \
+$ pkg-config --cflags thunarx-2
+-DXTHREADS -DXUSE_MTSAFE_API -I/opt/local/include/thunarx-2 -I/usr/local/include/atk-1.0 \
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include/gtk-2.0 \
-I/usr/X11R6/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/X11R6/include/pango-1.0 \
-I/usr/local/include/freetype2 -I/usr/local/include
-$ pkg-config --libs thunarx-1
--Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib -L/usr/X11R6/lib -L/opt/local/lib -lthunarx-1</screen>
+$ pkg-config --libs thunarx-2
+-Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib -L/usr/X11R6/lib -L/opt/local/lib -lthunarx-2</screen>
</para>
<para>
@@ -332,7 +332,7 @@
quotes</emphasis>), then its output will be substituted into the command line before
execution. So to compile an extension, you would type the following:
<screen>
-$ gcc -shared -fPIC -DPIC `pkg-config --cflags --libs thunarx-1` foo.c -o foo.so</screen>
+$ gcc -shared -fPIC -DPIC `pkg-config --cflags --libs thunarx-2` foo.c -o foo.so</screen>
</para>
</sect2>
@@ -344,16 +344,16 @@
you can use the following command (as mentioned above, the output will be different
on your system):
<screen>
-$ pkg-config --variable=extensionsdir thunarx-1
-/opt/local/lib/thunarx-1</screen>
+$ pkg-config --variable=extensionsdir thunarx-2
+/opt/local/lib/thunarx-2</screen>
</para>
<para>
For example, to install the extension <filename>foo.so</filename> on your system,
you would type the following:
<screen>
-$ install -d `pkg-config --variable=extensionsdir thunarx-1`
-$ install -c -m 0755 foo.so `pkg-config --variable=extensionsdir thunarx-1`/foo.so</screen>
+$ install -d `pkg-config --variable=extensionsdir thunarx-2`
+$ install -c -m 0755 foo.so `pkg-config --variable=extensionsdir thunarx-2`/foo.so</screen>
</para>
</sect2>
</sect1>
Modified: thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-sections.txt
===================================================================
--- thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-sections.txt 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/docs/reference/thunarx/thunarx-sections.txt 2009-06-20 01:07:08 UTC (rev 30057)
@@ -12,7 +12,9 @@
thunarx_file_info_get_mime_type
thunarx_file_info_has_mime_type
thunarx_file_info_is_directory
-thunarx_file_info_get_vfs_info
+thunarx_file_info_get_file_info
+thunarx_file_info_get_filesystem_info
+thunarx_file_info_get_location
thunarx_file_info_changed
thunarx_file_info_renamed
THUNARX_TYPE_FILE_INFO_LIST
Modified: thunar/branches/migration-to-gio/docs/reference/thunarx/tmpl/thunarx-file-info.sgml
===================================================================
--- thunar/branches/migration-to-gio/docs/reference/thunarx/tmpl/thunarx-file-info.sgml 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/docs/reference/thunarx/tmpl/thunarx-file-info.sgml 2009-06-20 01:07:08 UTC (rev 30057)
@@ -31,7 +31,9 @@
@get_mime_type: See thunarx_file_info_get_mime_type().
@has_mime_type: See thunarx_file_info_has_mime_type().
@is_directory: See thunarx_file_info_is_directory().
- at get_vfs_info: See thunarx_file_info_get_vfs_info().
+ at get_file_info: See thunarx_file_info_get_file_info().
+ at get_filesystem_info: See thunarx_filesystem_info_get_filesystem_info().
+ at get_location: See thunarx_location_get_location().
@changed: See thunarx_file_info_changed().
@renamed: See thunarx_file_info_renamed().
@@ -120,7 +122,7 @@
@Returns:
-<!-- ##### FUNCTION thunarx_file_info_get_vfs_info ##### -->
+<!-- ##### FUNCTION thunarx_file_info_get_file_info ##### -->
<para>
</para>
@@ -129,6 +131,24 @@
@Returns:
+<!-- ##### FUNCTION thunarx_file_info_get_filesystem_info ##### -->
+<para>
+
+</para>
+
+ at file_info:
+ at Returns:
+
+
+<!-- ##### FUNCTION thunarx_file_info_get_location ##### -->
+<para>
+
+</para>
+
+ at file_info:
+ at Returns:
+
+
<!-- ##### FUNCTION thunarx_file_info_changed ##### -->
<para>
Modified: thunar/branches/migration-to-gio/examples/tex-open-terminal/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/examples/tex-open-terminal/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/examples/tex-open-terminal/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -7,7 +7,7 @@
-DG_LOG_DOMAIN=\"TexOpenTerminal\" \
$(PLATFORM_CPPFLAGS)
-extensionsdir = $(libdir)/thunarx-$(THUNAR_VERSION_API)
+extensionsdir = $(libdir)/thunarx-$(THUNARX_VERSION_API)
extensions_LTLIBRARIES = \
tex-open-terminal.la
@@ -21,10 +21,10 @@
$(PLATFORM_CFLAGS)
tex_open_terminal_la_DEPENDENCIES = \
- $(top_builddir)/thunarx/libthunarx-$(THUNAR_VERSION_API).la
+ $(top_builddir)/thunarx/libthunarx-$(THUNARX_VERSION_API).la
tex_open_terminal_la_LIBADD = \
- $(top_builddir)/thunarx/libthunarx-$(THUNAR_VERSION_API).la \
+ $(top_builddir)/thunarx/libthunarx-$(THUNARX_VERSION_API).la \
$(GTK_LIBS)
tex_open_terminal_la_LDFLAGS = \
Modified: thunar/branches/migration-to-gio/plugins/thunar-apr/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-apr/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-apr/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -9,7 +9,7 @@
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
$(PLATFORM_CPPFLAGS)
-extensionsdir = $(libdir)/thunarx-$(THUNAR_VERSION_API)
+extensionsdir = $(libdir)/thunarx-$(THUNARX_VERSION_API)
extensions_LTLIBRARIES = \
thunar-apr.la
Modified: thunar/branches/migration-to-gio/plugins/thunar-apr/README
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-apr/README 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-apr/README 2009-06-20 01:07:08 UTC (rev 30057)
@@ -24,6 +24,6 @@
and so you can pass `--disable-apr-plugin' to configure and the plugin
won't be built and installed. Since it is an extension, you can also
easily uninstall it afterwards by removing the thunar-apr.so file from
-the lib/thunarx-1/ directory of your installation (be sure to quit Thunar
+the lib/thunarx-2/ directory of your installation (be sure to quit Thunar
before removing files though).
Modified: thunar/branches/migration-to-gio/plugins/thunar-sbr/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-sbr/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-sbr/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -8,7 +8,7 @@
-DG_LOG_DOMAIN=\"thunar-sbr\" \
$(PLATFORM_CPPFLAGS)
-extensionsdir = $(libdir)/thunarx-$(THUNAR_VERSION_API)
+extensionsdir = $(libdir)/thunarx-$(THUNARX_VERSION_API)
extensions_LTLIBRARIES = \
thunar-sbr.la
Modified: thunar/branches/migration-to-gio/plugins/thunar-sbr/README
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-sbr/README 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-sbr/README 2009-06-20 01:07:08 UTC (rev 30057)
@@ -16,7 +16,7 @@
shouldn't be a real problem unless you're targeting an embedded system), and so
you can pass `--disable-sbr-plugin' to configure and the plugin won't be built
and installed. Since it is an extension, you can also easily uninstall it
-afterwards by removing the thunar-sbr.so file from the lib/thunarx-1/ directory
+afterwards by removing the thunar-sbr.so file from the lib/thunarx-2/ directory
of your installation (be sure to quit Thunar before removing files though).
Modified: thunar/branches/migration-to-gio/plugins/thunar-sbr/thunar-sbr-date-renamer.c
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-sbr/thunar-sbr-date-renamer.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-sbr/thunar-sbr-date-renamer.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -2,6 +2,7 @@
/*-
* Copyright (c) 2007 Nick Schermer <nick at xfce.org>
* Copyright (c) 2007 Benedikt Meurer <benny at xfce.org>
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -36,7 +37,6 @@
#include <exo/exo.h>
#include <thunar-sbr/thunar-sbr-date-renamer.h>
-#include <thunar-vfs/thunar-vfs.h>
#ifdef HAVE_EXIF
#include <libexif/exif-data.h>
@@ -56,28 +56,28 @@
-static void thunar_sbr_date_renamer_class_init (ThunarSbrDateRenamerClass *klass);
-static void thunar_sbr_date_renamer_init (ThunarSbrDateRenamer *date_renamer);
-static void thunar_sbr_date_renamer_finalize (GObject *object);
-static void thunar_sbr_date_renamer_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static void thunar_sbr_date_renamer_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static gchar *thunar_sbr_get_time_string (ThunarVfsFileTime file_time,
- const gchar *custom_format);
+static void thunar_sbr_date_renamer_class_init (ThunarSbrDateRenamerClass *klass);
+static void thunar_sbr_date_renamer_init (ThunarSbrDateRenamer *date_renamer);
+static void thunar_sbr_date_renamer_finalize (GObject *object);
+static void thunar_sbr_date_renamer_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void thunar_sbr_date_renamer_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static gchar *thunar_sbr_get_time_string (guint64 file_time,
+ const gchar *custom_format);
#ifdef HAVE_EXIF
-static ThunarVfsFileTime thunar_sbr_get_time_from_string (const gchar *string);
+static guint64 thunar_sbr_get_time_from_string (const gchar *string);
#endif
-static ThunarVfsFileTime thunar_sbr_get_time (ThunarxFileInfo *file,
- ThunarSbrDateMode mode);
-static gchar *thunar_sbr_date_renamer_process (ThunarxRenamer *renamer,
- ThunarxFileInfo *file,
- const gchar *text,
- guint index);
+static guint64 thunar_sbr_get_time (ThunarxFileInfo *file,
+ ThunarSbrDateMode mode);
+static gchar *thunar_sbr_date_renamer_process (ThunarxRenamer *renamer,
+ ThunarxFileInfo *file,
+ const gchar *text,
+ guint index);
@@ -362,16 +362,19 @@
static gchar *
-thunar_sbr_get_time_string (ThunarVfsFileTime file_time,
- const gchar *format)
+thunar_sbr_get_time_string (guint64 file_time,
+ const gchar *format)
{
struct tm *tm;
+ time_t time;
gchar *converted;
gchar buffer[1024];
gint length;
+ time = (time_t) file_time;
+
/* determine the local file time */
- tm = localtime (&file_time);
+ tm = localtime (&time);
/* conver the format to the current locale */
converted = g_locale_from_utf8 (format, -1, NULL, NULL, NULL);
@@ -393,7 +396,7 @@
#ifdef HAVE_EXIF
-static ThunarVfsFileTime
+static guint64
thunar_sbr_get_time_from_string (const gchar *string)
{
struct tm tm;
@@ -435,18 +438,18 @@
-static ThunarVfsFileTime
+static guint64
thunar_sbr_get_time (ThunarxFileInfo *file,
ThunarSbrDateMode mode)
{
- ThunarVfsInfo *vfs_info;
- ThunarVfsFileTime file_time = 0;
+ GFileInfo *file_info;
+ guint64 file_time = 0;
#ifdef HAVE_EXIF
- gchar *uri, *filename;
- ExifEntry *exif_entry;
- ExifData *exif_data;
- gchar exif_buffer[128];
+ gchar *uri, *filename;
+ ExifEntry *exif_entry;
+ ExifData *exif_data;
+ gchar exif_buffer[128];
#endif
switch (mode)
@@ -458,17 +461,23 @@
case THUNAR_SBR_DATE_MODE_ATIME:
case THUNAR_SBR_DATE_MODE_MTIME:
- /* get the vfs info */
- vfs_info = thunarx_file_info_get_vfs_info (file);
+ /* get the file info */
+ file_info = thunarx_file_info_get_file_info (file);
/* get the time from the info */
if (mode == THUNAR_SBR_DATE_MODE_ATIME)
- file_time = vfs_info->atime;
+ {
+ file_time = g_file_info_get_attribute_uint64 (file_info,
+ G_FILE_ATTRIBUTE_TIME_ACCESS);
+ }
else
- file_time = vfs_info->mtime;
+ {
+ file_time = g_file_info_get_attribute_uint64 (file_info,
+ G_FILE_ATTRIBUTE_TIME_MODIFIED);
+ }
- /* release the vfs info */
- thunar_vfs_info_unref (vfs_info);
+ /* release the file info */
+ g_object_unref (file_info);
break;
#ifdef HAVE_EXIF
@@ -530,7 +539,7 @@
{
ThunarSbrDateRenamer *date_renamer = THUNAR_SBR_DATE_RENAMER (renamer);
gchar *string;
- ThunarVfsFileTime file_time;
+ guint64 file_time;
const gchar *s;
GString *result;
guint text_length;
Modified: thunar/branches/migration-to-gio/plugins/thunar-sendto-email/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-sendto-email/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-sendto-email/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -19,11 +19,7 @@
$(EXO_CFLAGS) \
$(PLATFORM_CFLAGS)
-thunar_sendto_email_DEPENDENCIES = \
- $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VERSION_API).la
-
thunar_sendto_email_LDADD = \
- $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VERSION_API).la \
$(EXO_LIBS) \
$(PLATFORM_LDFLAGS)
Modified: thunar/branches/migration-to-gio/plugins/thunar-sendto-email/main.c
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-sendto-email/main.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-sendto-email/main.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,6 +1,7 @@
/* $Id$ */
/*-
* Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -53,12 +54,26 @@
#include <unistd.h>
#endif
+#include <glib.h>
#include <glib/gstdio.h>
+#include <gio/gio.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <gtk/gtk.h>
+#include <exo/exo.h>
+
+typedef struct _TseData TseData;
+
+struct _TseData
+{
+ GFileInfo *info;
+ GFile *file;
+};
+
+
+
/* well known archive types */
static const char *TSE_MIME_TYPES[] = {
"application/x-ar",
@@ -129,28 +144,33 @@
static gint
tse_ask_compress (GList *infos)
{
- ThunarVfsFileSize total_size = 0;
- ThunarVfsInfo *info;
- GtkWidget *message;
- GList *lp;
- gint response = TSE_RESPONSE_PLAIN;
- gint n_archives = 0;
- gint n_infos = 0;
- guint n;
+ const gchar *content_type;
+ TseData *tse_data;
+ GtkWidget *message;
+ guint64 total_size = 0;
+ GList *lp;
+ gint response = TSE_RESPONSE_PLAIN;
+ gint n_archives = 0;
+ gint n_infos = 0;
+ guint n;
/* check the file infos */
for (lp = infos; lp != NULL; lp = lp->next, ++n_infos)
{
/* need to compress if we have any directories */
- info = (ThunarVfsInfo *) lp->data;
- if (info->type == THUNAR_VFS_FILE_TYPE_DIRECTORY)
+ tse_data = (TseData *) lp->data;
+
+ if (g_file_info_get_file_type (tse_data->info) == G_FILE_TYPE_DIRECTORY)
return TSE_RESPONSE_COMPRESS;
/* check if the single file is already an archive */
for (n = 0; n < G_N_ELEMENTS (TSE_MIME_TYPES); ++n)
{
+ /* determine the content type */
+ content_type = g_file_info_get_content_type (tse_data->info);
+
/* check if this mime type matches */
- if (strcmp (thunar_vfs_mime_info_get_name (info->mime_info), TSE_MIME_TYPES[n]) == 0)
+ if (content_type != NULL && g_content_type_is_a (content_type, TSE_MIME_TYPES[n]))
{
/* yep, that's a match then */
++n_archives;
@@ -159,7 +179,7 @@
}
/* add file size to total */
- total_size += info->size;
+ total_size += g_file_info_get_size (tse_data->info);
}
/* check if the total size is larger than 200KiB, or we have more than
@@ -171,9 +191,10 @@
if (G_LIKELY (n_infos == 1))
{
/* ask the user whether to compress the file */
- info = (ThunarVfsInfo *) infos->data;
+ tse_data = (TseData *) infos->data;
message = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
- _("Send \"%s\" as compressed archive?"), info->display_name);
+ _("Send \"%s\" as compressed archive?"),
+ g_file_info_get_display_name (tse_data->info));
gtk_dialog_add_button (GTK_DIALOG (message), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (GTK_DIALOG (message), _("Send _directly"), TSE_RESPONSE_PLAIN);
gtk_dialog_add_button (GTK_DIALOG (message), _("Send com_pressed"), TSE_RESPONSE_COMPRESS);
@@ -363,11 +384,13 @@
tse_compress (GList *infos,
gchar **zipfile_return)
{
- ThunarVfsPath *parent;
- ThunarVfsInfo *info;
+ TseData *tse_data;
gboolean succeed = TRUE;
GError *error = NULL;
+ GFile *parent;
+ GFile *parent_parent;
gchar **argv;
+ gchar *basename;
gchar *zipfile;
gchar *tmppath;
gchar *tmpdir;
@@ -391,8 +414,8 @@
if (G_LIKELY (infos != NULL && infos->next == NULL))
{
/* determine the name for the ZIP file */
- info = (ThunarVfsInfo *) infos->data;
- path = g_strdup (info->display_name);
+ tse_data = (TseData *) infos->data;
+ path = g_strdup (g_file_info_get_display_name (tse_data->info));
dot = strrchr (path, '.');
if (G_LIKELY (dot != NULL))
*dot = '\0';
@@ -402,18 +425,31 @@
else
{
/* determine the name for the ZIP file */
- info = (ThunarVfsInfo *) infos->data;
- parent = thunar_vfs_path_get_parent (info->path);
- if (!thunar_vfs_path_is_root (parent))
+ tse_data = (TseData *) infos->data;
+ parent = g_file_get_parent (tse_data->file);
+
+ /* we assume the parent exists because we only allow non-root
+ * files as TseData in main () */
+ g_assert (parent != NULL);
+
+ parent_parent = g_file_get_parent (parent);
+
+ if (parent_parent != NULL)
{
/* use the parent directory's name */
- zipfile = g_strconcat (tmpdir, G_DIR_SEPARATOR_S, thunar_vfs_path_get_name (parent), ".zip", NULL);
+ basename = g_file_get_basename (parent);
+ zipfile = g_strconcat (tmpdir, G_DIR_SEPARATOR_S, basename, ".zip", NULL);
+ g_free (basename);
+
+ g_object_unref (parent_parent);
}
else
{
/* use the first file's name */
- zipfile = g_strconcat (tmpdir, G_DIR_SEPARATOR_S, info->display_name, ".zip", NULL);
+ zipfile = g_strconcat (tmpdir, G_DIR_SEPARATOR_S, g_file_info_get_display_name (tse_data->info), ".zip", NULL);
}
+
+ g_object_unref (parent);
}
/* generate the argument list for the ZIP command */
@@ -425,24 +461,34 @@
for (lp = infos, n = 4; lp != NULL && succeed; lp = lp->next, ++n)
{
/* create a symlink for the file to the tmp dir */
- info = (ThunarVfsInfo *) lp->data;
- path = thunar_vfs_path_dup_string (info->path);
- tmppath = g_build_filename (tmpdir, thunar_vfs_path_get_name (info->path), NULL);
- succeed = (symlink (path, tmppath) == 0);
- if (G_UNLIKELY (!succeed))
+ tse_data = (TseData *) lp->data;
+ path = g_file_get_path (tse_data->file);
+
+ if (path == NULL)
{
- /* tell the user that we failed to create a symlink for this file */
- error = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (errno), g_strerror (errno));
- tse_error (error, _("Failed to create symbolic link for \"%s\""), info->display_name);
+ error = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (ENOTSUP), g_strerror (errno));
+ tse_error (error, _("Failed to create symbolic link for \"%s\""), g_file_info_get_display_name (tse_data->info));
g_error_free (error);
}
else
{
- /* add the file to the ZIP command line */
- argv[n] = g_path_get_basename (tmppath);
+ tmppath = g_build_filename (tmpdir, g_file_get_basename (tse_data->file), NULL);
+ succeed = (symlink (path, tmppath) == 0);
+ if (G_UNLIKELY (!succeed))
+ {
+ /* tell the user that we failed to create a symlink for this file */
+ error = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (errno), g_strerror (errno));
+ tse_error (error, _("Failed to create symbolic link for \"%s\""), g_file_info_get_display_name (tse_data->info));
+ g_error_free (error);
+ }
+ else
+ {
+ /* add the file to the ZIP command line */
+ argv[n] = g_path_get_basename (tmppath);
+ }
+ g_free (tmppath);
+ g_free (path);
}
- g_free (tmppath);
- g_free (path);
}
/* check if we succeed up to this point */
@@ -489,8 +535,10 @@
int
main (int argc, char **argv)
{
- ThunarVfsInfo *info;
- ThunarVfsPath *path;
+ GFileInfo *info;
+ TseData *tse_data;
+ GFile *file;
+ GFile *parent;
GString *mailto;
GError *error = NULL;
GList *infos = NULL;
@@ -513,9 +561,6 @@
/* initialize Gtk+ */
gtk_init (&argc, &argv);
- /* initialize the ThunarVFS library */
- thunar_vfs_init ();
-
/* set default icon for dialogs */
gtk_window_set_default_icon_name ("internet-mail");
@@ -526,38 +571,49 @@
return EXIT_FAILURE;
}
- /* determine the ThunarVfsInfos for the files */
+ /* determine the GFiles and GFileInfos (bundled as TseData) for the files */
for (n = 1; n < argc; ++n)
{
- /* try to transform to a ThunarVfsPath */
- path = thunar_vfs_path_new (argv[n], &error);
- if (G_UNLIKELY (path == NULL))
+ /* try to transform to a GFile */
+ file = g_file_new_for_commandline_arg (argv[n]);
+
+ /* verify that we're not trying to send root */
+ parent = g_file_get_parent (file);
+ if (parent == NULL)
{
-invalid_argument:
+ error = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (EFBIG), g_strerror (EFBIG));
g_fprintf (stderr, "thunar-sendto-email: Invalid argument \"%s\": %s\n", argv[n], error->message);
- thunar_vfs_info_list_free (infos);
g_error_free (error);
+ g_object_unref (file);
return EXIT_FAILURE;
}
-
- /* verify that we're not trying to send root */
- if (thunar_vfs_path_is_root (path))
+ else
{
- error = g_error_new_literal (G_FILE_ERROR, g_file_error_from_errno (EFBIG), g_strerror (EFBIG));
- thunar_vfs_path_unref (path);
- goto invalid_argument;
+ g_object_unref (parent);
}
/* try to determine the info */
- info = thunar_vfs_info_new_for_path (path, &error);
- thunar_vfs_path_unref (path);
+ info = g_file_query_info (file,
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_SIZE ","
+ G_FILE_ATTRIBUTE_STANDARD_TYPE,
+ G_FILE_QUERY_INFO_NONE, NULL, &error);
/* check if we failed */
if (G_UNLIKELY (info == NULL))
- goto invalid_argument;
+ {
+ g_fprintf (stderr, "thunar-sendto-email: Invalid argument \"%s\": %s\n", argv[n], error->message);
+ g_error_free (error);
+ g_object_unref (file);
+ return EXIT_FAILURE;
+ }
+ tse_data = g_slice_new0 (TseData);
+ tse_data->info = info;
+ tse_data->file = file;
+
/* add to our list of infos */
- infos = g_list_append (infos, info);
+ infos = g_list_append (infos, tse_data);
}
/* check whether to compress the files */
@@ -579,8 +635,8 @@
attachments = g_new0 (gchar *, g_list_length (infos) + 1);
for (lp = infos, n = 0; lp != NULL; lp = lp->next, ++n)
{
- info = (ThunarVfsInfo *) lp->data;
- attachments[n] = thunar_vfs_path_dup_uri (info->path);
+ tse_data = (TseData *) lp->data;
+ attachments[n] = g_file_get_uri (tse_data->file);
}
}
@@ -606,11 +662,15 @@
}
/* cleanup */
- thunar_vfs_info_list_free (infos);
+ for (lp = infos; lp != NULL; lp = lp->next)
+ {
+ tse_data = (TseData *) lp->data;
+ g_object_unref (tse_data->file);
+ g_object_unref (tse_data->info);
+ g_slice_free (TseData, tse_data);
+ }
+ g_list_free (infos);
- /* shutdown the ThunarVFS library */
- thunar_vfs_shutdown ();
-
return EXIT_SUCCESS;
}
Modified: thunar/branches/migration-to-gio/plugins/thunar-uca/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-uca/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-uca/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -11,7 +11,7 @@
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
$(PLATFORM_CPPFLAGS)
-extensionsdir = $(libdir)/thunarx-$(THUNAR_VERSION_API)
+extensionsdir = $(libdir)/thunarx-$(THUNARX_VERSION_API)
extensions_LTLIBRARIES = \
thunar-uca.la
@@ -32,6 +32,7 @@
thunar_uca_la_CFLAGS = \
$(EXO_CFLAGS) \
+ $(LIBXFCE4UTIL_CFLAGS) \
$(PLATFORM_CFLAGS)
thunar_uca_la_LDFLAGS = \
Modified: thunar/branches/migration-to-gio/plugins/thunar-uca/README
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-uca/README 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-uca/README 2009-06-20 01:07:08 UTC (rev 30057)
@@ -10,7 +10,7 @@
shouldn't be a real problem unless you're targeting an embedded system), and so
can you pass `--disable-uca-plugin' to configure and the plugin won't be built
and installed. Since it is an extension, you can also easily uninstall it
-afterwards by removing the thunar-uca.so file from the lib/thunarx-1/ directory
+afterwards by removing the thunar-uca.so file from the lib/thunarx-2/ directory
of your installation (be sure to quit Thunar before removing files though).
To actually manage the actions open the "Edit" menu in the menu bar of a
Modified: thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-model.c
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-model.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-model.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,6 +1,7 @@
/* $Id$ */
/*-
* Copyright (c) 2005-2006 Benedikt Meurer <benny at xfce.org>
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -44,8 +45,13 @@
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
+#include <gio/gio.h>
+
+#include <gtk/gtk.h>
+
+#include <libxfce4util/libxfce4util.h>
+
#include <thunar-uca/thunar-uca-model.h>
-#include <thunar-vfs/thunar-vfs.h>
@@ -1021,17 +1027,16 @@
ThunarUcaTypes types;
} ThunarUcaFile;
- ThunarVfsMimeDatabase *mime_database;
- ThunarUcaModelItem *item;
- ThunarUcaFile *files;
- ThunarVfsInfo *info;
- const gchar *mime_type;
- gboolean matches;
- GList *mime_infos;
- GList *paths = NULL;
- GList *lp, *mp;
- gint n_files;
- gint i, m, n;
+ ThunarUcaModelItem *item;
+ ThunarUcaFile *files;
+ GFileInfo *info;
+ GFile *location;
+ const gchar *mime_type;
+ gboolean matches;
+ GList *paths = NULL;
+ GList *lp;
+ gint n_files;
+ gint i, m, n;
g_return_val_if_fail (THUNAR_UCA_IS_MODEL (uca_model), NULL);
@@ -1044,33 +1049,29 @@
files = g_new (ThunarUcaFile, n_files);
for (lp = file_infos, n = 0; lp != NULL; lp = lp->next, ++n)
{
- info = thunarx_file_info_get_vfs_info (lp->data);
- if (thunar_vfs_path_get_scheme (info->path) != THUNAR_VFS_PATH_SCHEME_FILE)
+ location = thunarx_file_info_get_location (lp->data);
+
+ if (!g_file_has_uri_scheme (location, "file"))
{
/* cannot handle non-local files */
- thunar_vfs_info_unref (info);
+ g_object_unref (location);
g_free (files);
return NULL;
}
- mime_type = thunar_vfs_mime_info_get_name (info->mime_info);
- files[n].name = thunar_vfs_path_get_name (info->path);
+
+ g_object_unref (location);
+
+ info = thunarx_file_info_get_file_info (lp->data);
+
+ mime_type = g_file_info_get_content_type (info);
+
+ files[n].name = g_file_info_get_name (info);
files[n].types = types_from_mime_type (mime_type);
+
if (G_UNLIKELY (files[n].types == 0))
- {
- mime_database = thunar_vfs_mime_database_get_default ();
- mime_infos = thunar_vfs_mime_database_get_infos_for_info (mime_database, info->mime_info);
- for (mp = mime_infos; mp != NULL; mp = mp->next)
- {
- mime_type = thunar_vfs_mime_info_get_name (mp->data);
- files[n].types |= types_from_mime_type (mime_type);
- thunar_vfs_mime_info_unref (mp->data);
- }
- g_object_unref (G_OBJECT (mime_database));
- g_list_free (mime_infos);
- }
- if (G_UNLIKELY (files[n].types == 0))
files[n].types = THUNAR_UCA_TYPE_OTHER_FILES;
- thunar_vfs_info_unref (info);
+
+ g_object_unref (info);
}
/* lookup the matching items */
Modified: thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-provider.c
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-provider.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-uca/thunar-uca-provider.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,6 +1,7 @@
/* $Id$ */
/*-
* Copyright (c) 2005-2006 Benedikt Meurer <benny at xfce.org>
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -22,7 +23,8 @@
#include <config.h>
#endif
-#include <thunar-vfs/thunar-vfs.h>
+#include <glib/gi18n.h>
+#include <gio/gio.h>
#include <thunar-uca/thunar-uca-chooser.h>
#include <thunar-uca/thunar-uca-context.h>
@@ -420,26 +422,29 @@
gpointer user_data)
{
ThunarUcaProvider *uca_provider = THUNAR_UCA_PROVIDER (user_data);
- ThunarVfsMonitor *monitor;
- ThunarVfsPath *path;
+ GFileMonitor *monitor;
+ GError *error = NULL;
+ GFile *file;
GDK_THREADS_ENTER ();
/* verify that we still have a valid child_watch_path */
if (G_LIKELY (uca_provider->child_watch_path != NULL))
{
- /* determine the corresponding ThunarVfsPath */
- path = thunar_vfs_path_new (uca_provider->child_watch_path, NULL);
- if (G_LIKELY (path != NULL))
+ /* determine the corresponding file */
+ file = g_file_new_for_path (uca_provider->child_watch_path);
+
+ /* schedule a changed notification on the path */
+ monitor = g_file_monitor (file, G_FILE_MONITOR_NONE, NULL, &error);
+
+ if (monitor != NULL)
{
- /* schedule a changed notification on the path */
- monitor = thunar_vfs_monitor_get_default ();
- thunar_vfs_monitor_feed (monitor, THUNAR_VFS_MONITOR_EVENT_CHANGED, path);
- g_object_unref (G_OBJECT (monitor));
+ g_file_monitor_emit_event (monitor, file, file, G_FILE_MONITOR_EVENT_CHANGED);
+ g_object_unref (monitor);
+ }
- /* release the ThunarVfsPath */
- thunar_vfs_path_unref (path);
- }
+ /* release the file */
+ g_object_unref (file);
}
/* need to cleanup */
Modified: thunar/branches/migration-to-gio/plugins/thunar-wallpaper/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-wallpaper/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-wallpaper/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -7,7 +7,7 @@
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
$(PLATFORM_CPPFLAGS)
-extensionsdir = $(libdir)/thunarx-1
+extensionsdir = $(libdir)/thunarx-$(THUNARX_VERSION_API)
extensions_LTLIBRARIES = \
thunar-wallpaper-plugin.la
@@ -19,13 +19,11 @@
thunar_wallpaper_plugin_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
$(THUNARX_CFLAGS) \
- $(EXO_CFLAGS) \
- $(THUNAR_VFS_CFLAGS)
+ $(EXO_CFLAGS)
thunar_wallpaper_plugin_la_LDFLAGS = \
-avoid-version \
-export-dynamic \
-module \
$(PLATFORM_LDFLAGS) \
- $(THUNARX_LDFLAGS) \
- $(THUNAR_VFS_LDFLAGS)
+ $(THUNARX_LDFLAGS)
Modified: thunar/branches/migration-to-gio/plugins/thunar-wallpaper/twp-provider.c
===================================================================
--- thunar/branches/migration-to-gio/plugins/thunar-wallpaper/twp-provider.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/plugins/thunar-wallpaper/twp-provider.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2008 Stephan Arts <stephan at xfce.org>
* Copyright (c) 2008-2009 Mike Massonnet <mmassonnet at xfce.org>
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -22,10 +23,13 @@
#include <config.h>
#endif
-#include <thunar-vfs/thunar-vfs.h>
+#include <gio/gio.h>
+
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
+#include <glib/gi18n.h>
+
#include "twp-provider.h"
@@ -116,15 +120,13 @@
GtkWidget *window,
GList *files)
{
- Atom xfce_selection_atom;
- Atom nautilus_selection_atom;
+ GtkWidget *action = NULL;
+ GFile *location;
+ GList *actions = NULL;
+ gchar selection_name[100];
+ Atom xfce_selection_atom;
+ Atom nautilus_selection_atom;
- ThunarVfsPathScheme scheme;
- ThunarVfsInfo *info;
- GtkWidget *action = NULL;
- GList *actions = NULL;
- gchar selection_name[100];
-
GdkScreen *gdk_screen = gdk_screen_get_default();
gint xscreen = gdk_screen_get_number(gdk_screen);
@@ -133,15 +135,19 @@
/* we can only set a single wallpaper */
if (files->next == NULL)
{
- /* check if the file is a local file */
- info = thunarx_file_info_get_vfs_info (files->data);
- scheme = thunar_vfs_path_get_scheme (info->path);
- thunar_vfs_info_unref (info);
+ /* get the location of the file */
+ location = thunarx_file_info_get_location (files->data);
/* unable to handle non-local files */
- if (G_UNLIKELY (scheme != THUNAR_VFS_PATH_SCHEME_FILE))
+ if (G_UNLIKELY (!g_file_has_uri_scheme (location, "file")))
+ {
+ g_object_unref (location);
return NULL;
+ }
+ /* release the location */
+ g_object_unref (location);
+
if (!thunarx_file_info_is_directory (files->data))
{
if (thunarx_file_info_has_mime_type (files->data, "image/jpeg")
Modified: thunar/branches/migration-to-gio/thunar/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/thunar/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -234,8 +234,7 @@
Thunar_LDADD = \
$(top_builddir)/tdb/libtdb.la \
- $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VERSION_API).la \
- $(top_builddir)/thunarx/libthunarx-$(THUNAR_VERSION_API).la \
+ $(top_builddir)/thunarx/libthunarx-$(THUNARX_VERSION_API).la \
$(EXO_LIBS) \
$(GTHREAD_LIBS) \
$(GIO_LIBS) \
@@ -244,8 +243,7 @@
Thunar_DEPENDENCIES = \
$(top_builddir)/tdb/libtdb.la \
- $(top_builddir)/thunar-vfs/libthunar-vfs-$(THUNAR_VERSION_API).la \
- $(top_builddir)/thunarx/libthunarx-$(THUNAR_VERSION_API).la
+ $(top_builddir)/thunarx/libthunarx-$(THUNARX_VERSION_API).la
if HAVE_DBUS
thunar_built_sources += \
Modified: thunar/branches/migration-to-gio/thunar/main.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/main.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/main.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -33,8 +33,6 @@
#include <gio/gdesktopappinfo.h>
#endif
-#include <thunar-vfs/thunar-vfs.h>
-
#include <thunar/thunar-application.h>
#include <thunar/thunar-dbus-client.h>
#include <thunar/thunar-dbus-service.h>
@@ -231,9 +229,6 @@
}
#endif
- /* initialize the ThunarVFS library */
- thunar_vfs_init ();
-
/* initialize the thunar stock items/icons */
thunar_stock_init ();
@@ -261,7 +256,6 @@
error0:
g_fprintf (stderr, "Thunar: %s\n", error->message);
g_object_unref (G_OBJECT (application));
- thunar_vfs_shutdown ();
g_error_free (error);
return EXIT_FAILURE;
}
@@ -305,8 +299,5 @@
/* release the application reference */
g_object_unref (G_OBJECT (application));
- /* shutdown the VFS library */
- thunar_vfs_shutdown ();
-
return EXIT_SUCCESS;
}
Modified: thunar/branches/migration-to-gio/thunar/thunar-exec.h
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-exec.h 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/thunar-exec.h 2009-06-20 01:07:08 UTC (rev 30057)
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __THUNAR_VFS_EXEC_H__
-#define __THUNAR_VFS_EXEC_H__
+#ifndef __THUNAR_EXEC_H__
+#define __THUNAR_EXEC_H__
#include <gdk/gdk.h>
@@ -51,4 +51,4 @@
G_END_DECLS;
-#endif /* !__THUNAR_VFS_EXEC_H__ */
+#endif /* !__THUNAR_EXEC_H__ */
Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -51,7 +51,7 @@
#include <gio/gio.h>
-#include <thunar-vfs/thunar-vfs.h>
+#include <thunarx/thunarx.h>
#include <thunar/thunar-application.h>
#include <thunar/thunar-chooser-dialog.h>
@@ -66,21 +66,6 @@
-/* File attribute namespaces being used */
-#define THUNAR_FILE_G_FILE_INFO_NAMESPACE \
- "access::*," \
- "mountable::*," \
- "preview::*," \
- "standard::*," \
- "time::*," \
- "thumbnail::*," \
- "unix::*"
-
-#define THUNAR_FILE_G_FILE_INFO_FILESYSTEM_NAMESPACE \
- "filesystem::*"
-
-
-
/* Additional flags associated with a ThunarFile */
#define THUNAR_FILE_IN_DESTRUCTION 0x04
#define THUNAR_FILE_OWNS_METAFILE_REFERENCE 0x08
@@ -117,7 +102,9 @@
static gboolean thunar_file_info_has_mime_type (ThunarxFileInfo *file_info,
const gchar *mime_type);
static gboolean thunar_file_info_is_directory (ThunarxFileInfo *file_info);
-static ThunarVfsInfo *thunar_file_info_get_vfs_info (ThunarxFileInfo *file_info);
+static GFileInfo *thunar_file_info_get_file_info (ThunarxFileInfo *file_info);
+static GFileInfo *thunar_file_info_get_filesystem_info (ThunarxFileInfo *file_info);
+static GFile *thunar_file_info_get_location (ThunarxFileInfo *file_info);
static void thunar_file_info_changed (ThunarxFileInfo *file_info);
static gboolean thunar_file_denies_access_permission (const ThunarFile *file,
ThunarFileMode usr_permissions,
@@ -284,7 +271,9 @@
iface->get_mime_type = thunar_file_info_get_mime_type;
iface->has_mime_type = thunar_file_info_has_mime_type;
iface->is_directory = thunar_file_info_is_directory;
- iface->get_vfs_info = thunar_file_info_get_vfs_info;
+ iface->get_file_info = thunar_file_info_get_file_info;
+ iface->get_filesystem_info = thunar_file_info_get_filesystem_info;
+ iface->get_location = thunar_file_info_get_location;
iface->changed = thunar_file_info_changed;
}
@@ -435,27 +424,37 @@
-static ThunarVfsInfo *
-thunar_file_info_get_vfs_info (ThunarxFileInfo *file_info)
+static GFileInfo *
+thunar_file_info_get_file_info (ThunarxFileInfo *file_info)
{
- ThunarVfsInfo *info = NULL;
- ThunarVfsPath *path;
- gchar *uri;
+ _thunar_return_val_if_fail (THUNAR_IS_FILE (file_info), NULL);
+
+ if (THUNAR_FILE (file_info)->info != NULL)
+ return g_object_ref (THUNAR_FILE (file_info)->info);
+ else
+ return NULL;
+}
+
+
+static GFileInfo *
+thunar_file_info_get_filesystem_info (ThunarxFileInfo *file_info)
+{
_thunar_return_val_if_fail (THUNAR_IS_FILE (file_info), NULL);
- uri = g_file_get_uri (THUNAR_FILE (file_info)->gfile);
- path = thunar_vfs_path_new (uri, NULL);
+ if (THUNAR_FILE (file_info)->filesystem_info != NULL)
+ return g_object_ref (THUNAR_FILE (file_info)->filesystem_info);
+ else
+ return NULL;
+}
- if (path != NULL)
- {
- info = thunar_vfs_info_new_for_path (path, NULL);
- thunar_vfs_path_unref (path);
- }
- g_free (uri);
- return info;
+static GFile *
+thunar_file_info_get_location (ThunarxFileInfo *file_info)
+{
+ _thunar_return_val_if_fail (THUNAR_IS_FILE (file_info), NULL);
+ return g_object_ref (THUNAR_FILE (file_info)->gfile);
}
@@ -790,7 +789,7 @@
/* query a new file info */
file->info = g_file_query_info (file->gfile,
- THUNAR_FILE_G_FILE_INFO_NAMESPACE,
+ THUNARX_FILE_INFO_NAMESPACE,
G_FILE_QUERY_INFO_NONE,
cancellable, &err);
@@ -814,7 +813,7 @@
/* query a new filesystem info */
file->filesystem_info = g_file_query_filesystem_info (file->gfile,
- THUNAR_FILE_G_FILE_INFO_FILESYSTEM_NAMESPACE,
+ THUNARX_FILESYSTEM_INFO_NAMESPACE,
cancellable,
NULL);
Modified: thunar/branches/migration-to-gio/thunar/thunar-file.h
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/thunar-file.h 2009-06-20 01:07:08 UTC (rev 30057)
@@ -23,8 +23,6 @@
#include <glib.h>
-#include <thunar-vfs/thunar-vfs.h>
-
#include <thunarx/thunarx.h>
#include <thunar/thunar-enum-types.h>
Modified: thunar/branches/migration-to-gio/thunar/thunar-icon-factory.h
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-icon-factory.h 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/thunar-icon-factory.h 2009-06-20 01:07:08 UTC (rev 30057)
@@ -65,10 +65,6 @@
GtkIconTheme *thunar_icon_factory_get_icon_theme (const ThunarIconFactory *factory);
-#if 0
-ThunarVfsThumbFactory *thunar_icon_factory_get_thumb_factory (const ThunarIconFactory *factory);
-#endif
-
GdkPixbuf *thunar_icon_factory_load_icon (ThunarIconFactory *factory,
const gchar *name,
gint size,
Modified: thunar/branches/migration-to-gio/thunar/thunar-renamer-dialog.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-renamer-dialog.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/thunar-renamer-dialog.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -627,7 +627,7 @@
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
- /* TRANSLATORS: You can test this string by temporarily removing thunar-sbr.* from $libdir/thunarx-1/,
+ /* TRANSLATORS: You can test this string by temporarily removing thunar-sbr.* from $libdir/thunarx-2/,
* and opening the multi rename dialog by selecting multiple files and pressing F2.
*/
label = gtk_label_new (_("No renamer modules were found on your system. Please check your\n"
Modified: thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunar/thunar-shortcuts-model.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -35,11 +35,13 @@
#include <locale.h>
#endif
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include <thunar/thunar-file.h>
#include <thunar/thunar-shortcuts-model.h>
#include <thunar/thunar-private.h>
-#include <glib.h>
#define THUNAR_SHORTCUT(obj) ((ThunarShortcut *) (obj))
@@ -1091,7 +1093,7 @@
{
g_warning ("Failed to write `%s': %s",
bookmarks_path, g_strerror (errno));
- unlink (tmp_path);
+ g_unlink (tmp_path);
}
/* cleanup */
Modified: thunar/branches/migration-to-gio/thunarx/Makefile.am
===================================================================
--- thunar/branches/migration-to-gio/thunarx/Makefile.am 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunarx/Makefile.am 2009-06-20 01:07:08 UTC (rev 30057)
@@ -4,7 +4,7 @@
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"thunarx\" \
-DTHUNARX_COMPILATION \
- -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNAR_VERSION_API)\" \
+ -DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\" \
$(PLATFORM_CPPFLAGS)
libthunarx_built_sources = \
@@ -25,15 +25,15 @@
thunarx-renamer-provider.h
libthunarx_includedir = \
- $(includedir)/thunarx-$(THUNAR_VERSION_API)/thunarx
+ $(includedir)/thunarx-$(THUNARX_VERSION_API)/thunarx
libthunarx_include_HEADERS = \
$(libthunarx_headers)
lib_LTLIBRARIES = \
- libthunarx-1.la
+ libthunarx-2.la
-libthunarx_1_la_SOURCES = \
+libthunarx_2_la_SOURCES = \
$(libthunarx_built_sources) \
$(libthunarx_headers) \
thunarx-config.c \
@@ -51,25 +51,25 @@
thunarx-renamer.c \
thunarx-renamer-provider.c
-libthunarx_1_la_CFLAGS = \
+libthunarx_2_la_CFLAGS = \
$(GLIB_CFLAGS) \
$(GIO_CFLAGS) \
$(GTK_CFLAGS) \
$(PLATFORM_CFLAGS)
-libthunarx_1_la_LDFLAGS = \
+libthunarx_2_la_LDFLAGS = \
-export-dynamic \
-export-symbols-regex "^[^_].*" \
- -version-info $(THUNAR_VERINFO) \
+ -version-info $(THUNARX_VERINFO) \
$(PLATFORM_LDFLAGS)
-libthunarx_1_la_LIBADD = \
+libthunarx_2_la_LIBADD = \
$(GLIB_LIBS) \
$(GIO_LIBS) \
$(GTK_LIBS)
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = thunarx-1.pc
+pkgconfig_DATA = thunarx-2.pc
EXTRA_DIST = \
abicheck.sh \
Modified: thunar/branches/migration-to-gio/thunarx/abicheck.sh
===================================================================
--- thunar/branches/migration-to-gio/thunarx/abicheck.sh 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunarx/abicheck.sh 2009-06-20 01:07:08 UTC (rev 30057)
@@ -20,5 +20,5 @@
#
cpp -P -DALL_FILES ${srcdir:-.}/thunarx.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' | sort > expected-abi
-nm -D .libs/libthunarx-1.so | grep " T\|R " | cut -d ' ' -f 3 | grep -v '^_.*' | sort > actual-abi
+nm -D .libs/libthunarx-2.so | grep " T\|R " | cut -d ' ' -f 3 | grep -v '^_.*' | sort > actual-abi
diff -u expected-abi actual-abi && rm expected-abi actual-abi
Added: thunar/branches/migration-to-gio/thunarx/thunarx-2.pc.in
===================================================================
--- thunar/branches/migration-to-gio/thunarx/thunarx-2.pc.in (rev 0)
+++ thunar/branches/migration-to-gio/thunarx/thunarx-2.pc.in 2009-06-20 01:07:08 UTC (rev 30057)
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+extensionsdir=${libdir}/thunarx- at THUNARX_VERSION_API@
+
+Name: thunarx
+Description: A library to create Thunar extensions
+Requires: gtk+-2.0 gio-2.0
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lthunarx- at THUNARX_VERSION_API@
+Cflags: -I${includedir}/thunarx- at THUNARX_VERSION_API@
Modified: thunar/branches/migration-to-gio/thunarx/thunarx-file-info.c
===================================================================
--- thunar/branches/migration-to-gio/thunarx/thunarx-file-info.c 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunarx/thunarx-file-info.c 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,6 +1,7 @@
/* $Id$ */
/*-
* Copyright (c) 2005-2006 Benedikt Meurer <benny at xfce.org>
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -292,35 +293,72 @@
/**
- * thunarx_file_info_get_vfs_info:
+ * thunarx_file_info_get_file_info:
* @file_info : a #ThunarxFileInfo.
*
- * Returns the #ThunarVfsInfo associated with @file_info,
+ * Returns the #GFileInfo associated with @file_info,
* which includes additional information about the @file_info
- * as queried from the VFS library earlier. The caller is
- * responsible to free the returned #ThunarVfsInfo object
- * using thunar_vfs_info_unref() when no longer needed.
+ * as queried from GIO earlier. The caller is responsible to free the
+ * returned #GFileInfo object using g_object_unref() when
+ * no longer needed.
*
- * Note that the <application>thunarx</application> library itself
- * is not linked to the <application>thunar-vfs</application> library,
- * and so, if you need to use this method, you'll need to include
- * <code><thunar-vfs/thunar-vfs.h></code> in your code and
- * add <code>`pkg-config --cflags thunar-vfs-1`</code> to your
- * <envar>CFLAGS</envar>.
+ * Return value: the #GFileInfo object associated with @file_info,
+ * which MUST be freed using g_object_unref().
+ **/
+GFileInfo*
+thunarx_file_info_get_file_info (ThunarxFileInfo *file_info)
+{
+ g_return_val_if_fail (THUNARX_IS_FILE_INFO (file_info), NULL);
+ return (*THUNARX_FILE_INFO_GET_IFACE (file_info)->get_file_info) (file_info);
+}
+
+
+
+/**
+ * thunarx_file_info_get_filesystem_info:
+ * @file_info : a #ThunarxFileInfo.
*
- * Return value: the #ThunarVfsInfo object associated with @file_info,
- * which MUST be freed using thunar_vfs_info_unref().
+ * Returns the #GFileInfo which includes additional information about
+ * the filesystem @file_info resides on. The caller is responsible to
+ * free the returned #GFileInfo object using g_object_unref() when
+ * no longer needed.
+ *
+ * Return value: the #GFileInfo containing information about the
+ * filesystem of @file_info or %NULL if no filesystem
+ * information is available. It MUST be released using
+ * g_object_unref().
**/
-ThunarVfsInfo*
-thunarx_file_info_get_vfs_info (ThunarxFileInfo *file_info)
+GFileInfo*
+thunarx_file_info_get_filesystem_info (ThunarxFileInfo *file_info)
{
g_return_val_if_fail (THUNARX_IS_FILE_INFO (file_info), NULL);
- return (*THUNARX_FILE_INFO_GET_IFACE (file_info)->get_vfs_info) (file_info);
+ return (*THUNARX_FILE_INFO_GET_IFACE (file_info)->get_filesystem_info) (file_info);
}
/**
+ * thunarx_file_info_get_location:
+ * @file_info : a #ThunarxFileInfo.
+ *
+ * Returns the #GFile @file_info points to. The #GFile is a more
+ * powerful tool than just the URI or the path. The caller
+ * is responsible to release the returned #GFile using g_object_unref()
+ * when no longer needed.
+ *
+ * Return value: the #GFile to which @file_info points. It MUST be
+ * released using g_object_unref().
+ **/
+GFile*
+thunarx_file_info_get_location (ThunarxFileInfo *file_info)
+{
+ g_return_val_if_fail (THUNARX_IS_FILE_INFO (file_info), NULL);
+ return (*THUNARX_FILE_INFO_GET_IFACE (file_info)->get_location) (file_info);
+}
+
+
+
+/**
* thunarx_file_info_changed:
* @file_info : a #ThunarxFileInfo.
*
Modified: thunar/branches/migration-to-gio/thunarx/thunarx-file-info.h
===================================================================
--- thunar/branches/migration-to-gio/thunarx/thunarx-file-info.h 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunarx/thunarx-file-info.h 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,6 +1,7 @@
/* $Id$ */
/*-
* Copyright (c) 2005-2006 Benedikt Meurer <benny at xfce.org>
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -25,16 +26,32 @@
#ifndef __THUNARX_FILE_INFO_H__
#define __THUNARX_FILE_INFO_H__
+#include <gio/gio.h>
+
#include <thunarx/thunarx-config.h>
G_BEGIN_DECLS;
-/* Used to avoid a dependency of thunarx on thunar-vfs */
-#ifndef __THUNAR_VFS_INFO_DEFINED__
-#define __THUNAR_VFS_INFO_DEFINED__
-typedef struct _ThunarVfsInfo ThunarVfsInfo;
-#endif
+/**
+ * File information namespaces available in the #GFileInfo returned by
+ * thunarx_file_info_get_file_info().
+ **/
+#define THUNARX_FILE_INFO_NAMESPACE \
+ "access::*," \
+ "mountable::*," \
+ "preview::*," \
+ "standard::*," \
+ "time::*," \
+ "thumbnail::*," \
+ "unix::*"
+/**
+ * Filesystem information namespaces available in the #GFileInfo
+ * returned by thunarx_file_info_get_filesystem_info().
+ **/
+#define THUNARX_FILESYSTEM_INFO_NAMESPACE \
+ "filesystem::*"
+
typedef struct _ThunarxFileInfoIface ThunarxFileInfoIface;
typedef struct _ThunarxFileInfo ThunarxFileInfo;
@@ -51,19 +68,21 @@
/*< public >*/
/* virtual methods */
- gchar *(*get_name) (ThunarxFileInfo *file_info);
+ gchar *(*get_name) (ThunarxFileInfo *file_info);
- gchar *(*get_uri) (ThunarxFileInfo *file_info);
- gchar *(*get_parent_uri) (ThunarxFileInfo *file_info);
- gchar *(*get_uri_scheme) (ThunarxFileInfo *file_info);
+ gchar *(*get_uri) (ThunarxFileInfo *file_info);
+ gchar *(*get_parent_uri) (ThunarxFileInfo *file_info);
+ gchar *(*get_uri_scheme) (ThunarxFileInfo *file_info);
- gchar *(*get_mime_type) (ThunarxFileInfo *file_info);
- gboolean (*has_mime_type) (ThunarxFileInfo *file_info,
+ gchar *(*get_mime_type) (ThunarxFileInfo *file_info);
+ gboolean (*has_mime_type) (ThunarxFileInfo *file_info,
const gchar *mime_type);
- gboolean (*is_directory) (ThunarxFileInfo *file_info);
+ gboolean (*is_directory) (ThunarxFileInfo *file_info);
- ThunarVfsInfo *(*get_vfs_info) (ThunarxFileInfo *file_info);
+ GFileInfo *(*get_file_info) (ThunarxFileInfo *file_info);
+ GFileInfo *(*get_filesystem_info) (ThunarxFileInfo *file_info);
+ GFile *(*get_location) (ThunarxFileInfo *file_info);
/*< private >*/
void (*reserved0) (void);
@@ -86,31 +105,33 @@
void (*reserved9) (void);
};
-GType thunarx_file_info_get_type (void) G_GNUC_CONST;
+GType thunarx_file_info_get_type (void) G_GNUC_CONST;
-gchar *thunarx_file_info_get_name (ThunarxFileInfo *file_info);
-gchar *thunarx_file_info_get_uri (ThunarxFileInfo *file_info);
-gchar *thunarx_file_info_get_parent_uri (ThunarxFileInfo *file_info);
-gchar *thunarx_file_info_get_uri_scheme (ThunarxFileInfo *file_info);
+gchar *thunarx_file_info_get_name (ThunarxFileInfo *file_info);
+gchar *thunarx_file_info_get_uri (ThunarxFileInfo *file_info);
+gchar *thunarx_file_info_get_parent_uri (ThunarxFileInfo *file_info);
+gchar *thunarx_file_info_get_uri_scheme (ThunarxFileInfo *file_info);
-gchar *thunarx_file_info_get_mime_type (ThunarxFileInfo *file_info);
-gboolean thunarx_file_info_has_mime_type (ThunarxFileInfo *file_info,
- const gchar *mime_type);
+gchar *thunarx_file_info_get_mime_type (ThunarxFileInfo *file_info);
+gboolean thunarx_file_info_has_mime_type (ThunarxFileInfo *file_info,
+ const gchar *mime_type);
-gboolean thunarx_file_info_is_directory (ThunarxFileInfo *file_info);
+gboolean thunarx_file_info_is_directory (ThunarxFileInfo *file_info);
-ThunarVfsInfo *thunarx_file_info_get_vfs_info (ThunarxFileInfo *file_info);
+GFileInfo *thunarx_file_info_get_file_info (ThunarxFileInfo *file_info);
+GFileInfo *thunarx_file_info_get_filesystem_info (ThunarxFileInfo *file_info);
+GFile *thunarx_file_info_get_location (ThunarxFileInfo *file_info);
-void thunarx_file_info_changed (ThunarxFileInfo *file_info);
-void thunarx_file_info_renamed (ThunarxFileInfo *file_info);
+void thunarx_file_info_changed (ThunarxFileInfo *file_info);
+void thunarx_file_info_renamed (ThunarxFileInfo *file_info);
#define THUNARX_TYPE_FILE_INFO_LIST (thunarx_file_info_list_get_type ())
-GType thunarx_file_info_list_get_type (void) G_GNUC_CONST;
+GType thunarx_file_info_list_get_type (void) G_GNUC_CONST;
-GList *thunarx_file_info_list_copy (GList *file_infos);
-void thunarx_file_info_list_free (GList *file_infos);
+GList *thunarx_file_info_list_copy (GList *file_infos);
+void thunarx_file_info_list_free (GList *file_infos);
G_END_DECLS;
Modified: thunar/branches/migration-to-gio/thunarx/thunarx.symbols
===================================================================
--- thunar/branches/migration-to-gio/thunarx/thunarx.symbols 2009-06-19 19:45:24 UTC (rev 30056)
+++ thunar/branches/migration-to-gio/thunarx/thunarx.symbols 2009-06-20 01:07:08 UTC (rev 30057)
@@ -1,6 +1,7 @@
/* $Id$ */
/*-
* Copyright (c) 2005-2006 Benedikt Meurer <benny at xfce.org>.
+ * Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -55,7 +56,9 @@
thunarx_file_info_get_mime_type
thunarx_file_info_has_mime_type
thunarx_file_info_is_directory
-thunarx_file_info_get_vfs_info
+thunarx_file_info_get_file_info
+thunarx_file_info_get_filesystem_info
+thunarx_file_info_get_location
thunarx_file_info_changed
thunarx_file_info_renamed
thunarx_file_info_list_get_type
More information about the Xfce4-commits
mailing list