From bca369672136e5ff831ece9832afd42085808fba Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Tue, 07 Jun 2005 23:28:54 +0000 Subject: PageCache and EvJobs are moved from backend to shell. Two new jobs to load document in background and a statusbar to display this process. FileChooser now can select multiple uris. --- (limited to 'shell/ev-application.c') diff --git a/shell/ev-application.c b/shell/ev-application.c index 43c4068..d10914b 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -122,6 +122,7 @@ ev_application_open (EvApplication *application, GError *err) GtkFileFilter *ps_filter; GtkFileFilter *pixbuf_filter; GtkFileFilter *all_filter; + static gchar *folder = NULL; #ifdef ENABLE_DJVU GtkFileFilter *djvu_filter; #endif @@ -139,6 +140,11 @@ ev_application_open (EvApplication *application, GError *err) GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); + if (folder) { + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), + folder); + } + documents_filter = gtk_file_filter_new (); gtk_file_filter_set_name (documents_filter, _("All Documents")); @@ -193,14 +199,17 @@ ev_application_open (EvApplication *application, GError *err) gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), documents_filter); + gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), TRUE); + if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_OK) { - char *uri; + GSList *uris; - uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser)); - ev_window_open (ev_window, uri); - gtk_widget_show (GTK_WIDGET (ev_window)); - g_free (uri); - + uris = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser)); + folder = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (chooser)); + + ev_window_open_uri_list (ev_window, uris); + + g_slist_free (uris); } else { if (!GTK_WIDGET_VISIBLE (ev_window)) gtk_widget_destroy (GTK_WIDGET (ev_window)); -- cgit v0.9.1