diff options
author | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-01-21 19:17:11 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-01-21 19:17:11 (GMT) |
commit | edd11358f3f0cd089a5c993743414563948764c5 (patch) | |
tree | eda6944beff53f5119d2e17ca30e55f3d8a534a4 /shell/ev-window.c | |
parent | 3648b7f3bb07fb1b558279d60dfe3d1f6b8705fd (diff) |
Save last uri in file chooser dialog. Fix for the bug #327950.
* shell/ev-application.c: (ev_application_shutdown),
(ev_application_set_chooser_uri), (ev_application_get_chooser_uri):
* shell/ev-application.h:
* shell/ev-window.c: (file_open_dialog_response_cb),
(ev_window_cmd_file_open):
Save last uri in file chooser dialog. Fix for the bug #327950.
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r-- | shell/ev-window.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 7e6a1bc..a3a4457 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1093,6 +1093,8 @@ file_open_dialog_response_cb (GtkWidget *chooser, g_slist_foreach (uris, (GFunc)g_free, NULL); g_slist_free (uris); } + ev_application_set_chooser_uri (EV_APP, + gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser))); gtk_widget_destroy (chooser); } @@ -1113,7 +1115,10 @@ ev_window_cmd_file_open (GtkAction *action, EvWindow *window) ev_document_types_add_filters (chooser, NULL); gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), TRUE); gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), FALSE); - + if (ev_application_get_chooser_uri (EV_APP) != NULL) + gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (chooser), + ev_application_get_chooser_uri (EV_APP)); + g_signal_connect (chooser, "response", G_CALLBACK (file_open_dialog_response_cb), window); |