diff options
author | Jason Leach <jleach@ximian.com> | 2001-07-21 05:15:57 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-07-21 05:15:57 +0800 |
commit | c49f665c56d01b67a3126150c4837ae96e903df8 (patch) | |
tree | 8b0f6aae1ac8645e248d68b796485fcd09063917 | |
parent | b34714d95b4a2fc304178c8dae642532b7eaf631 (diff) | |
download | gsoc2013-evolution-c49f665c56d01b67a3126150c4837ae96e903df8.tar gsoc2013-evolution-c49f665c56d01b67a3126150c4837ae96e903df8.tar.gz gsoc2013-evolution-c49f665c56d01b67a3126150c4837ae96e903df8.tar.bz2 gsoc2013-evolution-c49f665c56d01b67a3126150c4837ae96e903df8.tar.lz gsoc2013-evolution-c49f665c56d01b67a3126150c4837ae96e903df8.tar.xz gsoc2013-evolution-c49f665c56d01b67a3126150c4837ae96e903df8.tar.zst gsoc2013-evolution-c49f665c56d01b67a3126150c4837ae96e903df8.zip |
[This is a better way to have "Local Folders" be shown as the local
2001-07-20 Jason Leach <jleach@ximian.com>
[This is a better way to have "Local Folders" be shown as the
local storage name without breaking current user's shortcuts.]
* e-corba-storage.c (get_display_name): Implement this, but it's
only returning the real name now. Need to change the IDL soon to
let corba storages have separated display names.
* e-shortcuts.c (e_shortcuts_add_default_group): Set these default
shortcut URI's back to evolution:/local/
* e-shell-view.h (DEFAULT_URI): Set this back to
"evolution:/local/Inbox"
* e-storage-set-view.c (etree_value_at): Get the display name for
a storage rather than it's true name.
* e-local-storage.c (impl_get_display_name): Implemented for the
local folder (to return a translated "Local Folders").
* e-storage.c (e_storage_get_display_name): New virtual function
for retrieving the display name.
svn path=/trunk/; revision=11274
-rw-r--r-- | shell/ChangeLog | 24 | ||||
-rw-r--r-- | shell/e-corba-storage.c | 15 | ||||
-rw-r--r-- | shell/e-local-storage.c | 8 | ||||
-rw-r--r-- | shell/e-local-storage.h | 2 | ||||
-rw-r--r-- | shell/e-shell-view.h | 2 | ||||
-rw-r--r-- | shell/e-shortcuts.c | 8 | ||||
-rw-r--r-- | shell/e-storage-set-view.c | 8 | ||||
-rw-r--r-- | shell/e-storage.c | 16 | ||||
-rw-r--r-- | shell/e-storage.h | 2 |
9 files changed, 77 insertions, 8 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 690d3bb497..a908201d5d 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,27 @@ +2001-07-20 Jason Leach <jleach@ximian.com> + + [This is a better way to have "Local Folders" be shown as the + local storage name without breaking current user's shortcuts.] + + * e-corba-storage.c (get_display_name): Implement this, but it's + only returning the real name now. Need to change the IDL soon to + let corba storages have separated display names. + + * e-shortcuts.c (e_shortcuts_add_default_group): Set these default + shortcut URI's back to evolution:/local/ + + * e-shell-view.h (DEFAULT_URI): Set this back to + "evolution:/local/Inbox" + + * e-storage-set-view.c (etree_value_at): Get the display name for + a storage rather than it's true name. + + * e-local-storage.c (impl_get_display_name): Implemented for the + local folder (to return a translated "Local Folders"). + + * e-storage.c (e_storage_get_display_name): New virtual function + for retrieving the display name. + 2001-07-19 Jason Leach <jleach@ximian.com> * e-local-storage.h: Make the local storage name "Local Folders" diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c index d5faec2c72..b642848107 100644 --- a/shell/e-corba-storage.c +++ b/shell/e-corba-storage.c @@ -267,6 +267,20 @@ get_name (EStorage *storage) return priv->name; } +static const char * +get_display_name (EStorage *storage) +{ + ECorbaStorage *corba_storage; + ECorbaStoragePrivate *priv; + + corba_storage = E_CORBA_STORAGE (storage); + priv = corba_storage->priv; + + /* FIXME: Abstract a display_name, return it. Necessary + changes to the IDL and EvolutionStorage required. */ + return priv->name; +} + struct async_folder_closure { EStorageResultCallback callback; EStorage *storage; @@ -440,6 +454,7 @@ class_init (ECorbaStorageClass *klass) storage_class = E_STORAGE_CLASS (klass); storage_class->get_name = get_name; + storage_class->get_display_name = get_display_name; storage_class->async_create_folder = async_create_folder; storage_class->async_remove_folder = async_remove_folder; diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c index 854fb35700..6d83cfaaf6 100644 --- a/shell/e-local-storage.c +++ b/shell/e-local-storage.c @@ -47,6 +47,7 @@ #include <gtk/gtksignal.h> #include <libgnome/gnome-defs.h> +#include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> #include <gal/util/e-util.h> #include "e-util/e-path.h" @@ -546,6 +547,12 @@ impl_get_name (EStorage *storage) return E_LOCAL_STORAGE_NAME; } +static const char * +impl_get_display_name (EStorage *storage) +{ + return _("Local Folders"); +} + /* Creating folders. */ @@ -900,6 +907,7 @@ class_init (ELocalStorageClass *class) object_class->destroy = impl_destroy; storage_class->get_name = impl_get_name; + storage_class->get_display_name = impl_get_display_name; storage_class->async_create_folder = impl_async_create_folder; storage_class->async_remove_folder = impl_async_remove_folder; storage_class->async_xfer_folder = impl_async_xfer_folder; diff --git a/shell/e-local-storage.h b/shell/e-local-storage.h index 1593c09459..f844c34bb4 100644 --- a/shell/e-local-storage.h +++ b/shell/e-local-storage.h @@ -53,7 +53,7 @@ struct _ELocalStorageClass { }; -#define E_LOCAL_STORAGE_NAME "Local Folders" +#define E_LOCAL_STORAGE_NAME "local" GtkType e_local_storage_get_type (void); diff --git a/shell/e-shell-view.h b/shell/e-shell-view.h index 4e99554f69..86e5aa8498 100644 --- a/shell/e-shell-view.h +++ b/shell/e-shell-view.h @@ -46,7 +46,7 @@ typedef struct _EShellViewClass EShellViewClass; #include "e-shell.h" -#define DEFAULT_URI "evolution:/Local Folders/Inbox" +#define DEFAULT_URI "evolution:/local/Inbox" enum _EShellViewSubwindowMode { E_SHELL_VIEW_SUBWINDOW_HIDDEN, diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index 5f3c248fd5..7c8505ab79 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -981,10 +981,10 @@ e_shortcuts_add_default_group (EShortcuts *shortcuts) e_shortcuts_add_group (shortcuts, -1, _("Shortcuts")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/Local Folders/Inbox", _("Inbox"), "mail"); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/Local Folders/Calendar", _("Calendar"), "calendar"); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/Local Folders/Tasks", _("Tasks"), "tasks"); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/Local Folders/Contacts", _("Contacts"), "contacts"); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Inbox", _("Inbox"), "mail"); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Calendar", _("Calendar"), "calendar"); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Tasks", _("Tasks"), "tasks"); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "evolution:/local/Contacts", _("Contacts"), "contacts"); } void diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index ee67674b9b..dde7d23c93 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -1429,8 +1429,12 @@ etree_value_at (ETreeModel *etree, ETreePath tree_path, int col, void *model_dat } storage = e_storage_set_get_storage (storage_set, path + 1); - if (storage != NULL && col == 0) - return (void *) e_storage_get_name (storage); + if (storage != NULL) { + if (col == 0) + return (void *) e_storage_get_display_name (storage); + else + return TRUE; + } return _("My Evolution"); } diff --git a/shell/e-storage.c b/shell/e-storage.c index 0b2734252e..b6219605ab 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -178,6 +178,12 @@ impl_get_name (EStorage *storage) return _("(No name)"); } +static const char * +impl_get_display_name (EStorage *storage) +{ + return _("(No name)"); +} + static void impl_async_create_folder (EStorage *storage, const char *path, @@ -225,6 +231,7 @@ class_init (EStorageClass *class) class->get_subfolder_paths = impl_get_subfolder_paths; class->get_folder = impl_get_folder; class->get_name = impl_get_name; + class->get_display_name = impl_get_display_name; class->async_create_folder = impl_async_create_folder; class->async_remove_folder = impl_async_remove_folder; class->async_xfer_folder = impl_async_xfer_folder; @@ -356,6 +363,15 @@ e_storage_get_name (EStorage *storage) return (* ES_CLASS (storage)->get_name) (storage); } +const char * +e_storage_get_display_name (EStorage *storage) +{ + g_return_val_if_fail (storage != NULL, NULL); + g_return_val_if_fail (E_IS_STORAGE (storage), NULL); + + return (* ES_CLASS (storage)->get_display_name) (storage); +} + /** * e_storage_get_toplevel_node_uri: * @storage: A pointer to an EStorage object diff --git a/shell/e-storage.h b/shell/e-storage.h index 129212389e..91afa759f5 100644 --- a/shell/e-storage.h +++ b/shell/e-storage.h @@ -85,6 +85,7 @@ struct _EStorageClass { GList * (* get_subfolder_paths) (EStorage *storage, const char *path); EFolder * (* get_folder) (EStorage *storage, const char *path); const char * (* get_name) (EStorage *storage); + const char * (* get_display_name) (EStorage *storage); void (* async_create_folder) (EStorage *storage, const char *path, @@ -123,6 +124,7 @@ EFolder *e_storage_get_folder (EStorage *storage, const char *path); const char *e_storage_get_name (EStorage *storage); +const char *e_storage_get_display_name (EStorage *storage); const char *e_storage_get_toplevel_node_uri (EStorage *storage); const char *e_storage_get_toplevel_node_type (EStorage *storage); |