[file-roller: 1/26] started work on a single 'add files' dialog



commit e03482c40541029b39adeeee097474cade19430e
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Aug 7 16:38:29 2012 +0200

    started work on a single 'add files' dialog
    
    We need a file selector that allows the user to select both files and folders,
    Gtk+ doesn't provide that, so a custom dialog is needed.

 po/POTFILES.in                      |    9 +-
 src/Makefile.am                     |    8 +-
 src/actions.c                       |   18 +--
 src/actions.h                       |    3 +-
 src/dlg-add-files.c                 |  198 ----------------------------
 src/dlg-add-files.h                 |   29 ----
 src/{dlg-add-folder.c => dlg-add.c} |  245 +++++++++++++++++++----------------
 src/{dlg-add-folder.h => dlg-add.h} |    3 +-
 src/file-roller.gresource.xml       |    1 +
 src/fr-archive.c                    |    5 +-
 src/fr-archive.h                    |    1 +
 src/fr-file-selector-dialog.c       |  135 +++++++++++++++++++
 src/fr-file-selector-dialog.h       |   60 +++++++++
 src/fr-window.c                     |   37 +++---
 src/fr-window.h                     |    1 +
 src/glib-utils.c                    |   27 ++++
 src/glib-utils.h                    |    7 +
 src/preferences.h                   |    1 -
 src/ui.h                            |   20 +--
 src/ui/Makefile.am                  |    1 +
 src/ui/add-dialog-options.ui        |    6 +-
 src/ui/file-selector.ui             |  222 +++++++++++++++++++++++++++++++
 src/ui/menus-toolbars.ui            |   14 +-
 23 files changed, 639 insertions(+), 412 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 46f4764..669eab9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,10 +15,8 @@ nautilus/nautilus-fileroller.h
 src/actions.c
 src/actions.h
 src/commands/rpm2cpio.c
-src/dlg-add-files.c
-src/dlg-add-files.h
-src/dlg-add-folder.c
-src/dlg-add-folder.h
+src/dlg-add.c
+src/dlg-add.h
 src/dlg-ask-password.c
 src/dlg-ask-password.h
 src/dlg-batch-add.c
@@ -90,6 +88,8 @@ src/fr-command-zoo.c
 src/fr-command-zoo.h
 src/fr-error.c
 src/fr-error.h
+src/fr-file-selector-dialog.c
+src/fr-file-selector-dialog.h
 src/fr-init.c
 src/fr-init.h
 src/fr-list-model.c
@@ -131,6 +131,7 @@ src/typedefs.h
 [type: gettext/glade]src/ui/delete.ui
 [type: gettext/glade]src/ui/error-dialog.ui
 [type: gettext/glade]src/ui/extract-dialog-options.ui
+[type: gettext/glade]src/ui/file-selector.ui
 src/ui.h
 [type: gettext/glade]src/ui/menus-toolbars.ui
 [type: gettext/glade]src/ui/message-dialog.ui
diff --git a/src/Makefile.am b/src/Makefile.am
index 11d7369..508f826 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,10 +57,8 @@ BUILT_SOURCES =			\
 COMMON_SOURCES = 			\
 	actions.h			\
 	actions.c			\
-	dlg-add-files.c			\
-	dlg-add-files.h			\
-	dlg-add-folder.c		\
-	dlg-add-folder.h		\
+	dlg-add.c			\
+	dlg-add.h			\
 	dlg-ask-password.c		\
 	dlg-ask-password.h		\
 	dlg-batch-add.c			\
@@ -128,6 +126,8 @@ COMMON_SOURCES = 			\
 	fr-command-zoo.h		\
 	fr-error.c			\
 	fr-error.h			\
+	fr-file-selector-dialog.c	\
+	fr-file-selector-dialog.h	\
 	fr-init.c			\
 	fr-init.h			\
 	fr-list-model.c			\
diff --git a/src/actions.c b/src/actions.c
index ec5b835..f9b0e90 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -26,8 +26,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include "actions.h"
-#include "dlg-add-files.h"
-#include "dlg-add-folder.h"
+#include "dlg-add.h"
 #include "dlg-extract.h"
 #include "dlg-delete.h"
 #include "dlg-open-with.h"
