diff options
author | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2005-06-07 23:28:54 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2005-06-07 23:28:54 (GMT) |
commit | bca369672136e5ff831ece9832afd42085808fba (patch) | |
tree | f40b0b02036bb97a0d4586077298be7a02e2de03 /shell/ev-application.c | |
parent | 11bd1d65957b444c7491e4fb252f3f50ce8ad3d2 (diff) |
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.
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r-- | shell/ev-application.c | 21 |
1 files changed, 15 insertions, 6 deletions
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)); |