From edd11358f3f0cd089a5c993743414563948764c5 Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Sat, 21 Jan 2006 19:17:11 +0000 Subject: 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. --- (limited to 'shell/ev-window.c') 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); -- cgit v0.9.1