aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-local.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-10-02 03:11:32 +0800
committerDan Winship <danw@src.gnome.org>2001-10-02 03:11:32 +0800
commit14d9f8c04e5e4411d0bb420bd772a6b3dfee97a3 (patch)
tree444c0e57b625a2e9593a796ac4dcf5851e21b823 /mail/mail-local.c
parent80a4835173ca22b1eeb7b29f3eb16e49207bb808 (diff)
downloadgsoc2013-evolution-14d9f8c04e5e4411d0bb420bd772a6b3dfee97a3.tar.gz
gsoc2013-evolution-14d9f8c04e5e4411d0bb420bd772a6b3dfee97a3.tar.zst
gsoc2013-evolution-14d9f8c04e5e4411d0bb420bd772a6b3dfee97a3.zip
Don't use mail_tool_get_folder_name here since that function only existed
* mail-local.c (mail_local_reconfigure_folder): Don't use mail_tool_get_folder_name here since that function only existed to be clever in a certain case that this is not. (reconfigure_folder_free): Remove the dialog from the hash table here so that it gets removed in the successfully-reconfigured case too. Don't unref folder_out if it never got set. (reconfigure_clicked): Remove the hash table code from here; it's in reconfigure_folder_free now. * mail-tools.c (mail_tool_get_folder_name): No longer used by anything. (mail_tool_get_folder_from_urlname): Also not used anywhere. svn path=/trunk/; revision=13273
Diffstat (limited to 'mail/mail-local.c')
-rw-r--r--mail/mail-local.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 5fbb457543..32a2ad6c60 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -1063,6 +1063,9 @@ struct _reconfigure_msg {
CamelFolder *folder_out;
};
+/* hash table of folders that the user has a reconfig-folder dialog for */
+static GHashTable *reconfigure_folder_hash = NULL;
+
static char *
reconfigure_folder_describe (struct _mail_msg *mm, int done)
{
@@ -1117,7 +1120,16 @@ reconfigure_folder_free (struct _mail_msg *mm)
{
struct _reconfigure_msg *m = (struct _reconfigure_msg *)mm;
- camel_object_unref (CAMEL_OBJECT (m->folder_out));
+ /* remove this folder from our hash since we are done with it */
+ g_hash_table_remove (reconfigure_folder_hash, m->fb->folder);
+ if (g_hash_table_size (reconfigure_folder_hash) == 0) {
+ /* additional cleanup */
+ g_hash_table_destroy (reconfigure_folder_hash);
+ reconfigure_folder_hash = NULL;
+ }
+
+ if (m->folder_out)
+ camel_object_unref (CAMEL_OBJECT (m->folder_out));
gtk_object_unref (GTK_OBJECT (m->fb));
g_free (m->newtype);
}
@@ -1129,9 +1141,6 @@ static struct _mail_msg_op reconfigure_folder_op = {
reconfigure_folder_free,
};
-/* hash table of folders that the user has a reconfig-folder dialog for */
-static GHashTable *reconfigure_folder_hash = NULL;
-
static void
reconfigure_clicked (GnomeDialog *dialog, int button, struct _reconfigure_msg *m)
{
@@ -1155,17 +1164,8 @@ reconfigure_clicked (GnomeDialog *dialog, int button, struct _reconfigure_msg *m
} else
mail_msg_free ((struct _mail_msg *)m);
- if (button != -1) {
- /* remove this folder from our hash since we are done with it */
- g_hash_table_remove (reconfigure_folder_hash, m->fb->folder);
- if (g_hash_table_size (reconfigure_folder_hash) == 0) {
- /* additional cleanup */
- g_hash_table_destroy (reconfigure_folder_hash);
- reconfigure_folder_hash = NULL;
- }
-
+ if (button != -1)
gnome_dialog_close (dialog);
- }
}
void
@@ -1174,7 +1174,7 @@ mail_local_reconfigure_folder (FolderBrowser *fb)
GladeXML *gui;
GnomeDialog *gd;
struct _reconfigure_msg *m;
- char *name, *title;
+ char *title;
GList *p;
GtkWidget *menu;
char *currentformat;
@@ -1205,11 +1205,10 @@ mail_local_reconfigure_folder (FolderBrowser *fb)
gui = glade_xml_new (EVOLUTION_GLADEDIR "/local-config.glade", "dialog_format");
gd = (GnomeDialog *)glade_xml_get_widget (gui, "dialog_format");
- name = mail_tool_get_folder_name (fb->folder);
- title = g_strdup_printf (_("Reconfigure %s"), name);
+ title = g_strdup_printf (_("Reconfigure /%s"),
+ camel_folder_get_full_name (fb->folder));
gtk_window_set_title (GTK_WINDOW (gd), title);
g_free (title);
- g_free (name);
m->frame = glade_xml_get_widget (gui, "frame_format");
m->apply = glade_xml_get_widget (gui, "apply_format");