aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-03-07 07:36:27 +0800
committerDan Winship <danw@src.gnome.org>2002-03-07 07:36:27 +0800
commit3bc843ceb5bd66288077a4f8db1b6cdb7123f298 (patch)
tree817b2e6a36eb70827ed8e7941fd582d9bfd2cbfc /shell/e-storage.c
parenta3dfdc714c2d3b4663c1d7f2b07daf6e8a8940dc (diff)
downloadgsoc2013-evolution-3bc843ceb5bd66288077a4f8db1b6cdb7123f298.tar.gz
gsoc2013-evolution-3bc843ceb5bd66288077a4f8db1b6cdb7123f298.tar.zst
gsoc2013-evolution-3bc843ceb5bd66288077a4f8db1b6cdb7123f298.zip
Keep the storage name and display_name in EStoragePriv. (impl_get_name,
* e-storage.c: Keep the storage name and display_name in EStoragePriv. (impl_get_name, impl_get_display_name): Return them. (e_storage_construct): Set them here. (e_storage_new): And here. * e-local-storage.c: (impl_get_name, impl_get_display_name): Removed. (construct): Pass E_LOCAL_STORAGE_NAME and U_("Local Folders") to e_storage_construct. * e-corba-storage.c: Remove priv->name. (get_name, get_display_name): Removed. (e_corba_storage_construct): Pass name to e_storage_construct(). * e-summary-storage.[ch]: Gone. This didn't override anything in EStorage but get_name/get_display_name, and the defaults for those DTRT now. * e-shell-constants.h: Move E_SUMMARY_STORAGE_NAME here from e-summary-storage.h, and move E_LOCAL_STORAGE_NAME too for consistency. * e-storage-set-view.c: Fix up #includes. * e-shell-importer.c: Likewise * e-shell.c: Likewise. Create summary_storage as a plain EStorage since ESummaryStorage is gone now. * Makefile.am (evolution_SOURCES): Remove e-summary-storage.[ch] svn path=/trunk/; revision=15955
Diffstat (limited to 'shell/e-storage.c')
-rw-r--r--shell/e-storage.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/shell/e-storage.c b/shell/e-storage.c
index f49cddcf39..7b55145d6e 100644
--- a/shell/e-storage.c
+++ b/shell/e-storage.c
@@ -50,6 +50,12 @@ struct _EStoragePrivate {
/* The set of folders we have in this storage. */
EFolderTree *folder_tree;
+ /* Internal name of the storage */
+ char *name;
+
+ /* User-visible localized UTF-8 name */
+ char *display_name;
+
/* URI for the toplevel node. */
char *toplevel_node_uri;
@@ -141,6 +147,8 @@ destroy (GtkObject *object)
if (priv->folder_tree != NULL)
e_folder_tree_destroy (priv->folder_tree);
+ g_free (priv->name);
+ g_free (priv->display_name);
g_free (priv->toplevel_node_uri);
g_free (priv->toplevel_node_type);
@@ -178,13 +186,13 @@ impl_get_folder (EStorage *storage,
static const char *
impl_get_name (EStorage *storage)
{
- return _("(No name)");
+ return storage->priv->name;
}
static const char *
impl_get_display_name (EStorage *storage)
{
- return _("(No name)");
+ return storage->priv->display_name;
}
static void
@@ -286,6 +294,8 @@ init (EStorage *storage)
void
e_storage_construct (EStorage *storage,
+ const char *name,
+ const char *display_name,
const char *toplevel_node_uri,
const char *toplevel_node_type)
{
@@ -296,6 +306,8 @@ e_storage_construct (EStorage *storage,
priv = storage->priv;
+ priv->name = g_strdup (name);
+ priv->display_name = g_strdup (display_name);
priv->toplevel_node_uri = g_strdup (toplevel_node_uri);
priv->toplevel_node_type = g_strdup (toplevel_node_type);
@@ -303,14 +315,17 @@ e_storage_construct (EStorage *storage,
}
EStorage *
-e_storage_new (const char *toplevel_node_uri,
+e_storage_new (const char *name,
+ const char *display_name,
+ const char *toplevel_node_uri,
const char *toplevel_node_type)
{
EStorage *new;
new = gtk_type_new (e_storage_get_type ());
- e_storage_construct (new, toplevel_node_uri, toplevel_node_type);
+ e_storage_construct (new, name, display_name,
+ toplevel_node_uri, toplevel_node_type);
return new;
}