summaryrefslogtreecommitdiffstats
path: root/testing/thunar-media-tags-plugin/01_port-to-thunarx-2.patch
blob: 0c170f1323329b37b86586027756a0a767fed15f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Description: Port to thunarx-2
 Upstream patch for commit 'b805797f9bed98229f036e56c98ec16f40b539aa'
 slightly updated to include '270924abcab81275dede68d882936c14b238b3ec'
 (more realistic thunar version, 1.0.1 instead of 0.2.3svn-r20526).
 .
 Also slightly updated to patch configure.in instead of configure.in.in
 (not available in released tarballs).
Origin: backport, http://git.xfce.org/thunar-plugins/thunar-media-tags-plugin/commit/?h=thunarx-2&id=b805797f9bed98229f036e56c98ec16f40b539aa
---
diff --git a/configure.in b/configure.in
index 0ea7f85..8764561 100644
--- a/configure.in
+++ b/configure.in
@@ -65,8 +65,7 @@ dnl ***********************************
 dnl *** Check for required packages ***
 dnl ***********************************
 XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.3])
-XDT_CHECK_PACKAGE([THUNARX], [thunarx-1], [0.2.3svn-r20526])
-XDT_CHECK_PACKAGE([THUNARVFS], [thunar-vfs-1], [0.2.3svn-r20526])
+XDT_CHECK_PACKAGE([THUNARX], [thunarx-2], [1.0.1])
 XDT_CHECK_PACKAGE([TAGLIB], [taglib], [1.4])
 
 dnl ***********************************
diff --git a/thunar-plugin/Makefile.am b/thunar-plugin/Makefile.am
index a3c2c25..a7bdb58 100644
--- a/thunar-plugin/Makefile.am
+++ b/thunar-plugin/Makefile.am
@@ -8,7 +8,7 @@
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
 	$(PLATFORM_CPPFLAGS)
 
-extensionsdir = $(libdir)/thunarx-1
+extensionsdir = $(libdir)/thunarx-2
 extensions_LTLIBRARIES =						\
 	thunar-media-tags-plugin.la
 
@@ -25,7 +25,6 @@
 	$(EXO_CFLAGS)							\
 	$(PLATFORM_CFLAGS)						\
 	$(THUNARX_CFLAGS)						\
-	$(THUNARVFS_CFLAGS)						\
 	$(TAGLIB_CFLAGS)						\
 	$(TAGLIBC_CFLAGS)
 
@@ -34,7 +33,6 @@
 	-export-dynamic							\
 	-module								\
 	$(THUNARX_LIBS)							\
-	$(THUNARVFS_LIBS)						\
 	$(TAGLIB_LIBS)							\
 	$(TAGLIBC_LIBS)							\
 	$(PLATFORM_LDFLAGS)
diff --git a/thunar-plugin/audio-tags-page.c b/thunar-plugin/audio-tags-page.c
index 099d7ad..7e5dab5 100644
--- a/thunar-plugin/audio-tags-page.c
+++ b/thunar-plugin/audio-tags-page.c
@@ -32,7 +32,6 @@
 #include <taglib/tag_c.h>
 
 #include <exo/exo.h>
-#include <thunar-vfs/thunar-vfs.h>
 
 #include <audio-tags-page.h>
 
@@ -977,8 +976,8 @@ audio_tags_page_info_activate (GtkAction *action,
 
   gchar         *mimetype;
 
-  ThunarVfsInfo *vfs_info;
-  gchar         *filename;
+  GFileInfo     *fileinfo;
+  const char    *filename;
   gchar         *filesize;
   
   g_return_val_if_fail (page != NULL || IS_AUDIO_TAGS_PAGE (page), FALSE);
@@ -1007,9 +1006,9 @@ audio_tags_page_info_activate (GtkAction *action,
   
   /* Additional information */
   mimetype = thunarx_file_info_get_mime_type (page->file);
-  vfs_info = thunarx_file_info_get_vfs_info (page->file);
-  filename = vfs_info->display_name;
-  filesize = thunar_vfs_humanize_size (vfs_info->size, NULL, 0);
+  fileinfo = thunarx_file_info_get_file_info (page->file);
+  filename = g_file_info_get_display_name (fileinfo);
+  filesize = g_format_size_for_display (g_file_info_get_size (fileinfo));
 
   /* Create layout table */
   table = gtk_table_new (7, 2, FALSE);
@@ -1121,7 +1120,7 @@ audio_tags_page_info_activate (GtkAction *action,
   g_free (filesize);
   g_free (mimetype);
 
-  thunar_vfs_info_unref (vfs_info);
+  g_object_unref (fileinfo);
   
   return TRUE;
 }