aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-06-25 22:44:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-06-25 22:44:49 +0800
commitead0633d3ba2685b2311a26afc66aaa660666688 (patch)
tree7949c95315bde142058d105b463c24875aeffc3a /mail
parent8f5eaf4319d7bc34d3660fe8a6161142cd96e4e8 (diff)
downloadgsoc2013-evolution-ead0633d3ba2685b2311a26afc66aaa660666688.tar
gsoc2013-evolution-ead0633d3ba2685b2311a26afc66aaa660666688.tar.gz
gsoc2013-evolution-ead0633d3ba2685b2311a26afc66aaa660666688.tar.bz2
gsoc2013-evolution-ead0633d3ba2685b2311a26afc66aaa660666688.tar.lz
gsoc2013-evolution-ead0633d3ba2685b2311a26afc66aaa660666688.tar.xz
gsoc2013-evolution-ead0633d3ba2685b2311a26afc66aaa660666688.tar.zst
gsoc2013-evolution-ead0633d3ba2685b2311a26afc66aaa660666688.zip
Don't prepend the path string with a '/'.
2004-06-23 Jeffrey Stedfast <fejj@novell.com> * em-folder-selector.c (em_folder_selector_get_selected_path): Don't prepend the path string with a '/'. * em-folder-tree.c (em_folder_tree_create_folder): This takes a full_name so update the argument to make that clear. (emft_create_folder): Same and also don't strip a leading '/' svn path=/trunk/; revision=26513
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-folder-selector.c2
-rw-r--r--mail/em-folder-tree.c15
-rw-r--r--mail/em-folder-tree.h6
4 files changed, 20 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f3095b2333..31b684e385 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2004-06-23 Jeffrey Stedfast <fejj@novell.com>
+
+ * em-folder-selector.c (em_folder_selector_get_selected_path):
+ Don't prepend the path string with a '/'.
+
+ * em-folder-tree.c (em_folder_tree_create_folder): This takes a
+ full_name so update the argument to make that clear.
+ (emft_create_folder): Same and also don't strip a leading '/'
+
2004-06-25 Not Zed <NotZed@Ximian.com>
* em-folder-tree.c (folder_tree_new): set search column. #60152.
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 9f75db119d..d5aecd9667 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -419,7 +419,7 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
if (strcmp (path, "") != 0)
newpath = g_strdup_printf ("%s/%s", path, name);
else
- newpath = g_strdup_printf ("/%s", name);
+ newpath = g_strdup (name);
path = emfs->selected_path = newpath;
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 6ca06aa87a..eb1cf9bffe 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2050,7 +2050,7 @@ emft_popup_copy_folder_selected (const char *uri, void *data)
priv = cfd->emft->priv;
- printf ("%sing folder '%s' to '%s'\n", cfd->delete ? "move" : "copy", priv->selected_path, uri);
+ d(printf ("%sing folder '%s' to '%s'\n", cfd->delete ? "move" : "copy", priv->selected_path, uri));
camel_exception_init (&ex);
frombase = priv->selected_path;
@@ -2188,14 +2188,13 @@ static struct _mail_msg_op create_folder_op = {
static int
-emft_create_folder (CamelStore *store, const char *path, void (* done) (CamelFolderInfo *fi, void *user_data), void *user_data)
+emft_create_folder (CamelStore *store, const char *full_name, void (* done) (CamelFolderInfo *fi, void *user_data), void *user_data)
{
- const char *parent, *full_name;
char *name, *namebuf = NULL;
struct _EMCreateFolder *m;
+ const char *parent;
int id;
- full_name = path[0] == '/' ? path + 1 : path;
namebuf = g_strdup (full_name);
if (!(name = strrchr (namebuf, '/'))) {
name = namebuf;
@@ -2231,7 +2230,7 @@ created_cb (CamelFolderInfo *fi, void *user_data)
}
gboolean
-em_folder_tree_create_folder (EMFolderTree *emft, const char *path, const char *uri)
+em_folder_tree_create_folder (EMFolderTree *emft, const char *full_name, const char *uri)
{
struct _EMFolderTreePrivate *priv = emft->priv;
struct _EMFolderTreeModelStoreInfo *si;
@@ -2239,12 +2238,12 @@ em_folder_tree_create_folder (EMFolderTree *emft, const char *path, const char *
CamelStore *store;
CamelException ex;
- d(printf ("Creating folder: %s (%s)\n", path, uri));
+ d(printf ("Creating folder: %s (%s)\n", full_name, uri));
camel_exception_init (&ex);
if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) {
e_error_run((GtkWindow *)gtk_widget_get_toplevel((GtkWidget *)emft),
- "mail:no-create-folder-nostore", path, ex.desc, NULL);
+ "mail:no-create-folder-nostore", full_name, ex.desc, NULL);
goto fail;
}
@@ -2256,7 +2255,7 @@ em_folder_tree_create_folder (EMFolderTree *emft, const char *path, const char *
camel_object_unref (store);
- mail_msg_wait (emft_create_folder (si->store, path, created_cb, &created));
+ mail_msg_wait (emft_create_folder (si->store, full_name, created_cb, &created));
fail:
camel_exception_clear(&ex);
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index b8f5ea2c59..9b97ec0e9b 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -61,8 +61,8 @@ struct _EMFolderTreeClass {
GtkVBoxClass parent_class;
/* signals */
- void (* folder_activated) (EMFolderTree *emft, const char *path, const char *uri);
- void (* folder_selected) (EMFolderTree *emft, const char *path, const char *uri, guint32 flags);
+ void (* folder_activated) (EMFolderTree *emft, const char *full_name, const char *uri);
+ void (* folder_selected) (EMFolderTree *emft, const char *full_name, const char *uri, guint32 flags);
};
GType em_folder_tree_get_type (void);
@@ -85,7 +85,7 @@ const char *em_folder_tree_get_selected_path (EMFolderTree *emft);
EMFolderTreeModel *em_folder_tree_get_model (EMFolderTree *emft);
-gboolean em_folder_tree_create_folder (EMFolderTree *emft, const char *path, const char *uri);
+gboolean em_folder_tree_create_folder (EMFolderTree *emft, const char *full_name, const char *uri);
#ifdef __cplusplus
}