@@ -204,18 +203,11 @@ activate_action_quit (GtkAction *action,
 
 
 void
-activate_action_add_files (GtkAction *action,
-			   gpointer   data)
-{
-	add_files_cb (NULL, data);
-}
-
-
-void
-activate_action_add_folder (GtkAction *action,
-			    gpointer   data)
+activate_action_add (GtkAction *action,
+		     gpointer   data)
 {
-	add_folder_cb (NULL, data);
+	/* FIXME: dlg_add (FR_WINDOW (data)) */
+	dlg_add (FR_WINDOW (data));
 }
 
 
diff --git a/src/actions.h b/src/actions.h
index f1b8e54..cf7e184 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -32,8 +32,7 @@ void activate_action_properties (GtkAction *action, gpointer data);
 void activate_action_close (GtkAction *action, gpointer data);
 void activate_action_quit (GtkAction *action, gpointer data);
 
-void activate_action_add_files (GtkAction *action, gpointer data);
-void activate_action_add_folder (GtkAction *action, gpointer data);
+void activate_action_add (GtkAction *action, gpointer data);
 void activate_action_extract (GtkAction *action, gpointer data);
 void activate_action_extract_folder_from_sidebar (GtkAction *action, gpointer data);
 
diff --git a/src/dlg-add-folder.c b/src/dlg-add.c
similarity index 81%
rename from src/dlg-add-folder.c
rename to src/dlg-add.c
index e463c08..76c67bf 100644
--- a/src/dlg-add-folder.c
+++ b/src/dlg-add.c
@@ -25,8 +25,9 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <gio/gio.h>
-#include "dlg-add-folder.h"
+#include "dlg-add.h"
 #include "file-utils.h"
+#include "fr-file-selector-dialog.h"
 #include "fr-stock.h"
 #include "fr-window.h"
 #include "glib-utils.h"
@@ -84,15 +85,15 @@ file_selector_response_cb (GtkWidget    *widget,
 			   int           response,
 			   DialogData   *data)
 {
-	GtkFileChooser *file_sel = GTK_FILE_CHOOSER (widget);
-	FrWindow       *window = data->window;
-	GFile          *selected_folder;
-	gboolean        update, follow_links;
-	const char     *include_files;
-	const char     *exclude_files;
-	const char     *exclude_folders;
-	char           *dest_dir;
-	char           *folder_basename;
+	FrWindow    *window = data->window;
+	GFile       *current_folder;
+	gboolean     update, follow_links;
+	const char  *include_files;
+	const char  *exclude_files;
+	const char  *exclude_folders;
+	char        *dest_dir;
+	char        *folder_basename;
+	GList       *files;
 
 	dlg_add_folder_save_last_options (data);
 
@@ -101,15 +102,15 @@ file_selector_response_cb (GtkWidget    *widget,
 		return TRUE;
 	}
 
-	selected_folder = gtk_file_chooser_get_file (file_sel);
+	current_folder = fr_file_selector_dialog_get_current_folder (FR_FILE_SELECTOR_DIALOG (data->dialog));
 
 	/* check folder permissions. */
 
-	if (! _g_file_check_permissions (selected_folder, R_OK)) {
+	if (! _g_file_check_permissions (current_folder, R_OK)) {
 		GtkWidget *d;
 		char      *utf8_path;
 
-		utf8_path = g_file_get_parse_name (selected_folder);
+		utf8_path = g_file_get_parse_name (current_folder);
 
 		d = _gtk_error_dialog_new (GTK_WINDOW (window),
 					   GTK_DIALOG_MODAL,
@@ -121,7 +122,7 @@ file_selector_response_cb (GtkWidget    *widget,
 		gtk_widget_destroy (GTK_WIDGET (d));
 
 		g_free (utf8_path);
-		g_object_unref (selected_folder);
+		g_object_unref (current_folder);
 
 		return FALSE;
 	}
@@ -141,13 +142,16 @@ file_selector_response_cb (GtkWidget    *widget,
 	if (utf8_only_spaces (exclude_folders))
 		exclude_folders = NULL;
 
-	folder_basename = g_file_get_basename (selected_folder);
+	folder_basename = g_file_get_basename (current_folder);
 	dest_dir = g_build_filename (fr_window_get_current_location (window),
 			      	     folder_basename,
 			      	     NULL);
 
+	files = fr_file_selector_dialog_get_selected_files (FR_FILE_SELECTOR_DIALOG (data->dialog));
+
 	fr_window_archive_add_with_filter (window,
-					   selected_folder,
+					   files,
+					   current_folder,
 					   include_files,
 					   exclude_files,
 					   exclude_folders,
@@ -155,9 +159,10 @@ file_selector_response_cb (GtkWidget    *widget,
 					   update,
 					   follow_links);
 
+	_g_object_list_unref (files);
 	g_free (dest_dir);
 	g_free (folder_basename);
-	g_object_unref (selected_folder);
+	g_object_unref (current_folder);
 
 	gtk_widget_destroy (data->dialog);
 
@@ -173,8 +178,7 @@ static void dlg_add_folder_load_last_options (DialogData *data);
 
 /* create the "add" dialog. */
 void
-add_folder_cb (GtkWidget *widget,
-	       void      *callback_data)
+dlg_add (FrWindow *window)
 {
 	DialogData *data;
 	GtkWidget  *options_button;
@@ -183,22 +187,14 @@ add_folder_cb (GtkWidget *widget,
 
 	data = g_new0 (DialogData, 1);
 	data->settings = g_settings_new (FILE_ROLLER_SCHEMA_ADD);
-	data->window = callback_data;
-	data->dialog = gtk_file_chooser_dialog_new (_("Add a Folder"),
-						    GTK_WINDOW (data->window),
-						    GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
-						    NULL,
-						    NULL);
-	gtk_window_set_default_size (GTK_WINDOW (data->dialog), 530, 510);
-	gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (data->dialog), FALSE);
-	gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (data->dialog), FALSE);
-	gtk_file_chooser_set_create_folders (GTK_FILE_CHOOSER (data->dialog), FALSE);
+	data->window = window;
+	data->dialog = fr_file_selector_dialog_new (_("Add"), GTK_WINDOW (data->window));
 	gtk_dialog_set_default_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK);
 
 	data->builder = _gtk_builder_new_from_resource ("add-dialog-options.ui");
 	if (data->builder == NULL)
 		return;
-	gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (data->dialog), GET_WIDGET ("extra_widget"));
+	fr_file_selector_dialog_set_extra_widget (FR_FILE_SELECTOR_DIALOG (data->dialog), GET_WIDGET ("extra_widget"));
 
 	/* options menu button */
 
@@ -280,7 +276,7 @@ dlg_add_folder_save_last_used_options (DialogData *data,
 static void
 sync_widgets_with_options (DialogData *data,
 			   GFile      *directory,
-			   GFile      *file,
+			   GList      *files,
 			   const char *include_files,
 			   const char *exclude_files,
 			   const char *exclude_folders,
@@ -290,10 +286,10 @@ sync_widgets_with_options (DialogData *data,
 	if (directory == NULL)
 		directory = fr_window_get_add_default_dir (data->window);
 
-	if ((file != NULL) && ! g_file_equal (file, directory))
-		gtk_file_chooser_select_file (GTK_FILE_CHOOSER (data->dialog), file, NULL);
+	if (files != NULL)
+		fr_file_selector_dialog_set_selected_files (FR_FILE_SELECTOR_DIALOG (data->dialog), files);
 	else
-		gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (data->dialog), directory, NULL);
+		fr_file_selector_dialog_set_current_folder (FR_FILE_SELECTOR_DIALOG (data->dialog), directory);
 
 	if ((include_files == NULL) || (include_files[0] == '\0'))
 		include_files = "*";
@@ -322,21 +318,21 @@ clear_options_activate_cb (GtkMenuItem *menu_item,
 			   DialogData  *data)
 {
 	GFile *folder;
-	GFile *file;
+	GList *files;
 
-	folder = gtk_file_chooser_get_current_folder_file (GTK_FILE_CHOOSER (data->dialog));
-	file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (data->dialog));
+	folder = fr_file_selector_dialog_get_current_folder (FR_FILE_SELECTOR_DIALOG (data->dialog));
+	files = fr_file_selector_dialog_get_selected_files (FR_FILE_SELECTOR_DIALOG (data->dialog));
 	sync_widgets_with_options (data,
 				   folder,
-				   file,
+				   files,
 				   "",
 				   "",
 				   "",
 				   FALSE,
 				   TRUE);
 
+	_g_object_list_unref (files);
 	_g_object_unref (folder);
-	_g_object_unref (file);
 }
 
 
@@ -344,20 +340,19 @@ static gboolean
 dlg_add_folder_load_options (DialogData *data,
 			     const char *name)
 {
-	GFile     *options_dir;
-	GFile     *options_file;
-	char      *file_path;
-	GKeyFile  *key_file;
-	GError    *error = NULL;
-	char      *base_dir = NULL;
-	char      *filename = NULL;
-	char      *include_files = NULL;
-	char      *exclude_files = NULL;
-	char      *exclude_folders = NULL;
-	gboolean   update;
-	gboolean   no_symlinks;
-	GFile     *folder;
-	GFile     *file;
+	GFile      *options_dir;
+	GFile      *options_file;
+	char       *file_path;
+	GKeyFile   *key_file;
+	GError     *error = NULL;
+	char       *base_dir = NULL;
+	GList      *files = NULL;
+	char       *include_files = NULL;
+	char       *exclude_files = NULL;
+	char       *exclude_folders = NULL;
+	gboolean    update;
+	gboolean    no_symlinks;
+	GFile      *folder;
 
 	options_dir = _g_file_new_user_config_subdir (ADD_FOLDER_OPTIONS_DIR, TRUE);
 	options_file = g_file_get_child (options_dir, name);
@@ -375,8 +370,14 @@ dlg_add_folder_load_options (DialogData *data,
 
 	base_dir = g_key_file_get_string (key_file, "Options", "base_dir", NULL);
 	folder = g_file_new_for_uri (base_dir);
-	filename = g_key_file_get_string (key_file, "Options", "filename", NULL);
-	file = g_file_new_for_uri (filename);
+
+	files = _g_key_file_get_string_list (key_file, "Options", "files", NULL);
+	if (files == NULL) {
+		char *filename = g_key_file_get_string (key_file, "Options", "filename", NULL);
+		if (filename != NULL)
+			files = g_list_append (NULL, filename);
+	}
+
 	include_files = g_key_file_get_string (key_file, "Options", "include_files", NULL);
 	exclude_files = g_key_file_get_string (key_file, "Options", "exclude_files", NULL);
 	exclude_folders = g_key_file_get_string (key_file, "Options", "exclude_folders", NULL);
@@ -385,7 +386,7 @@ dlg_add_folder_load_options (DialogData *data,
 
 	sync_widgets_with_options (data,
 				   folder,
-			   	   file,
+			   	   files,
 			   	   include_files,
 			   	   exclude_files,
 			   	   exclude_folders,
@@ -394,10 +395,9 @@ dlg_add_folder_load_options (DialogData *data,
 
 	dlg_add_folder_save_last_used_options (data, file_path);
 
-	_g_object_unref (file);
 	_g_object_unref (folder);
 	g_free (base_dir);
-	g_free (filename);
+	_g_string_list_free (files);
 	g_free (include_files);
 	g_free (exclude_files);
 	g_free (exclude_folders);
@@ -414,19 +414,15 @@ static void
 dlg_add_folder_load_last_options (DialogData *data)
 {
 	char     *base_dir = NULL;
-	char     *filename = NULL;
 	char     *include_files = NULL;
 	char     *exclude_files = NULL;
 	char     *exclude_folders = NULL;
 	gboolean  update;
 	gboolean  no_follow_symlinks;
 	GFile    *folder;
-	GFile    *file;
 
 	base_dir = g_settings_get_string (data->settings, PREF_ADD_CURRENT_FOLDER);
 	folder = g_file_new_for_uri (base_dir);
-	filename = g_settings_get_string (data->settings, PREF_ADD_FILENAME);
-	file = g_file_new_for_uri (filename);
 	include_files = g_settings_get_string (data->settings, PREF_ADD_INCLUDE_FILES);
 	exclude_files = g_settings_get_string (data->settings, PREF_ADD_EXCLUDE_FILES);
 	exclude_folders = g_settings_get_string (data->settings, PREF_ADD_EXCLUDE_FOLDERS);
@@ -435,17 +431,15 @@ dlg_add_folder_load_last_options (DialogData *data)
 
 	sync_widgets_with_options (data,
 				   folder,
-			   	   file,
+			   	   NULL,
 			   	   include_files,
 			   	   exclude_files,
 			   	   exclude_folders,
 			   	   update,
 			   	   no_follow_symlinks);
 
-	_g_object_unref (file);
 	_g_object_unref (folder);
 	g_free (base_dir);
-	g_free (filename);
 	g_free (include_files);
 	g_free (exclude_files);
 	g_free (exclude_folders);
@@ -453,17 +447,28 @@ dlg_add_folder_load_last_options (DialogData *data)
 
 
 static void
-get_options_from_widgets (DialogData  *data,
-			  char       **base_dir,
-			  char       **filename,
-			  const char **include_files,
-			  const char **exclude_files,
-			  const char **exclude_folders,
-			  gboolean    *update,
-			  gboolean    *no_symlinks)
+get_options_from_widgets (DialogData   *data,
+			  GFile       **base_dir,
+			  char       ***file_uris,
+			  const char  **include_files,
+			  const char  **exclude_files,
+			  const char  **exclude_folders,
+			  gboolean     *update,
+			  gboolean     *no_symlinks)
 {
-	*base_dir = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (data->dialog));
-	*filename = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (data->dialog));
+	GList *files;
+	GList *scan;
+	int    i;
+
+	*base_dir = fr_file_selector_dialog_get_current_folder (FR_FILE_SELECTOR_DIALOG (data->dialog));
+	files = fr_file_selector_dialog_get_selected_files (FR_FILE_SELECTOR_DIALOG (data->dialog));
+
+	*file_uris = g_new (char *, g_list_length (files) + 1);
+	for (scan = files; scan; scan = scan->next)
+		*file_uris[i++] = g_file_get_uri (G_FILE (scan->data));
+	file_uris[i] = NULL;
+	_g_object_list_unref (files);
+
 	*update = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("update_checkbutton")));
 	*no_symlinks = ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("follow_links_checkbutton")));
 
@@ -482,79 +487,95 @@ get_options_from_widgets (DialogData  *data,
 
 
 static void
+_g_key_file_set_file_uri (GKeyFile   *key_file,
+			  const char *group_name,
+			  const char *key,
+			  GFile      *file)
+{
+	char *uri;
+
+	uri = g_file_get_uri (file);
+	g_key_file_set_string (key_file, group_name, key, uri);
+
+	g_free (uri);
+}
+
+
+static void
 dlg_add_folder_save_current_options (DialogData *data,
 				     GFile      *options_file)
 {
-	char       *base_dir;
-	char       *filename;
-	const char *include_files;
-	const char *exclude_files;
-	const char *exclude_folders;
-	gboolean    update;
-	gboolean    no_symlinks;
-	GKeyFile   *key_file;
-	GFile      *base_dir_file;
+	GFile       *folder;
+	char       **files;
+	const char  *include_files;
+	const char  *exclude_files;
+	const char  *exclude_folders;
+	gboolean     update;
+	gboolean     no_symlinks;
+	GKeyFile    *key_file;
 
 	get_options_from_widgets (data,
-				  &base_dir,
-				  &filename,
+				  &folder,
+				  &files,
 				  &include_files,
 				  &exclude_files,
 				  &exclude_folders,
 				  &update,
 				  &no_symlinks);
 
-	base_dir_file = g_file_new_for_uri (base_dir);
-	fr_window_set_add_default_dir (data->window, base_dir_file);
-	g_object_unref (base_dir_file);
+	fr_window_set_add_default_dir (data->window, folder);
 
 	key_file = g_key_file_new ();
-	g_key_file_set_string (key_file, "Options", "base_dir", base_dir);
-	g_key_file_set_string (key_file, "Options", "filename", filename);
+	_g_key_file_set_file_uri (key_file, "Options", "base_dir", folder);
+	g_key_file_set_string_list (key_file, "Options", "files", (const char * const *) files, -1);
 	g_key_file_set_string (key_file, "Options", "include_files", include_files);
 	g_key_file_set_string (key_file, "Options", "exclude_files", exclude_files);
 	g_key_file_set_string (key_file, "Options", "exclude_folders", exclude_folders);
 	g_key_file_set_boolean (key_file, "Options", "update", update);
 	g_key_file_set_boolean (key_file, "Options", "no_symlinks", no_symlinks);
-
 	_g_key_file_save (key_file, options_file);
 
 	g_key_file_free (key_file);
-	g_free (base_dir);
-	g_free (filename);
+	g_object_unref (folder);
+	g_strfreev (files);
 }
 
 
 static void
 dlg_add_folder_save_last_options (DialogData *data)
 {
-	char       *base_dir;
-	char       *filename;
-	const char *include_files;
-	const char *exclude_files;
-	const char *exclude_folders;
-	gboolean    update;
-	gboolean    no_symlinks;
+	GFile       *folder;
+	char       **files;
+	const char  *include_files;
+	const char  *exclude_files;
+	const char  *exclude_folders;
+	gboolean     update;
+	gboolean     no_symlinks;
 
 	get_options_from_widgets (data,
-				  &base_dir,
-				  &filename,
+				  &folder,
+				  &files,
 				  &include_files,
 				  &exclude_files,
 				  &exclude_folders,
 				  &update,
 				  &no_symlinks);
 
-	g_settings_set_string (data->settings, PREF_ADD_CURRENT_FOLDER, base_dir);
-	g_settings_set_string (data->settings, PREF_ADD_FILENAME, filename);
-	g_settings_set_string (data->settings, PREF_ADD_INCLUDE_FILES, include_files);
-	g_settings_set_string (data->settings, PREF_ADD_EXCLUDE_FILES, exclude_files);
-	g_settings_set_string (data->settings, PREF_ADD_EXCLUDE_FOLDERS, exclude_folders);
-	g_settings_set_boolean (data->settings, PREF_ADD_UPDATE, update);
-	g_settings_set_boolean (data->settings, PREF_ADD_NO_FOLLOW_SYMLINKS, no_symlinks);
+	if (folder != NULL) {
+		char *base_dir = g_file_get_uri (folder);
 
-	g_free (base_dir);
-	g_free (filename);
+		g_settings_set_string (data->settings, PREF_ADD_CURRENT_FOLDER, base_dir);
+		g_settings_set_string (data->settings, PREF_ADD_INCLUDE_FILES, include_files);
+		g_settings_set_string (data->settings, PREF_ADD_EXCLUDE_FILES, exclude_files);
+		g_settings_set_string (data->settings, PREF_ADD_EXCLUDE_FOLDERS, exclude_folders);
+		g_settings_set_boolean (data->settings, PREF_ADD_UPDATE, update);
+		g_settings_set_boolean (data->settings, PREF_ADD_NO_FOLLOW_SYMLINKS, no_symlinks);
+
+		g_free (base_dir);
+	}
+
+	_g_object_unref (folder);
+	g_strfreev (files);
 }
 
 
diff --git a/src/dlg-add-folder.h b/src/dlg-add.h
similarity index 94%
rename from src/dlg-add-folder.h
rename to src/dlg-add.h
index 9cc358b..db4871b 100644
--- a/src/dlg-add-folder.h
+++ b/src/dlg-add.h
@@ -23,7 +23,8 @@
 #define DLG_ADD_FOLDER_H
 
 #include <gtk/gtk.h>
+#include "fr-window.h"
 
-void  add_folder_cb (GtkWidget *widget, void *data);
+void  dlg_add (FrWindow *window);
 
 #endif /* DLG_ADD_FOLDER_H */
diff --git a/src/file-roller.gresource.xml b/src/file-roller.gresource.xml
index 6873efb..e3106b4 100644
--- a/src/file-roller.gresource.xml
+++ b/src/file-roller.gresource.xml
@@ -9,6 +9,7 @@
     <file compressed="true">ui/delete.ui</file>
     <file compressed="true">ui/error-dialog.ui</file>
     <file compressed="true">ui/extract-dialog-options.ui</file>
+    <file compressed="true">ui/file-selector.ui</file>
     <file compressed="true">ui/menus-toolbars.ui</file>
     <file compressed="true">ui/message-dialog.ui</file>
     <file compressed="true">ui/new-archive-dialog-options.ui</file>
diff --git a/src/fr-archive.c b/src/fr-archive.c
index 479cd7e..7c719d7 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -1186,6 +1186,7 @@ file_filter_cb (GFile     *file,
 
 void
 fr_archive_add_files_with_filter (FrArchive           *archive,
+				  GList               *file_list,
 				  GFile               *source_dir,
 				  const char          *include_files,
 				  const char          *exclude_files,
@@ -1202,7 +1203,6 @@ fr_archive_add_files_with_filter (FrArchive           *archive,
 				  gpointer             user_data)
 {
 	AddData       *add_data;
-	GList         *file_list;
 	FileListFlags  flags;
 
 	g_return_if_fail (! archive->read_only);
@@ -1226,7 +1226,6 @@ fr_archive_add_files_with_filter (FrArchive           *archive,
 
 	fr_archive_action_started (archive, FR_ACTION_GETTING_FILE_LIST);
 
-	file_list = g_list_prepend (NULL, source_dir);
 	flags = FILE_LIST_RECURSIVE | FILE_LIST_NO_BACKUP_FILES;
 	if (! follow_links)
 		flags |= FILE_LIST_NO_FOLLOW_LINKS;
@@ -1241,8 +1240,6 @@ fr_archive_add_files_with_filter (FrArchive           *archive,
 				       file_filter_cb,
 				       fr_archive_add_files_ready_cb,
 				       add_data);
-
-	g_list_free (file_list);
 }
 
 
diff --git a/src/fr-archive.h b/src/fr-archive.h
index b24d68e..806b5a9 100644
--- a/src/fr-archive.h
+++ b/src/fr-archive.h
@@ -360,6 +360,7 @@ void          fr_archive_add_files               (FrArchive           *archive,
 						  GAsyncReadyCallback  callback,
 						  gpointer             user_data);
 void          fr_archive_add_files_with_filter   (FrArchive           *archive,
+						  GList               *file_list, /* GFile list */
 						  GFile               *base_dir,
 						  const char          *include_files,
 						  const char          *exclude_files,
diff --git a/src/fr-file-selector-dialog.c b/src/fr-file-selector-dialog.c
new file mode 100644
index 0000000..c478497
--- /dev/null
+++ b/src/fr-file-selector-dialog.c
@@ -0,0 +1,135 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  File-Roller
+ *
+ *  Copyright (C) 2012 Free Software Foundation, Inc.
+ *
+ *  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 Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+#include "fr-file-selector-dialog.h"
+#include "gtk-utils.h"
+#include "glib-utils.h"
+
+
+#define GET_WIDGET(x) (_gtk_builder_get_widget (self->priv->builder, (x)))
+
+
+struct _FrFileSelectorDialogPrivate {
+	GtkBuilder *builder;
+	GtkWidget  *extra_widget;
+	GFile      *current_folder;
+};
+
+
+G_DEFINE_TYPE (FrFileSelectorDialog, fr_file_selector_dialog, GTK_TYPE_DIALOG)
+
+
+static void
+fr_file_selector_dialog_finalize (GObject *object)
+{
+	FrFileSelectorDialog *self;
+
+	self = FR_FILE_SELECTOR_DIALOG (object);
+	g_object_unref (self->priv->builder);
+	_g_object_unref (self->priv->current_folder);
+
+	G_OBJECT_CLASS (fr_file_selector_dialog_parent_class)->finalize (object);
+}
+
+
+static void
+fr_file_selector_dialog_class_init (FrFileSelectorDialogClass *klass)
+{
+	GObjectClass *object_class;
+
+	g_type_class_add_private (klass, sizeof (FrFileSelectorDialogPrivate));
+
+	object_class = (GObjectClass*) klass;
+	object_class->finalize = fr_file_selector_dialog_finalize;
+}
+
+
+static void
+fr_file_selector_dialog_init (FrFileSelectorDialog *self)
+{
+	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, FR_TYPE_FILE_SELECTOR_DIALOG, FrFileSelectorDialogPrivate);
+	self->priv->current_folder = NULL;
+	self->priv->builder = _gtk_builder_new_from_resource ("file-selector.ui");
+
+	gtk_container_set_border_width (GTK_CONTAINER (self), 5);
+	gtk_window_set_default_size (GTK_WINDOW (self), 830, 510); /* FIXME: find a good size */
+	gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (self))), GET_WIDGET ("content"));
+}
+
+
+GtkWidget *
+fr_file_selector_dialog_new (const char *title,
+			     GtkWindow  *parent)
+{
+	return (GtkWidget *) g_object_new (FR_TYPE_FILE_SELECTOR_DIALOG,
+					   "title", title,
+					   "transient-for", parent,
+					   NULL);
+}
+
+
+void
+fr_file_selector_dialog_set_extra_widget (FrFileSelectorDialog *self,
+					  GtkWidget            *extra_widget)
+{
+	if (self->priv->extra_widget != NULL)
+		gtk_container_remove (GTK_CONTAINER (GET_WIDGET ("extra_widget_container")), self->priv->extra_widget);
+	self->priv->extra_widget = extra_widget;
+	gtk_container_add (GTK_CONTAINER (GET_WIDGET ("extra_widget_container")), self->priv->extra_widget);
+}
+
+
+GtkWidget *
+fr_file_selector_dialog_get_extra_widget (FrFileSelectorDialog *self)
+{
+	return self->priv->extra_widget;
+}
+
+
+void
+fr_file_selector_dialog_set_current_folder (FrFileSelectorDialog *dialog,
+					    GFile                *folder)
+{
+
+}
+
+
+GFile *
+fr_file_selector_dialog_get_current_folder (FrFileSelectorDialog *dialog)
+{
+	return NULL;
+}
+
+
+void
+fr_file_selector_dialog_set_selected_files (FrFileSelectorDialog  *dialog,
+					    GList                 *files)
+{
+
+}
+
+
+GList *
+fr_file_selector_dialog_get_selected_files (FrFileSelectorDialog *dialog)
+{
+	return NULL;
+}
diff --git a/src/fr-file-selector-dialog.h b/src/fr-file-selector-dialog.h
new file mode 100644
index 0000000..9695b38
--- /dev/null
+++ b/src/fr-file-selector-dialog.h
@@ -0,0 +1,60 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  File-Roller
+ *
+ *  Copyright (C) 2012 The Free Software Foundation, Inc.
+ *
+ *  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 Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef FR_FILE_SELECTOR_DIALOG_H
+#define FR_FILE_SELECTOR_DIALOG_H
+
+#include <gtk/gtk.h>
+
+#define FR_TYPE_FILE_SELECTOR_DIALOG            (fr_file_selector_dialog_get_type ())
+#define FR_FILE_SELECTOR_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), FR_TYPE_FILE_SELECTOR_DIALOG, FrFileSelectorDialog))
+#define FR_FILE_SELECTOR_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), FR_TYPE_FILE_SELECTOR_DIALOG, FrFileSelectorDialogClass))
+#define FR_IS_FILE_SELECTOR_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FR_TYPE_FILE_SELECTOR_DIALOG))
+#define FR_IS_FILE_SELECTOR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FR_TYPE_FILE_SELECTOR_DIALOG))
+#define FR_FILE_SELECTOR_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), FR_TYPE_FILE_SELECTOR_DIALOG, FrFileSelectorDialogClass))
+
+typedef struct _FrFileSelectorDialog FrFileSelectorDialog;
+typedef struct _FrFileSelectorDialogClass FrFileSelectorDialogClass;
+typedef struct _FrFileSelectorDialogPrivate FrFileSelectorDialogPrivate;
+
+struct _FrFileSelectorDialog {
+	GtkDialog parent_instance;
+	FrFileSelectorDialogPrivate *priv;
+};
+
+struct _FrFileSelectorDialogClass {
+	GtkDialogClass parent_class;
+};
+
+GType           fr_file_selector_dialog_get_type            (void);
+GtkWidget *     fr_file_selector_dialog_new                 (const char             *title,
+							     GtkWindow              *parent);
+void            fr_file_selector_dialog_set_extra_widget    (FrFileSelectorDialog   *dialog,
+							     GtkWidget              *extra_widget);
+GtkWidget *     fr_file_selector_dialog_get_extra_widget    (FrFileSelectorDialog   *dialog);
+void            fr_file_selector_dialog_set_current_folder  (FrFileSelectorDialog   *dialog,
+							     GFile                  *folder);
+GFile *         fr_file_selector_dialog_get_current_folder  (FrFileSelectorDialog   *dialog);
+void            fr_file_selector_dialog_set_selected_files  (FrFileSelectorDialog   *dialog,
+							     GList                  *files /* GFile list */);
+GList *         fr_file_selector_dialog_get_selected_files  (FrFileSelectorDialog   *dialog);
+
+#endif /* FR_FILE_SELECTOR_DIALOG_H */
diff --git a/src/fr-window.c b/src/fr-window.c
index aea2ff4..4b3836b 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -982,10 +982,8 @@ fr_window_update_sensitivity (FrWindow *window)
 	one_file_selected    = n_selected == 1;
 	dir_selected         = selection_has_a_dir (window);
 
-	set_sensitive (window, "AddFiles", ! no_archive && ! ro && ! running && can_store_many_files);
-	set_sensitive (window, "AddFiles_Toolbar", ! no_archive && ! ro && ! running && can_store_many_files);
-	set_sensitive (window, "AddFolder", ! no_archive && ! ro && ! running && can_store_many_files);
-	set_sensitive (window, "AddFolder_Toolbar", ! no_archive && ! ro && ! running && can_store_many_files);
+	set_sensitive (window, "Add", ! no_archive && ! ro && ! running && can_store_many_files);
+	set_sensitive (window, "Add_Toolbar", ! no_archive && ! ro && ! running && can_store_many_files);
 	set_sensitive (window, "Copy", ! no_archive && ! ro && ! running && can_store_many_files && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
 	set_sensitive (window, "Cut", ! no_archive && ! ro && ! running && can_store_many_files && sel_not_null && (window->priv->list_mode != FR_WINDOW_LIST_MODE_FLAT));
 	set_sensitive (window, "Delete", ! no_archive && ! ro && ! window->priv->archive_new && ! running && can_store_many_files);
@@ -5928,6 +5926,7 @@ fr_window_construct (FrWindow *window)
 	gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
 	gtk_style_context_add_class (gtk_widget_get_style_context (toolbar), GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
 	set_action_important (ui, "/ToolBar/Extract_Toolbar");
+	set_action_important (ui, "/ToolBar/Add_Toolbar");
 
 	/* location bar */
 
@@ -6506,6 +6505,7 @@ fr_window_archive_add_files (FrWindow   *window,
 
 void
 fr_window_archive_add_with_filter (FrWindow      *window,
+				   GList         *file_list, /* GFile list */
 				   GFile         *base_dir,
 				   const char    *include_files,
 				   const char    *exclude_files,
@@ -6517,6 +6517,7 @@ fr_window_archive_add_with_filter (FrWindow      *window,
 	_archive_operation_started (window, FR_ACTION_ADDING_FILES);
 
 	fr_archive_add_files_with_filter (window->archive,
+					  file_list,
 					  base_dir,
 					  include_files,
 					  exclude_files,
@@ -7493,21 +7494,19 @@ archive_extraction_ready_for_convertion_cb (GObject      *source_object,
 		return;
 	}
 
-	fr_archive_add_files_with_filter (window->priv->convert_data.new_archive,
-					  window->priv->convert_data.temp_dir,
-					  "*",
-					  NULL,
-					  NULL,
-					  NULL,
-					  FALSE,
-					  FALSE,
-					  window->priv->convert_data.password,
-					  window->priv->convert_data.encrypt_header,
-					  window->priv->compression,
-					  window->priv->convert_data.volume_size,
-					  window->priv->cancellable,
-					  archive_add_ready_for_conversion_cb,
-					  window);
+	fr_archive_add_files (window->priv->convert_data.new_archive,
+			      NULL,
+			      window->priv->convert_data.temp_dir,
+			      NULL,
+			      FALSE,
+			      FALSE,
+			      window->priv->convert_data.password,
+			      window->priv->convert_data.encrypt_header,
+			      window->priv->compression,
+			      window->priv->convert_data.volume_size,
+			      window->priv->cancellable,
+			      archive_add_ready_for_conversion_cb,
+			      window);
 }
 
 
diff --git a/src/fr-window.h b/src/fr-window.h
index bfd2e9b..e8d9cca 100644
--- a/src/fr-window.h
+++ b/src/fr-window.h
@@ -124,6 +124,7 @@ void            fr_window_archive_add_files            (FrWindow      *window,
 							GFile         *base_dir,
 							gboolean       update);
 void            fr_window_archive_add_with_filter      (FrWindow      *window,
+							GList         *files, /* GFile list */
 							GFile         *base_dir,
 						        const char    *include_files,
 						        const char    *exclude_files,
diff --git a/src/glib-utils.c b/src/glib-utils.c
index 2f6efb3..ff23a1c 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -1233,6 +1233,33 @@ _g_file_append_path (GFile  *file,
 }
 
 
+/* GKeyFile */
+
+
+GList *
+_g_key_file_get_string_list (GKeyFile    *key_file,
+			     const char  *group_name,
+			     const char  *key,
+			     GError    **error)
+{
+	char  **strv;
+	GList  *list;
+	int     i;
+
+	strv = g_key_file_get_string_list (key_file, group_name, key, NULL, error);
+	if (strv == NULL)
+		return NULL;
+
+	list = NULL;
+	for (i = 0; strv[i] != NULL; i++)
+		list = g_list_prepend (list, strv[i]);
+
+	g_free (strv);
+
+	return g_list_reverse (list);
+}
+
+
 /* line parser */
 
 
diff --git a/src/glib-utils.h b/src/glib-utils.h
index f002775..a69bc74 100644
--- a/src/glib-utils.h
+++ b/src/glib-utils.h
@@ -161,6 +161,13 @@ GList *             _g_file_list_new_from_uri_list (GList               *uris);
 GFile *             _g_file_append_path            (GFile               *file,
                                                     ...);
 
+/* GKeyFile */
+
+GList *             _g_key_file_get_string_list    (GKeyFile            *key_file,
+						    const char          *group_name,
+						    const char          *key,
+						    GError             **error);
+
 /* functions used to parse a command output lines. */
 
 gboolean            _g_line_matches_pattern        (const char          *line,
diff --git a/src/preferences.h b/src/preferences.h
index 02e9b5d..8a22b1f 100644
--- a/src/preferences.h
+++ b/src/preferences.h
@@ -62,7 +62,6 @@
 #define PREF_EXTRACT_RECREATE_FOLDERS     "recreate-folders"
 
 #define PREF_ADD_CURRENT_FOLDER           "current-folder"
-#define PREF_ADD_FILENAME                 "filename"
 #define PREF_ADD_INCLUDE_FILES            "include-files"
 #define PREF_ADD_EXCLUDE_FILES            "exclude-files"
 #define PREF_ADD_EXCLUDE_FOLDERS          "exclude-folders"
diff --git a/src/ui.h b/src/ui.h
index 3b11684..771902f 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -38,22 +38,14 @@ static GtkActionEntry action_entries[] = {
 	  NULL, NULL,
 	  N_("Information about the program"),
 	  G_CALLBACK (activate_action_about) },
-	{ "AddFiles", FR_STOCK_ADD_FILES,
-	  N_("_Add Filesâ"), NULL,
+	{ "Add", FR_STOCK_ADD_FILES,
+	  N_("_Addâ"), NULL,
 	  N_("Add files to the archive"),
-	  G_CALLBACK (activate_action_add_files) },
-	{ "AddFiles_Toolbar", FR_STOCK_ADD_FILES,
-	  N_("Add Files"), NULL,
+	  G_CALLBACK (activate_action_add) },
+	{ "Add_Toolbar", FR_STOCK_ADD_FILES,
+	  N_("Add"), NULL,
 	  N_("Add files to the archive"),
-	  G_CALLBACK (activate_action_add_files) },
-	{ "AddFolder", FR_STOCK_ADD_FOLDER,
-	  N_("Add a _Folderâ"), NULL,
-	  N_("Add a folder to the archive"),
-	  G_CALLBACK (activate_action_add_folder) },
-	{ "AddFolder_Toolbar", FR_STOCK_ADD_FOLDER,
-	  N_("Add Folder"), NULL,
-	  N_("Add a folder to the archive"),
-	  G_CALLBACK (activate_action_add_folder) },
+	  G_CALLBACK (activate_action_add) },
 	{ "Close", GTK_STOCK_CLOSE,
 	  NULL, NULL,
 	  N_("Close the current archive"),
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index c1693bd..42914f2 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -7,6 +7,7 @@ EXTRA_DIST = 				\
 	delete.ui			\
 	error-dialog.ui			\
 	extract-dialog-options.ui	\
+	file-selector.ui		\
 	menus-toolbars.ui		\
 	message-dialog.ui		\
 	new-archive-dialog-options.ui	\
diff --git a/src/ui/add-dialog-options.ui b/src/ui/add-dialog-options.ui
index 719b42f..752fbd3 100644
--- a/src/ui/add-dialog-options.ui
+++ b/src/ui/add-dialog-options.ui
@@ -4,7 +4,7 @@
   <object class="GtkBox" id="extra_widget">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="spacing">12</property>
+    <property name="spacing">24</property>
     <child>
       <object class="GtkBox" id="box2">
         <property name="visible">True</property>
@@ -134,7 +134,7 @@
         </child>
       </object>
       <packing>
-        <property name="expand">True</property>
+        <property name="expand">False</property>
         <property name="fill">True</property>
         <property name="position">0</property>
       </packing>
@@ -213,7 +213,7 @@
         </child>
       </object>
       <packing>
-        <property name="expand">True</property>
+        <property name="expand">False</property>
         <property name="fill">True</property>
         <property name="position">1</property>
       </packing>
diff --git a/src/ui/file-selector.ui b/src/ui/file-selector.ui
new file mode 100644
index 0000000..764a522
--- /dev/null
+++ b/src/ui/file-selector.ui
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkListStore" id="files_liststore">
+    <columns>
+      <!-- column-name icon_name -->
+      <column type="gchararray"/>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+      <!-- column-name size -->
+      <column type="gchararray"/>
+      <!-- column-name modified -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <object class="GtkListStore" id="places_liststore">
+    <columns>
+      <!-- column-name icon_name -->
+      <column type="gchararray"/>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <object class="GtkBox" id="content">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="orientation">vertical</property>
+    <property name="spacing">12</property>
+    <child>
+      <object class="GtkBox" id="box2">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Location:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">location_entry</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkEntry" id="location_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="invisible_char">â</property>
+                <property name="invisible_char_set">True</property>
+              </object>
+              <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkPaned" id="paned1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="position">160</property>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="places_treeview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="model">places_liststore</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection1"/>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                        <property name="title" translatable="yes">Places</property>
+                        <child>
+                          <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
+                          <attributes>
+                            <attribute name="icon-name">0</attribute>
+                          </attributes>
+                        </child>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext1"/>
+                          <attributes>
+                            <attribute name="text">1</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkScrolledWindow" id="scrolledwindow2">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="shadow_type">in</property>
+                <child>
+                  <object class="GtkTreeView" id="files_treeview">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="model">files_liststore</property>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection" id="treeview-selection2">
+                        <property name="mode">multiple</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                        <property name="resizable">True</property>
+                        <property name="title" translatable="yes">Name</property>
+                        <property name="expand">True</property>
+                        <property name="reorderable">True</property>
+                        <property name="sort_indicator">True</property>
+                        <child>
+                          <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf2"/>
+                          <attributes>
+                            <attribute name="icon-name">0</attribute>
+                          </attributes>
+                        </child>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext4"/>
+                          <attributes>
+                            <attribute name="text">1</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn3">
+                        <property name="resizable">True</property>
+                        <property name="sizing">fixed</property>
+                        <property name="fixed_width">80</property>
+                        <property name="title" translatable="yes">Size</property>
+                        <property name="reorderable">True</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext2"/>
+                          <attributes>
+                            <attribute name="text">2</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkTreeViewColumn" id="treeviewcolumn4">
+                        <property name="resizable">True</property>
+                        <property name="sizing">fixed</property>
+                        <property name="fixed_width">100</property>
+                        <property name="title" translatable="yes">Modified</property>
+                        <property name="reorderable">True</property>
+                        <child>
+                          <object class="GtkCellRendererText" id="cellrenderertext3"/>
+                          <attributes>
+                            <attribute name="text">3</attribute>
+                          </attributes>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">True</property>
+        <property name="fill">True</property>
+        <property name="position">0</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkBox" id="extra_widget_container">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="expand">False</property>
+        <property name="fill">True</property>
+        <property name="position">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/src/ui/menus-toolbars.ui b/src/ui/menus-toolbars.ui
index 529d383..43891f7 100644
--- a/src/ui/menus-toolbars.ui
+++ b/src/ui/menus-toolbars.ui
@@ -23,11 +23,9 @@
       <menuitem action="SelectAll"/>
       <menuitem action="DeselectAll"/>
       <separator/>
+      <menuitem action="Add"/>
       <menuitem action="Find"/>
       <separator/>
-      <menuitem action="AddFiles"/>
-      <menuitem action="AddFolder"/>
-      <separator/>
       <menuitem action="Password"/>
     </menu>
     <menu action="ViewMenu">
@@ -49,10 +47,11 @@
     <toolitem action="New"/>
     <toolitem action="OpenRecent_Toolbar"/>
     <separator/>
-    <toolitem action="Extract_Toolbar"/>
+    <toolitem action="Add_Toolbar"/>
     <separator/>
-    <toolitem action="AddFiles_Toolbar"/>
-    <toolitem action="AddFolder_Toolbar"/>
+    <toolitem action="Extract_Toolbar"/>
+    <separator expand="true"/>
+    <toolitem action="Properties"/>
   </toolbar>
   <toolbar name="LocationBar">
     <toolitem action="GoBack"/>
@@ -84,8 +83,7 @@
     <menuitem action="Delete"/>
   </popup>
   <popup name="AddMenu">
-    <menuitem action="AddFiles"/>
-    <menuitem action="AddFolder"/>
+    <menuitem action="Add"/>
   </popup>
   <popup name="SidebarFolderPopupMenu">
     <menuitem action="OpenFolderFromSidebar"/>



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