[Goodies-commits] r3772 - in thunar-svn-plugin/trunk: po tsp-svn-helper

Peter de Ridder peter at xfce.org
Thu Jan 3 20:12:47 CET 2008


Author: peter
Date: 2008-01-03 19:12:46 +0000 (Thu, 03 Jan 2008)
New Revision: 3772

Added:
   thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserprivate.h
Modified:
   thunar-svn-plugin/trunk/po/fr.po
   thunar-svn-plugin/trunk/po/hu.po
   thunar-svn-plugin/trunk/po/lv.po
   thunar-svn-plugin/trunk/po/nl.po
   thunar-svn-plugin/trunk/po/pt_BR.po
   thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot
   thunar-svn-plugin/trunk/po/ur.po
   thunar-svn-plugin/trunk/tsp-svn-helper/Makefile.am
   thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserutils.h
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-transfer-dialog.c
Log:
solved the problem with gtkfilechooserprivate another way, so i could keep filechooserentry

Modified: thunar-svn-plugin/trunk/po/fr.po
===================================================================
--- thunar-svn-plugin/trunk/po/fr.po	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/po/fr.po	2008-01-03 19:12:46 UTC (rev 3772)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: xfce-i 18n\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-02 21:52+0100\n"
+"POT-Creation-Date: 2008-01-02 23:32+0100\n"
 "PO-Revision-Date: 2007-10-24 13:04+0100\n"
 "Last-Translator: Mike Massonnet <mmassonnet at gmail.com>\n"
 "Language-Team: French\n"
@@ -601,20 +601,21 @@
 msgid "Check Repository"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:71
+#: tsp-svn-helper/tsh-transfer-dialog.c:79
 msgid "_Repository:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:80
-#: tsp-svn-helper/tsh-transfer-dialog.c:118
+#: tsp-svn-helper/tsh-transfer-dialog.c:89
+#: tsp-svn-helper/tsh-transfer-dialog.c:95
+#: tsp-svn-helper/tsh-transfer-dialog.c:141
 msgid "Select a folder"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:111
+#: tsp-svn-helper/tsh-transfer-dialog.c:134
 msgid "_Directory:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:130
+#: tsp-svn-helper/tsh-transfer-dialog.c:153
 msgid "Transfer"
 msgstr ""
 

Modified: thunar-svn-plugin/trunk/po/hu.po
===================================================================
--- thunar-svn-plugin/trunk/po/hu.po	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/po/hu.po	2008-01-03 19:12:46 UTC (rev 3772)
@@ -2,7 +2,7 @@
 msgstr ""
 "Project-Id-Version: Thunar SVN plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-02 21:52+0100\n"
+"POT-Creation-Date: 2008-01-02 23:32+0100\n"
 "PO-Revision-Date: 2007-06-04 08:37+0100\n"
 "Last-Translator: SZERVÁC Attila <sas at 321.hu>\n"
 "Language-Team: Hungarian\n"
@@ -596,20 +596,21 @@
 msgid "Check Repository"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:71
+#: tsp-svn-helper/tsh-transfer-dialog.c:79
 msgid "_Repository:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:80
-#: tsp-svn-helper/tsh-transfer-dialog.c:118
+#: tsp-svn-helper/tsh-transfer-dialog.c:89
+#: tsp-svn-helper/tsh-transfer-dialog.c:95
+#: tsp-svn-helper/tsh-transfer-dialog.c:141
 msgid "Select a folder"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:111
+#: tsp-svn-helper/tsh-transfer-dialog.c:134
 msgid "_Directory:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:130
+#: tsp-svn-helper/tsh-transfer-dialog.c:153
 msgid "Transfer"
 msgstr ""
 

Modified: thunar-svn-plugin/trunk/po/lv.po
===================================================================
--- thunar-svn-plugin/trunk/po/lv.po	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/po/lv.po	2008-01-03 19:12:46 UTC (rev 3772)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: thunar-svn-plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-02 21:52+0100\n"
+"POT-Creation-Date: 2008-01-02 23:32+0100\n"
 "PO-Revision-Date: 2007-11-15 21:18+0300\n"
 "Last-Translator: Rihards Priedītis <rprieditis at inbox.lv>\n"
 "Language-Team: Latvian <rprieditis at inbox.lv>\n"
