[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
This commit is contained in:
@ -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"
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user