diff options
author | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-08-03 23:37:35 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 1999-08-03 23:37:35 +0800 |
commit | b9daf0016bc3d7244ced57dd88f63c1fd6debbac (patch) | |
tree | e18a41319d59b4243960952410456a97948748d3 /camel/providers/MH/camel-mh-folder.c | |
parent | 382308f44a4ab93659f9f54c8dac2c2cc381a471 (diff) | |
download | gsoc2013-evolution-b9daf0016bc3d7244ced57dd88f63c1fd6debbac.tar gsoc2013-evolution-b9daf0016bc3d7244ced57dd88f63c1fd6debbac.tar.gz gsoc2013-evolution-b9daf0016bc3d7244ced57dd88f63c1fd6debbac.tar.bz2 gsoc2013-evolution-b9daf0016bc3d7244ced57dd88f63c1fd6debbac.tar.lz gsoc2013-evolution-b9daf0016bc3d7244ced57dd88f63c1fd6debbac.tar.xz gsoc2013-evolution-b9daf0016bc3d7244ced57dd88f63c1fd6debbac.tar.zst gsoc2013-evolution-b9daf0016bc3d7244ced57dd88f63c1fd6debbac.zip |
new public functions (_set_name): set full_path.
* camel/camel-folder.c (camel_folder_set_name):
(camel_folder_get_name):
new public functions
(_set_name): set full_path.
(_set_full_name):
(camel_folder_set_full_name):
commented out this functions def.
It would make things very difficult to handle, and would not
be very useful.
* camel/providers/MH/camel-mh-store.h:
* camel/providers/MH/camel-mh-store.c (camel_mh_store_set_toplevel_dir):
(camel_mh_store_get_toplevel_dir):
* camel/providers/MH/camel-mh-folder.c (_set_name):
* camel/providers/MH/camel-mh-folder.h:
use (gchar *) instead of (GString *) everywhere.
use const when necessary.
* camel/camel-folder.h (struct _CamelFolder):
removed unused message_list field.
svn path=/trunk/; revision=1072
Diffstat (limited to 'camel/providers/MH/camel-mh-folder.c')
-rw-r--r-- | camel/providers/MH/camel-mh-folder.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/camel/providers/MH/camel-mh-folder.c b/camel/providers/MH/camel-mh-folder.c index e4fe3c5bd2..2db3a74e8e 100644 --- a/camel/providers/MH/camel-mh-folder.c +++ b/camel/providers/MH/camel-mh-folder.c @@ -33,7 +33,7 @@ static CamelFolderClass *parent_class=NULL; #define CF_CLASS(so) CAMEL_FOLDER_CLASS (GTK_OBJECT(so)->klass) #define CMHS_CLASS(so) CAMEL_STORE_CLASS (GTK_OBJECT(so)->klass) -static void camel_mh_folder_set_name(CamelFolder *folder, GString *name); +static void _set_name(CamelFolder *folder, const gchar *name); static void @@ -43,7 +43,7 @@ camel_mh_folder_class_init (CamelMhFolderClass *camel_mh_folder_class) /* virtual method definition */ /* virtual method overload */ - CAMEL_FOLDER_CLASS(camel_mh_folder_class)->set_name = camel_mh_folder_set_name; + CAMEL_FOLDER_CLASS(camel_mh_folder_class)->set_name = _set_name; } @@ -86,10 +86,11 @@ camel_mh_folder_get_type (void) * **/ static void -camel_mh_folder_set_name(CamelFolder *folder, GString *name) +_set_name (CamelFolder *folder, const gchar *name) { - GString *root_dir_path; - GString *full_dir_path; + const gchar *root_dir_path; + gchar *full_name; + const gchar *parent_full_name; CamelMhFolder *mh_folder = CAMEL_MH_FOLDER(folder); gchar separator; @@ -100,16 +101,12 @@ camel_mh_folder_set_name(CamelFolder *folder, GString *name) /* call default implementation */ parent_class->set_name (folder, name); - if (mh_folder->directory_path) g_string_free (mh_folder->directory_path, 0); + if (mh_folder->directory_path) g_free (mh_folder->directory_path); separator = camel_store_get_separator (folder->parent_store); - - root_dir_path = camel_mh_store_get_toplevel_dir (CAMEL_MH_STORE(folder->parent_store)); - full_dir_path = g_string_clone(root_dir_path); - g_string_append_c(full_dir_path, separator); - g_string_append_g_string(full_dir_path, name); - mh_folder->directory_path = full_dir_path; + mh_folder->directory_path = g_strdup_printf ("%s%c%s", root_dir_path, separator, folder->full_name); } + |