@@ -599,20 +599,21 @@
 msgid "Check Repository"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:71
+#: tsp-svn-helper/tsh-transfer-dialog.c:79
 msgid "_Repository:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:80
-#: tsp-svn-helper/tsh-transfer-dialog.c:118
+#: tsp-svn-helper/tsh-transfer-dialog.c:89
+#: tsp-svn-helper/tsh-transfer-dialog.c:95
+#: tsp-svn-helper/tsh-transfer-dialog.c:141
 msgid "Select a folder"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:111
+#: tsp-svn-helper/tsh-transfer-dialog.c:134
 msgid "_Directory:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:130
+#: tsp-svn-helper/tsh-transfer-dialog.c:153
 msgid "Transfer"
 msgstr ""
 

Modified: thunar-svn-plugin/trunk/po/nl.po
===================================================================
--- thunar-svn-plugin/trunk/po/nl.po	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/po/nl.po	2008-01-03 19:12:46 UTC (rev 3772)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: thunar-svn-plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-02 21:52+0100\n"
+"POT-Creation-Date: 2008-01-02 23:32+0100\n"
 "PO-Revision-Date: 2008-01-01 22:45+0100\n"
 "Last-Translator: Peter de Ridder <peter at xfce.org>\n"
 "Language-Team: Dutch <xfce-i18n at xfce.org>\n"
@@ -565,20 +565,21 @@
 msgid "Check Repository"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:71
+#: tsp-svn-helper/tsh-transfer-dialog.c:79
 msgid "_Repository:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:80
-#: tsp-svn-helper/tsh-transfer-dialog.c:118
+#: tsp-svn-helper/tsh-transfer-dialog.c:89
+#: tsp-svn-helper/tsh-transfer-dialog.c:95
+#: tsp-svn-helper/tsh-transfer-dialog.c:141
 msgid "Select a folder"
 msgstr "Selecteer een map"
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:111
+#: tsp-svn-helper/tsh-transfer-dialog.c:134
 msgid "_Directory:"
 msgstr "_Map:"
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:130
+#: tsp-svn-helper/tsh-transfer-dialog.c:153
 msgid "Transfer"
 msgstr ""
 

Modified: thunar-svn-plugin/trunk/po/pt_BR.po
===================================================================
--- thunar-svn-plugin/trunk/po/pt_BR.po	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/po/pt_BR.po	2008-01-03 19:12:46 UTC (rev 3772)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: thunar-svn-plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-02 21:52+0100\n"
+"POT-Creation-Date: 2008-01-02 23:32+0100\n"
 "PO-Revision-Date: 2007-11-09 15:08-0300\n"
 "Last-Translator: Fábio Nogueira <deb-user-ba at ubuntu.com>\n"
 "Language-Team: Brazilian Portuguese <ldp-br at bazar2.conectiva.com.br>\n"
@@ -600,20 +600,21 @@
 msgid "Check Repository"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:71
+#: tsp-svn-helper/tsh-transfer-dialog.c:79
 msgid "_Repository:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:80
-#: tsp-svn-helper/tsh-transfer-dialog.c:118
+#: tsp-svn-helper/tsh-transfer-dialog.c:89
+#: tsp-svn-helper/tsh-transfer-dialog.c:95
+#: tsp-svn-helper/tsh-transfer-dialog.c:141
 msgid "Select a folder"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:111
+#: tsp-svn-helper/tsh-transfer-dialog.c:134
 msgid "_Directory:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:130
+#: tsp-svn-helper/tsh-transfer-dialog.c:153
 msgid "Transfer"
 msgstr ""
 

Modified: thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot
===================================================================
--- thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/po/thunar-svn-plugin.pot	2008-01-03 19:12:46 UTC (rev 3772)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-02 21:52+0100\n"
+"POT-Creation-Date: 2008-01-02 23:32+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -566,20 +566,21 @@
 msgid "Check Repository"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:71
+#: tsp-svn-helper/tsh-transfer-dialog.c:79
 msgid "_Repository:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:80
-#: tsp-svn-helper/tsh-transfer-dialog.c:118
+#: tsp-svn-helper/tsh-transfer-dialog.c:89
+#: tsp-svn-helper/tsh-transfer-dialog.c:95
+#: tsp-svn-helper/tsh-transfer-dialog.c:141
 msgid "Select a folder"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:111
