[gtk+] GtkFileChooser: Remove the last remains of the last_folder_uri logic
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkFileChooser: Remove the last remains of the last_folder_uri logic
- Date: Fri, 25 Jan 2013 00:12:23 +0000 (UTC)
commit e57de5310834083a7ac28992e64b9394d76adb04
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Jan 24 18:07:03 2013 -0600
GtkFileChooser: Remove the last remains of the last_folder_uri logic
This is akin to commit cfb09e565460fd463a0822c8c8dbb0521d9fcab9 in the gtk-2-24 branch;
the last_folder_uri is no longer being used for anything meaningful, so we
remove it altogether.
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkfilechooserdefault.c | 48 -------------------------------------------
1 files changed, 0 insertions(+), 48 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index d31cab8..27ad24c 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -256,7 +256,6 @@ typedef enum {
#define NUM_LINES 45
#define NUM_CHARS 60
-#define SETTINGS_KEY_LAST_FOLDER_URI "last-folder-uri"
#define SETTINGS_KEY_LOCATION_MODE "location-mode"
#define SETTINGS_KEY_SHOW_HIDDEN "show-hidden"
#define SETTINGS_KEY_SHOW_SIZE_COLUMN "show-size-column"
@@ -6075,23 +6074,10 @@ save_dialog_geometry (GtkFileChooserDefault *impl)
static void
settings_save (GtkFileChooserDefault *impl)
{
- char *current_folder_uri;
GSettings *settings;
settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (impl));
- /* Current folder */
-
- if (impl->current_folder)
- current_folder_uri = g_file_get_uri (impl->current_folder);
- else
- current_folder_uri = "";
-
- g_settings_set_string (settings, SETTINGS_KEY_LAST_FOLDER_URI, current_folder_uri);
-
- if (impl->current_folder)
- g_free (current_folder_uri);
-
/* All the other state */
g_settings_set_enum (settings, SETTINGS_KEY_LOCATION_MODE, impl->location_mode);
@@ -6122,30 +6108,6 @@ gtk_file_chooser_default_realize (GtkWidget *widget)
emit_default_size_changed (impl);
}
-static GFile *
-get_file_for_last_folder_opened (GtkFileChooserDefault *impl)
-{
- char *last_folder_uri;
- GSettings *settings;
- GFile *file;
-
- settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (impl));
-
- last_folder_uri = g_settings_get_string (settings, SETTINGS_KEY_LAST_FOLDER_URI);
-
- /* If no last folder is set, we use the user's home directory, since
- * this is the starting point for most documents.
- */
- if (last_folder_uri[0] == '\0')
- file = g_file_new_for_path (g_get_home_dir ());
- else
- file = g_file_new_for_uri (last_folder_uri);
-
- g_free (last_folder_uri);
-
- return file;
-}
-
/* GtkWidget::map method */
static void
gtk_file_chooser_default_map (GtkWidget *widget)
@@ -7439,16 +7401,6 @@ gtk_file_chooser_default_get_current_folder (GtkFileChooser *chooser)
impl->operation_mode == OPERATION_MODE_RECENT)
return NULL;
- if (impl->reload_state == RELOAD_EMPTY)
- {
- /* We are unmapped, or we had an error while loading the last folder.
- * We'll return the folder used by the last invocation of the file chooser
- * since once we get (re)mapped, we'll load *that* folder anyway unless
- * the caller explicitly calls set_current_folder() on us.
- */
- return get_file_for_last_folder_opened (impl);
- }
-
if (impl->current_folder)
return g_object_ref (impl->current_folder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]