diff options
author | Sam Creasey <sammy@oh.verio.com> | 2001-07-03 10:56:39 +0800 |
---|---|---|
committer | Sam Creasy <sammy@src.gnome.org> | 2001-07-03 10:56:39 +0800 |
commit | e1e2d6393df2a7e1af08a18330fe65c49d81d9c9 (patch) | |
tree | ef69ef8a56d351818f72533a6ee6b71d244589a6 /mail/mail-display.c | |
parent | fd6ad06df5c3cf3928f9361d566aaaaffe498d2d (diff) | |
download | gsoc2013-evolution-e1e2d6393df2a7e1af08a18330fe65c49d81d9c9.tar.gz gsoc2013-evolution-e1e2d6393df2a7e1af08a18330fe65c49d81d9c9.tar.zst gsoc2013-evolution-e1e2d6393df2a7e1af08a18330fe65c49d81d9c9.zip |
Added an MailAccountEditorNews, for NNTP configuratuion. Based on
2001-07-02 Sam Creasey <sammy@oh.verio.com>
* mail-account-editor-news.c: Added an MailAccountEditorNews, for
NNTP configuratuion. Based on MailAccountEditor, but stripped.
* Makefile.am: added mail-account-editor-news.c and
mail-account-editor-news.h to SOURCES if ENABLE_NNTP is defined.
* mail-accounts.c (load_news): Moved this function, and fixed some
slight brokenness.
(news_edit): Added functional code using MailAccountEditorNews
(news_add): Added functional code using news_edit after
allocation.
* mail-config.glade: news_editor_window widget added. Used by
MailAccountEditorNews.
* mail-display.c (save_data_cb): Store the pathname used when
saving messages so that the next save box will default to the
previous path.
* message-browser.c (message_browser_new): add signal handler for
size_allocate on the message browser. Thus new windows are size
as they were last allocated.
(message_browser_size_allocate_cb): handler to store allocations.
* message-list.c (message_list_setup_etree): connect to the
info_changed signals for the state of the message_list->tree.
Save the folder state to disk, so that when additional
message_lists are created, they are consistant. e.g. the next
buttons do the same thing in the browser, and in the message
viewer after changing sorting options.
* subscribe-dialog.c (build_tree): freeze sc->folder model while
building the tree. Not doing so takes a very long time over 40000
newsgroups.
svn path=/trunk/; revision=10719
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r-- | mail/mail-display.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c index a2f5d6eaa5..bdb4c3096a 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -67,6 +67,8 @@ struct _PixbufLoader { }; static GHashTable *thumbnail_cache = NULL; +static gchar *save_pathname = NULL; /* preserves last directory in save dialog */ + /*----------------------------------------------------------------------* * Callbacks *----------------------------------------------------------------------*/ @@ -147,12 +149,24 @@ save_data_cb (GtkWidget *widget, gpointer user_data) { GtkFileSelection *file_select = (GtkFileSelection *) gtk_widget_get_ancestor (widget, GTK_TYPE_FILE_SELECTION); + gchar *p; /* uh, this doesn't really feel right, but i dont know what to do better */ gtk_widget_hide (GTK_WIDGET (file_select)); write_data_to_file (user_data, gtk_file_selection_get_filename (file_select), FALSE); + + /* preserve the pathname */ + g_free(save_pathname); + save_pathname = g_strdup(gtk_file_selection_get_filename(file_select)); + if((p = strrchr(save_pathname, '/')) != NULL) + p[0] = 0; + else { + g_free(save_pathname); + save_pathname = NULL; + } + gtk_widget_destroy (GTK_WIDGET (file_select)); } @@ -197,7 +211,11 @@ save_part (CamelMimePart *part) GtkFileSelection *file_select; char *filename; - filename = make_safe_filename (g_get_home_dir (), part); + if(save_pathname == NULL) + save_pathname = g_get_home_dir(); + + filename = make_safe_filename (save_pathname, part); + file_select = GTK_FILE_SELECTION ( gtk_file_selection_new (_("Save Attachment"))); gtk_file_selection_set_filename (file_select, filename); |