+#: tsp-svn-helper/tsh-transfer-dialog.c:134
 msgid "_Directory:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:130
+#: tsp-svn-helper/tsh-transfer-dialog.c:153
 msgid "Transfer"
 msgstr ""
 

Modified: thunar-svn-plugin/trunk/po/ur.po
===================================================================
--- thunar-svn-plugin/trunk/po/ur.po	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/po/ur.po	2008-01-03 19:12:46 UTC (rev 3772)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: thunar-svn-plugin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-01-02 21:52+0100\n"
+"POT-Creation-Date: 2008-01-02 23:32+0100\n"
 "PO-Revision-Date: 2007-10-26 15:12+0500\n"
 "Last-Translator: Muhammad Ali Makki <makk.ma at gmail.com>\n"
 "Language-Team: Urdu <makki.ma at gmail.com>\n"
@@ -602,20 +602,21 @@
 msgid "Check Repository"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:71
+#: tsp-svn-helper/tsh-transfer-dialog.c:79
 msgid "_Repository:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:80
-#: tsp-svn-helper/tsh-transfer-dialog.c:118
+#: tsp-svn-helper/tsh-transfer-dialog.c:89
+#: tsp-svn-helper/tsh-transfer-dialog.c:95
+#: tsp-svn-helper/tsh-transfer-dialog.c:141
 msgid "Select a folder"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:111
+#: tsp-svn-helper/tsh-transfer-dialog.c:134
 msgid "_Directory:"
 msgstr ""
 
-#: tsp-svn-helper/tsh-transfer-dialog.c:130
+#: tsp-svn-helper/tsh-transfer-dialog.c:153
 msgid "Transfer"
 msgstr ""
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/Makefile.am
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/Makefile.am	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/Makefile.am	2008-01-03 19:12:46 UTC (rev 3772)
@@ -63,17 +63,17 @@
 	tsh-log-message-dialog.h					\
 	tsh-log-message-dialog.c					\
 	tsh-transfer-dialog.h						\
-	tsh-transfer-dialog.c
-#	gtkfilechooserentry.h						\
-#	gtkfilechooserentry.c						\
-#	gtkfilechooserutils.h						\
-#	gtkfilechooserutils.c						\
-#	gtkfilechooser.h						\
-#	gtkfilechooser.c						\
-#	gtkfilechooserdefault.c						\
-#	gtkprivate.h							\
-#	gtkintl.h							\
-#
+	tsh-transfer-dialog.c						\
+	gtkfilechooserentry.h						\
+	gtkfilechooserentry.c						\
+	gtkfilechooserutils.h						\
+	gtkfilechooserutils.c						\
+	gtkfilechooser.h						\
+	gtkfilechooser.c						\
+	gtkfilechooserdefault.c						\
+	gtkfilechooserprivate.h						\
+	gtkprivate.h							\
+	gtkintl.h
 
 tsp_svn_helper_CPPFLAGS =						\
 	-DG_LOG_DOMAIN=\"tsp-svn-helper\"

