From e1e2d6393df2a7e1af08a18330fe65c49d81d9c9 Mon Sep 17 00:00:00 2001 From: Sam Creasey Date: Tue, 3 Jul 2001 02:56:39 +0000 Subject: Added an MailAccountEditorNews, for NNTP configuratuion. Based on 2001-07-02 Sam Creasey * 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 --- mail/ChangeLog | 36 ++++++++ mail/Makefile.am | 8 ++ mail/mail-account-editor-news.c | 193 ++++++++++++++++++++++++++++++++++++++++ mail/mail-account-editor-news.h | 72 +++++++++++++++ mail/mail-accounts.c | 160 ++++++++++++++++++++------------- mail/mail-config.glade | 114 ++++++++++++++++++++++++ mail/mail-display.c | 20 ++++- mail/message-browser.c | 11 +++ mail/message-list.c | 20 +++++ mail/subscribe-dialog.c | 3 +- 10 files changed, 575 insertions(+), 62 deletions(-) create mode 100644 mail/mail-account-editor-news.c create mode 100644 mail/mail-account-editor-news.h (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 3da62b9f80..19362691ab 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,39 @@ +2001-07-02 Sam Creasey + * 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. + 2001-07-02 Jeffrey Stedfast * mail-accounts.c (construct): Setup the Empty Trash On Exit diff --git a/mail/Makefile.am b/mail/Makefile.am index 76566dea47..4fb0ddcf50 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -35,8 +35,16 @@ EVOLUTION_MAIL_CORBA_GENERATED = \ Mail-skels.c \ Mail-stubs.c +if ENABLE_NNTP +EVOLUTION_MAIL_NNTP = \ + mail-account-editor-news.c \ + mail-account-editor-news.h +endif + + evolution_mail_SOURCES = \ $(EVOLUTION_MAIL_CORBA_GENERATED) \ + $(EVOLUTION_MAIL_NNTP) \ component-factory.c \ component-factory.h \ e-searching-tokenizer.c \ diff --git a/mail/mail-account-editor-news.c b/mail/mail-account-editor-news.c new file mode 100644 index 0000000000..1c980a9d6d --- /dev/null +++ b/mail/mail-account-editor-news.c @@ -0,0 +1,193 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Cloned from mail-account-editor by Sam Creasey + * + * Authors: + * Jeffrey Stedfast + * Dan Winship + * + * Copyright 2001 Ximian, Inc. (www.ximian.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mail-account-editor-news.h" +#include "mail-session.h" + +static void mail_account_editor_news_class_init (MailAccountEditorNewsClass *class); +static void mail_account_editor_news_finalize (GtkObject *obj); + +static GnomeDialogClass *parent_class; + + +GtkType +mail_account_editor_news_get_type () +{ + static GtkType type = 0; + + if (!type) { + GtkTypeInfo type_info = { + "MailAccountEditorNews", + sizeof (MailAccountEditorNews), + sizeof (MailAccountEditorNewsClass), + (GtkClassInitFunc) mail_account_editor_news_class_init, + (GtkObjectInitFunc) NULL, + (GtkArgSetFunc) NULL, + (GtkArgGetFunc) NULL + }; + + type = gtk_type_unique (gnome_dialog_get_type (), &type_info); + } + + return type; +} + +static void +mail_account_editor_news_class_init (MailAccountEditorNewsClass *class) +{ + GtkObjectClass *object_class; + + object_class = (GtkObjectClass *) class; + parent_class = gtk_type_class (gnome_dialog_get_type ()); + + object_class->finalize = mail_account_editor_news_finalize; +} + +static void +mail_account_editor_news_finalize (GtkObject *obj) +{ + MailAccountEditorNews *editor = (MailAccountEditorNews *) obj; + + gtk_object_unref (GTK_OBJECT (editor->xml)); + + ((GtkObjectClass *)(parent_class))->finalize (obj); +} + +static gboolean +apply_changes(MailAccountEditorNews *editor) +{ + + CamelURL *url; + GtkEntry *service_ent; + + service_ent = GTK_ENTRY(glade_xml_get_widget(editor->xml, "source_name")); + url = g_new0 (CamelURL, 1); + + url->protocol = g_strdup("nntp"); + url->host = g_strdup(gtk_entry_get_text(service_ent)); + if(strlen(url->host) == 0) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("You have not filled in all of the required information.")); + camel_url_free(url); + return FALSE; + } + + if(editor->service->url == NULL) + mail_config_add_news(editor->service); + + editor->service->url = camel_url_to_string(url, 0); + + mail_config_write(); + return TRUE; +} + +static void +apply_clicked (GtkWidget *widget, gpointer data) +{ + MailAccountEditorNews *editor = data; + + apply_changes (editor); +} + +static void +ok_clicked (GtkWidget *widget, gpointer data) +{ + MailAccountEditorNews *editor = data; + + if (apply_changes (editor)) + gtk_widget_destroy (GTK_WIDGET (editor)); +} + +static void +cancel_clicked (GtkWidget *widget, gpointer data) +{ + MailAccountEditorNews *editor = data; + + gtk_widget_destroy (GTK_WIDGET (editor)); +} + +MailAccountEditorNews * +mail_account_editor_news_new (MailConfigService *service) +{ + MailAccountEditorNews *editor; + GtkEntry *service_ent; + + editor = (MailAccountEditorNews *) gtk_type_new (mail_account_editor_news_get_type ()); + + editor->service = service; + editor->xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", NULL); + + /* get our toplevel widget and reparent it */ + editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->xml, "news_editor_notebook")); + gtk_widget_reparent (GTK_WIDGET (editor->notebook), GNOME_DIALOG (editor)->vbox); + + /* give our dialog an OK button and title */ + gtk_window_set_title (GTK_WINDOW (editor), _("Evolution News Editor")); + gtk_window_set_policy (GTK_WINDOW (editor), FALSE, TRUE, TRUE); + gtk_window_set_modal (GTK_WINDOW (editor), TRUE); + gnome_dialog_append_buttons (GNOME_DIALOG (editor), + GNOME_STOCK_BUTTON_OK, + GNOME_STOCK_BUTTON_APPLY, + GNOME_STOCK_BUTTON_CANCEL, + NULL); + + gnome_dialog_button_connect (GNOME_DIALOG (editor), 0 /* OK */, + GTK_SIGNAL_FUNC (ok_clicked), + editor); + gnome_dialog_button_connect (GNOME_DIALOG (editor), 1 /* APPLY */, + GTK_SIGNAL_FUNC (apply_clicked), + editor); + gnome_dialog_button_connect (GNOME_DIALOG (editor), 2 /* CANCEL */, + GTK_SIGNAL_FUNC (cancel_clicked), + editor); + + if(service->url) { + CamelURL *url; + + url = camel_url_new(service->url, NULL); + + if(url->host) { + service_ent = GTK_ENTRY(glade_xml_get_widget(editor->xml, "source_name")); + gtk_entry_set_text(service_ent, url->host); + } + + camel_url_free(url); + } + + return editor; +} diff --git a/mail/mail-account-editor-news.h b/mail/mail-account-editor-news.h new file mode 100644 index 0000000000..69e5194c6d --- /dev/null +++ b/mail/mail-account-editor-news.h @@ -0,0 +1,72 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Cloned from mail-account-editor by Sam Creasey + * + * Authors: Jeffrey Stedfast + * + * Copyright 2001 Helix Code, Inc. (www.helixcode.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. + * + */ + +#ifndef MAIL_ACCOUNT_EDITOR_NEWS_H +#define MAIL_ACCOUNT_EDITOR_NEWS_H + +#ifdef __cplusplus +extern "C" { +#pragma } +#endif /* __cplusplus */ + +#include +#include +#include +#include +#include + +#include "mail-config.h" + +#define MAIL_ACCOUNT_EDITOR_NEWS_TYPE (mail_account_editor_news_get_type ()) +#define MAIL_ACCOUNT_EDITOR_NEWS(o) (GTK_CHECK_CAST ((o), MAIL_ACCOUNT_EDITOR_NEWS_TYPE, MailAccountEditorNews)) +#define MAIL_ACCOUNT_EDITOR_NEWS_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_ACCOUNT_EDITOR_NEWS_TYPE, MailAccountEditorNewsClass)) +#define MAIL_IS_ACCOUNT_EDITOR_NEWS(o) (GTK_CHECK_TYPE ((o), MAIL_ACCOUNT_EDITOR_NEWS_TYPE)) +#define MAIL_IS_ACCOUNT_EDITOR_NEWS_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNT_EDITOR_NEWS_TYPE)) + +struct _MailAccountEditorNews { + GnomeDialog parent; + + GladeXML *xml; + MailConfigService *service; + GtkNotebook *notebook; +}; + +typedef struct _MailAccountEditorNews MailAccountEditorNews; + +typedef struct { + GnomeDialogClass parent_class; + + /* signals */ + +} MailAccountEditorNewsClass; + +GtkType mail_account_editor_news_get_type (void); + +MailAccountEditorNews *mail_account_editor_news_new (MailConfigService *service); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* MAIL_ACCOUNT_EDITOR_NEWS_H */ diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 0be25756f0..f084d163e7 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -38,6 +38,9 @@ #include "mail-config.h" #include "mail-config-druid.h" #include "mail-account-editor.h" +#ifdef ENABLE_NNTP +#include "mail-account-editor-news.h" +#endif #include "mail-session.h" static void mail_accounts_dialog_class_init (MailAccountsDialogClass *class); @@ -149,50 +152,6 @@ load_accounts (MailAccountsDialog *dialog) mail_unselect (dialog->mail_accounts, 0, 0, NULL, dialog); } -#ifdef ENABLE_NNTP -static void -load_news (MailAccountsDialog *dialog) -{ - const MailConfigAccount *account; - const GSList *node = dialog->accounts; - int i = 0; - - gtk_clist_freeze (dialog->news_accounts); - - gtk_clist_clear (dialog->news_accounts); - - while (node) { - CamelURL *url; - gchar *text[3]; - - account = node->data; - - if (account->source && account->source->url) - url = camel_url_new (account->source->url, NULL); - else - url = NULL; - - text[0] = (account->source && account->source->enabled) ? "+" : ""; - text[1] = account->name; - text[2] = g_strdup_printf ("%s%s", url && url->protocol ? url->protocol : _("None"), - account->default_account ? _(" (default)") : ""); - - if (url) - camel_url_free (url); - - gtk_clist_append (dialog->news_accounts, text); - g_free (text[2]); - - /* set the account on the row */ - gtk_clist_set_row_data (dialog->news_accounts, i, (gpointer) account); - - node = node->next; - i++; - } - - gtk_clist_thaw (dialog->news_accounts); -} -#endif /* mail callbacks */ static void @@ -396,6 +355,47 @@ mail_able (GtkButton *button, gpointer data) } #ifdef ENABLE_NNTP +static void +load_news (MailAccountsDialog *dialog) +{ + const MailConfigService *service; + const GSList *node = dialog->news; + int i = 0; + + gtk_clist_freeze (dialog->news_accounts); + + gtk_clist_clear (dialog->news_accounts); + + while (node) { + CamelURL *url; + gchar *text[1]; + + service = node->data; + + if (service->url) + url = camel_url_new (service->url, NULL); + else + url = NULL; + + text[0] = g_strdup_printf ("%s", url && url->host ? url->host : _("None")); + + if (url) + camel_url_free (url); + + gtk_clist_append (dialog->news_accounts, text); + g_free (text[0]); + + /* set the account on the row */ + gtk_clist_set_row_data (dialog->news_accounts, i, (gpointer) service); + + node = node->next; + i++; + } + + gtk_clist_thaw (dialog->news_accounts); +} + + /* news callbacks */ static void news_select (GtkCList *clist, gint row, gint column, GdkEventButton *event, gpointer data) @@ -418,35 +418,75 @@ news_unselect (GtkCList *clist, gint row, gint column, GdkEventButton *event, gp } static void -news_add_finished(GtkWidget *widget, gpointer data) +news_editor_destroyed (GtkWidget *widget, gpointer data) { - /* Either Cancel or Finished was clicked in the druid so reload the accounts */ - MailAccountsDialog *dialog = data; - - dialog->accounts = mail_config_get_accounts (); - load_accounts (dialog); + load_news (MAIL_ACCOUNTS_DIALOG (data)); } + static void -news_add (GtkButton *button, gpointer data) +news_edit (GtkButton *button, gpointer data) { MailAccountsDialog *dialog = data; - MailConfigDruid *druid; - druid = mail_config_druid_new (dialog->shell); - gtk_signal_connect (GTK_OBJECT (druid), "destroy", - GTK_SIGNAL_FUNC (news_add_finished), dialog); + if (dialog->news_row >= 0) { + MailConfigService *service; + MailAccountEditorNews *editor; + + service = gtk_clist_get_row_data (dialog->news_accounts, dialog->news_row); + editor = mail_account_editor_news_new (service); + gtk_signal_connect (GTK_OBJECT (editor), "destroy", + GTK_SIGNAL_FUNC (news_editor_destroyed), + dialog); + gtk_widget_show (GTK_WIDGET (editor)); + } +} + +static void +news_add_destroyed (GtkWidget *widget, gpointer data) +{ + + gpointer *send = data; + MailAccountsDialog *dialog; + MailConfigService *service; + GSList *mini; + + service = send[0]; + dialog = send[1]; + g_free(send); + + dialog->news = mail_config_get_news (); + load_news (dialog); + + mini = g_slist_prepend(NULL, service); + mail_load_storages(dialog->shell, mini, FALSE); + g_slist_free(mini); + + dialog->news = mail_config_get_news (); + load_news (dialog); - gtk_widget_show (GTK_WIDGET (druid)); } static void -news_edit (GtkButton *button, gpointer data) +news_add (GtkButton *button, gpointer data) { MailAccountsDialog *dialog = data; - MailConfigService *server; + MailConfigService *service; + MailAccountEditorNews *editor; + gpointer *send; - /* FIXME: open the editor and stuff */ + send = g_new(gpointer, 2); + + service = g_new0 (MailConfigService, 1); + service->url = NULL; + + editor = mail_account_editor_news_new (service); + send[0] = service; + send[1] = dialog; + gtk_signal_connect (GTK_OBJECT (editor), "destroy", + GTK_SIGNAL_FUNC (news_add_destroyed), + send); + gtk_widget_show (GTK_WIDGET (editor)); } static void @@ -683,7 +723,7 @@ construct (MailAccountsDialog *dialog) GTK_SIGNAL_FUNC (mail_able), dialog); #ifdef ENABLE_NNTP - dialog->news_accounts = GTK_CLIST (glade_xml_get_widget (gui, "clistAccounts")); + dialog->news_accounts = GTK_CLIST (glade_xml_get_widget (gui, "clistNews")); gtk_signal_connect (GTK_OBJECT (dialog->news_accounts), "select-row", GTK_SIGNAL_FUNC (news_select), dialog); gtk_signal_connect (GTK_OBJECT (dialog->news_accounts), "unselect-row", diff --git a/mail/mail-config.glade b/mail/mail-config.glade index f233e30313..40e427d478 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -1937,6 +1937,120 @@ Kerberos + + GtkWindow + news_editor_window + False + newswindow1 + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + True + False + + + GtkNotebook + news_editor_notebook + True + True + True + GTK_POS_TOP + False + 2 + 2 + False + + + GtkVBox + source_vbox + 4 + False + 4 + + + GtkFrame + source_frame + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + True + + + + GtkVBox + vbox31 + False + 0 + + + GtkHBox + hbox24 + 3 + False + 5 + + 0 + False + True + + + + GtkLabel + source_name_label + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkEntry + source_name + True + True + True + 0 + + + 0 + True + True + + + + + + + + + GtkLabel + Notebook:tab + label38 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + GtkWindow mail_accounts_window 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); diff --git a/mail/message-browser.c b/mail/message-browser.c index 39ff1249cc..741c663cd8 100644 --- a/mail/message-browser.c +++ b/mail/message-browser.c @@ -138,6 +138,14 @@ message_browser_folder_loaded (FolderBrowser *fb, const char *uri, MessageBrowse message_browser_message_list_built, mb); } +static void +message_browser_size_allocate_cb (GtkWidget *widget, + GtkAllocation *allocation) +{ + last_allocation = *allocation; + +} + /* Construction */ static void @@ -225,6 +233,9 @@ message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const c gtk_widget_reparent (GTK_WIDGET (fb->mail_display), vbox); gtk_widget_show (GTK_WIDGET (fb->mail_display)); gtk_widget_show (vbox); + + gtk_signal_connect(GTK_OBJECT(new), "size_allocate", + GTK_SIGNAL_FUNC(message_browser_size_allocate_cb), NULL); bonobo_window_set_contents (BONOBO_WINDOW (new), vbox); gtk_widget_grab_focus (GTK_WIDGET (MAIL_DISPLAY (fb->mail_display)->html)); diff --git a/mail/message-list.c b/mail/message-list.c index ca893b9606..61a99abed3 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1007,9 +1007,17 @@ save_tree_state(MessageList *ml) g_free(filename); } +static void +sort_info_changed (GtkWidget *widget, MessageList *ml) +{ + save_tree_state(ml); +} + static void message_list_setup_etree(MessageList *message_list, gboolean outgoing) { + ETableState *etstate; + /* build the spec based on the folder, and possibly from a saved file */ /* otherwise, leave default */ if (message_list->folder) { @@ -1043,6 +1051,18 @@ message_list_setup_etree(MessageList *message_list, gboolean outgoing) g_free (path); g_free (name); + + etstate = e_tree_get_state_object(message_list->tree); + gtk_signal_connect(GTK_OBJECT(etstate->sort_info), + "sort_info_changed", + GTK_SIGNAL_FUNC(sort_info_changed), + message_list); + gtk_signal_connect(GTK_OBJECT(etstate->sort_info), + "group_info_changed", + GTK_SIGNAL_FUNC(sort_info_changed), + message_list); + + } } diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c index 34522e6304..b0b49805b9 100644 --- a/mail/subscribe-dialog.c +++ b/mail/subscribe-dialog.c @@ -762,12 +762,13 @@ build_tree (SubscribeDialog *sc, CamelStore *store) return; } + e_tree_memory_freeze(E_TREE_MEMORY(sc->folder_model)); e_tree_memory_node_remove (E_TREE_MEMORY(sc->folder_model), sc->folder_root); sc->folder_root = e_tree_memory_node_insert (E_TREE_MEMORY(sc->folder_model), NULL, 0, NULL); - build_etree_from_folder_info (sc, sc->folder_root, sc->folder_info); + e_tree_memory_thaw(E_TREE_MEMORY(sc->folder_model)); camel_exception_free (ex); } -- cgit