aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-07 00:34:33 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:10 +0800
commit7aa164895ce4e4ba760af1415e45d7b264d2d2c3 (patch)
tree2a802f3474dd9a2ecd21c1379c7fb11ba938896b /mail
parent0b1897d7d8a364263f980b29ba8eaaf9181323b1 (diff)
downloadgsoc2013-evolution-7aa164895ce4e4ba760af1415e45d7b264d2d2c3.tar
gsoc2013-evolution-7aa164895ce4e4ba760af1415e45d7b264d2d2c3.tar.gz
gsoc2013-evolution-7aa164895ce4e4ba760af1415e45d7b264d2d2c3.tar.bz2
gsoc2013-evolution-7aa164895ce4e4ba760af1415e45d7b264d2d2c3.tar.lz
gsoc2013-evolution-7aa164895ce4e4ba760af1415e45d7b264d2d2c3.tar.xz
gsoc2013-evolution-7aa164895ce4e4ba760af1415e45d7b264d2d2c3.tar.zst
gsoc2013-evolution-7aa164895ce4e4ba760af1415e45d7b264d2d2c3.zip
em_folder_utils_create_folder(): Change function parameters.
Take a folder URI string instead of a CamelFolderInfo, and swap places with the GtkWindow parameter.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-folder-selector.c4
-rw-r--r--mail/em-folder-utils.c16
-rw-r--r--mail/em-folder-utils.h4
3 files changed, 15 insertions, 9 deletions
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index ae3092d4df..5bf3b3f1c6 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -116,7 +116,9 @@ emfs_response (GtkWidget *dialog, gint response, EMFolderSelector *emfs)
g_object_set_data ((GObject *)emfs->emft, "select", GUINT_TO_POINTER (1));
- em_folder_utils_create_folder (NULL, emfs->emft, em_folder_tree_get_session (emfs->emft), GTK_WINDOW (dialog));
+ em_folder_utils_create_folder (
+ GTK_WINDOW (dialog), emfs->emft,
+ em_folder_tree_get_session (emfs->emft), NULL);
g_signal_stop_emission_by_name (emfs, "response");
}
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index fdf18c2082..182ec200c3 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -773,10 +773,10 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs,
/* FIXME: these functions must be documented */
void
-em_folder_utils_create_folder (CamelFolderInfo *folderinfo,
+em_folder_utils_create_folder (GtkWindow *parent,
EMFolderTree *emft,
- EMailSession *session,
- GtkWindow *parent)
+ EMailSession *session,
+ const gchar *initial_uri)
{
EMFolderTree *folder_tree;
GtkWidget *dialog;
@@ -788,9 +788,13 @@ em_folder_utils_create_folder (CamelFolderInfo *folderinfo,
parent, folder_tree, 0,
_("Create Folder"),
_("Specify where to create the folder:"));
- if (folderinfo != NULL)
- em_folder_selector_set_selected ((EMFolderSelector *) dialog, folderinfo->uri);
- g_signal_connect (dialog, "response", G_CALLBACK (emfu_popup_new_folder_response), emft ? emft : folder_tree);
+ if (initial_uri != NULL)
+ em_folder_selector_set_selected (
+ EM_FOLDER_SELECTOR (dialog), initial_uri);
+ g_signal_connect (
+ dialog, "response",
+ G_CALLBACK (emfu_popup_new_folder_response),
+ emft ? emft : folder_tree);
if (!parent || !GTK_IS_DIALOG (parent))
gtk_widget_show (dialog);
diff --git a/mail/em-folder-utils.h b/mail/em-folder-utils.h
index 54ccf5806e..8f7a2c70d3 100644
--- a/mail/em-folder-utils.h
+++ b/mail/em-folder-utils.h
@@ -46,10 +46,10 @@ void em_folder_utils_copy_folder (GtkWindow *parent,
gboolean delete);
void em_folder_utils_delete_folder (EMailBackend *backend,
CamelFolder *folder);
-void em_folder_utils_create_folder (CamelFolderInfo *folderinfo,
+void em_folder_utils_create_folder (GtkWindow *parent,
EMFolderTree *emft,
EMailSession *session,
- GtkWindow *parent);
+ const gchar *initial_uri);
const gchar * em_folder_utils_get_icon_name (guint32 flags);