Added: thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserprivate.h
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserprivate.h	                        (rev 0)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserprivate.h	2008-01-03 19:12:46 UTC (rev 3772)
@@ -0,0 +1,97 @@
+/* GTK - The GIMP Toolkit
+ * gtkfilechooserprivate.h: Interface definition for file selector GUIs
+ * Copyright (C) 2003, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GTK_FILE_CHOOSER_PRIVATE_H__
+#define __GTK_FILE_CHOOSER_PRIVATE_H__
+
+#include <gtk/gtkfilesystem.h>
+
+G_BEGIN_DECLS
+
+#define GTK_FILE_CHOOSER_GET_IFACE(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GTK_TYPE_FILE_CHOOSER, GtkFileChooserIface))
+
+typedef struct _GtkFileChooserIface GtkFileChooserIface;
+
+struct _GtkFileChooserIface
+{
+  GTypeInterface base_iface;
+
+  /* Methods
+   */
+  gboolean       (*set_current_folder) 	   (GtkFileChooser    *chooser,
+		 		       	    const GtkFilePath *path,
+					    GError           **error);
+  GtkFilePath *  (*get_current_folder) 	   (GtkFileChooser    *chooser);
+  void           (*set_current_name)   	   (GtkFileChooser    *chooser,
+					    const gchar       *name);
+  gboolean       (*select_path)        	   (GtkFileChooser    *chooser,
+		 		       	    const GtkFilePath *path,
+					    GError           **error);
+  void           (*unselect_path)      	   (GtkFileChooser    *chooser,
+		 		       	    const GtkFilePath *path);
+  void           (*select_all)         	   (GtkFileChooser    *chooser);
+  void           (*unselect_all)       	   (GtkFileChooser    *chooser);
+  GSList *       (*get_paths)          	   (GtkFileChooser    *chooser);
+  GtkFilePath *  (*get_preview_path)   	   (GtkFileChooser    *chooser);
+  GtkFileSystem *(*get_file_system)    	   (GtkFileChooser    *chooser);
+  void           (*add_filter)         	   (GtkFileChooser    *chooser,
+					    GtkFileFilter     *filter);
+  void           (*remove_filter)      	   (GtkFileChooser    *chooser,
+					    GtkFileFilter     *filter);
+  GSList *       (*list_filters)       	   (GtkFileChooser    *chooser);
+  gboolean       (*add_shortcut_folder)    (GtkFileChooser    *chooser,
+					    const GtkFilePath *path,
+					    GError           **error);
+  gboolean       (*remove_shortcut_folder) (GtkFileChooser    *chooser,
+					    const GtkFilePath *path,
+					    GError           **error);
+  GSList *       (*list_shortcut_folders)  (GtkFileChooser    *chooser);
+  
+  /* Signals
+   */
+  void (*current_folder_changed) (GtkFileChooser *chooser);
+  void (*selection_changed)      (GtkFileChooser *chooser);
+  void (*update_preview)         (GtkFileChooser *chooser);
+  void (*file_activated)         (GtkFileChooser *chooser);
+  GtkFileChooserConfirmation (*confirm_overwrite) (GtkFileChooser *chooser);
+};
+
+GtkFileSystem *_gtk_file_chooser_get_file_system         (GtkFileChooser    *chooser);
+gboolean       _gtk_file_chooser_set_current_folder_path (GtkFileChooser    *chooser,
+							  const GtkFilePath *path,
+							  GError           **error);
+GtkFilePath *  _gtk_file_chooser_get_current_folder_path (GtkFileChooser    *chooser);
+gboolean       _gtk_file_chooser_select_path             (GtkFileChooser    *chooser,
+							  const GtkFilePath *path,
+							  GError           **error);
+void           _gtk_file_chooser_unselect_path           (GtkFileChooser    *chooser,
+							  const GtkFilePath *path);
+GSList *       _gtk_file_chooser_get_paths               (GtkFileChooser    *chooser);
+GtkFilePath *  _gtk_file_chooser_get_preview_path        (GtkFileChooser    *chooser);
+gboolean       _gtk_file_chooser_add_shortcut_folder     (GtkFileChooser    *chooser,
+							  const GtkFilePath *path,
+							  GError           **error);
+gboolean       _gtk_file_chooser_remove_shortcut_folder  (GtkFileChooser    *chooser,
+							  const GtkFilePath *path,
+							  GError           **error);
+
+G_END_DECLS
+
+#endif /* __GTK_FILE_CHOOSER_PRIVATE_H__ */

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserutils.h
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserutils.h	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/gtkfilechooserutils.h	2008-01-03 19:12:46 UTC (rev 3772)
@@ -22,7 +22,7 @@
 #ifndef __GTK_FILE_CHOOSER_UTILS_H__
 #define __GTK_FILE_CHOOSER_UTILS_H__
 
-#include <gtk/gtkfilechooserprivate.h>
+#include "gtkfilechooserprivate.h"
 
 G_BEGIN_DECLS
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-transfer-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-transfer-dialog.c	2008-01-02 20:49:00 UTC (rev 3771)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-transfer-dialog.c	2008-01-03 19:12:46 UTC (rev 3772)
@@ -25,13 +25,17 @@
 #include <gtk/gtk.h>
 #include <dirent.h>
 
+#ifndef USE_FILE_ENTRY_REPLACEMENT
 //#include "tsh-file-chooser-entry.h"
-//#include "gtkfilechooserentry.h"
+#include "gtkfilechooserentry.h"
 //#include <gtk/gtkfilechooserentry.h>
+#endif
 
 #include "tsh-transfer-dialog.h"
 
+#ifdef USE_FILE_ENTRY_REPLACEMENT
 static void browse_callback(GtkButton *, TshTransferDialog *);
+#endif
 
 struct _TshTransferDialog
 {
@@ -39,7 +43,9 @@
 
 	GtkWidget *repository;
 	GtkWidget *path;
+#ifdef USE_FILE_ENTRY_REPLACEMENT
   GtkWidget *filechooser;
+#endif
 };
 
 struct _TshTransferDialogClass
@@ -59,9 +65,11 @@
 {
 	GtkWidget *table;
 	GtkWidget *label;
+#ifdef USE_FILE_ENTRY_REPLACEMENT
   GtkWidget *box;
   GtkWidget *button;
   GtkWidget *image;
+#endif
 
 	table = gtk_table_new (2, 2, FALSE);
 
@@ -75,6 +83,7 @@
 	                  GTK_FILL,
 	                  0, 0);
 
+#ifdef USE_FILE_ENTRY_REPLACEMENT
   box = gtk_hbox_new(FALSE, 0);
 	dialog->repository = gtk_entry_new();
   dialog->filechooser = gtk_file_chooser_dialog_new(_("Select a folder"), GTK_WINDOW(dialog),
@@ -82,9 +91,12 @@
                                                     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                                     GTK_STOCK_OK, GTK_RESPONSE_OK,
                                                     NULL);
-  //tsh_file_chooser_entry_new ();
+#else
+	dialog->repository = gtk_file_chooser_entry_new(_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);//tsh_file_chooser_entry_new ();
 	//dialog->repository = _gtk_file_chooser_entry_new(FALSE);
+#endif
 
+#ifdef USE_FILE_ENTRY_REPLACEMENT
   image = gtk_image_new_from_stock (GTK_STOCK_OPEN,
                                     GTK_ICON_SIZE_MENU);
   button = gtk_button_new();
@@ -102,11 +114,22 @@
 	                  GTK_EXPAND | GTK_FILL,
 	                  GTK_FILL,
 	                  0, 0);
+#else
+  gtk_table_attach (GTK_TABLE (table), dialog->repository,
+	                  1, 2, 0, 1,
+	                  GTK_EXPAND | GTK_FILL,
+	                  GTK_FILL,
+	                  0, 0);
+#endif
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->repository);
 	gtk_widget_show(label);
+#ifdef USE_FILE_ENTRY_REPLACEMENT
 	gtk_widget_show(box);
+#else
+	gtk_widget_show(dialog->repository);
 	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog->repository), FALSE);
+#endif
 
 	label = gtk_label_new_with_mnemonic (_("_Directory:"));
 	gtk_table_attach (GTK_TABLE (table), label,
@@ -169,7 +192,9 @@
       absolute = g_build_filename(currdir, (repo_dir[0] == '.' && (!repo_dir[1] || repo_dir[1] == G_DIR_SEPARATOR || repo_dir[1] == '/'))?&repo_dir[1]:repo_dir, NULL);
       g_free (currdir);
     }
+#ifndef USE_FILE_ENTRY_REPLACEMENT
 		gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(dialog->repository), absolute?absolute:repo_dir);
+#endif
     g_free (absolute);
   }
 
@@ -210,7 +235,11 @@
 {
   g_return_val_if_fail (TSH_IS_TRANSFER_DIALOG (dialog), NULL);
 
+#ifdef USE_FILE_ENTRY_REPLACEMENT
 	return g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog->repository)));
+#else
+	return gtk_file_chooser_entry_get_uri(GTK_FILE_CHOOSER_ENTRY(dialog->repository));
+#endif
 }
 
 gchar* tsh_transfer_dialog_get_directory (TshTransferDialog *dialog)
@@ -220,6 +249,7 @@
 	return gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog->path));
 }
 
+#ifdef USE_FILE_ENTRY_REPLACEMENT
 static void
 browse_callback(GtkButton *button, TshTransferDialog *dialog)
 {
@@ -232,4 +262,5 @@
   }
   gtk_widget_hide(dialog->filechooser);
 }
+#endif
 




More information about the Goodies-commits mailing list