aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog33
-rw-r--r--shell/Evolution-ShellComponent.idl16
-rw-r--r--shell/Evolution-common.idl9
-rw-r--r--shell/e-activity-handler.c2
-rw-r--r--shell/e-component-registry.c18
-rw-r--r--shell/e-corba-storage.c10
-rw-r--r--shell/e-local-storage.c1
-rw-r--r--shell/e-shell-importer.c1
-rw-r--r--shell/e-shell-startup-wizard.c7
-rw-r--r--shell/e-shell-startup-wizard.h2
-rw-r--r--shell/e-shell-user-creatable-items-handler.c4
-rw-r--r--shell/e-shell-view.c28
-rw-r--r--shell/e-shortcuts-view-model.c2
-rw-r--r--shell/evolution-activity-client.c10
-rw-r--r--shell/evolution-shell-component.c52
-rw-r--r--shell/evolution-storage.c18
16 files changed, 136 insertions, 77 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 145ea87c46..2b6ebf53f0 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,36 @@
+2001-08-27 Ettore Perazzoli <ettore@ximian.com>
+
+ * Evolution-ShellComponent.idl: Studlycapsize all the IDs that are
+ not.
+ * Evolution-common.idl: Likewise.
+ * evolution-activity-client.c: Updated accordingly.
+ * evolution-shell-component.c: Likewise.
+ * evolution-storage.c: Likewise.
+ * e-activity-handler.c: Likewise.
+ * e-component-registry.c: Likewise.
+ * e-corba-storage.c: Likewise.
+ * e-shell-user-creatable-items-handlers.c: Likewise.
+
+ * e-local-storage.c (remove_folder): Remove unused variable.
+
+ * e-shell-view.c (update_for_current_uri): Assign zero to
+ `unread_count', not NULL.
+
+ * e-shell-importer.c (import_druid_finish): Remove unused
+ variable.
+
+ * e-shell-user-creatable-items-handler.c: #include
+ "e-corba-utils.h".
+
+ * e-shell-startup-wizard.c: #include "e-shell-startup-wizard.h".
+
+ * e-shell-startup-wizard.h: #include <glib.h>
+
+2001-08-24 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-shell-view.c (update_for_current_uri): Also display the unread
+ count in the title bar.
+
2001-08-24 Ettore Perazzoli <ettore@ximian.com>
* e-setup.c (copy_default_stuff): Remove the stupid "do you want
diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl
index c061e7241b..a5601f29ab 100644
--- a/shell/Evolution-ShellComponent.idl
+++ b/shell/Evolution-ShellComponent.idl
@@ -16,15 +16,15 @@ module Evolution {
struct FolderType {
string name;
- string icon_name;
+ string iconName;
- string display_name;
+ string displayName;
string description;
- boolean user_creatable;
+ boolean userCreatable;
- sequence<string> accepted_dnd_types;
- sequence<string> exported_dnd_types;
+ sequence<string> acceptedDndTypes;
+ sequence<string> exportedDndTypes;
};
typedef sequence<FolderType> FolderTypeList;
@@ -42,9 +42,9 @@ module Evolution {
interface ShellComponentListener;
interface ShellComponent : Bonobo::Unknown {
- readonly attribute FolderTypeList supported_types;
- readonly attribute URISchemaList external_uri_schemas;
- readonly attribute UserCreatableItemTypeList user_creatable_item_types;
+ readonly attribute FolderTypeList supportedTypes;
+ readonly attribute URISchemaList externalUriSchemas ;
+ readonly attribute UserCreatableItemTypeList userCreatableItemTypes;
/* FIXME: Can we use an attribute here? */
exception AlreadyOwned {};
diff --git a/shell/Evolution-common.idl b/shell/Evolution-common.idl
index 25f824f612..86cd774852 100644
--- a/shell/Evolution-common.idl
+++ b/shell/Evolution-common.idl
@@ -14,16 +14,17 @@ module Evolution {
struct Folder {
string type;
string description;
- string display_name;
- string physical_uri;
- long unread_count;
+ string displayName;
+ string physicalUri;
+ long unreadCount;
};
struct Icon {
short width, height;
boolean hasAlpha;
- sequence <octet> rgba_data; // Row-by-row, left-to-right, top-to-bottom RGBA bytes
+ sequence <octet> rgbaData; // Row-by-row, left-to-right, top-to-bottom RGBA bytes
};
+
typedef sequence <Icon> AnimatedIcon;
};
diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c
index 47e0c88728..8624f4f077 100644
--- a/shell/e-activity-handler.c
+++ b/shell/e-activity-handler.c
@@ -87,7 +87,7 @@ create_gdk_pixbuf_from_corba_icon (const GNOME_Evolution_Icon *icon)
for (i = 0; i < icon->height; i++) {
for (j = 0; j < total_width; j++)
- p[j] = icon->rgba_data._buffer[src_offset ++];
+ p[j] = icon->rgbaData._buffer[src_offset ++];
p += rowstride;
}
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c
index acbed694f5..9ca257d788 100644
--- a/shell/e-component-registry.c
+++ b/shell/e-component-registry.c
@@ -174,7 +174,7 @@ register_component (EComponentRegistry *component_registry,
/* Register the supported folder types. */
- supported_types = GNOME_Evolution_ShellComponent__get_supported_types (component_corba_interface, &ev);
+ supported_types = GNOME_Evolution_ShellComponent__get_supportedTypes (component_corba_interface, &ev);
if (ev._major != CORBA_NO_EXCEPTION || supported_types->_length == 0) {
bonobo_object_unref (BONOBO_OBJECT (client));
CORBA_exception_free (&ev);
@@ -193,13 +193,13 @@ register_component (EComponentRegistry *component_registry,
type = supported_types->_buffer + i;
if (! register_type (component_registry,
- type->name, type->icon_name,
- type->display_name, type->description,
- type->user_creatable,
- type->exported_dnd_types._length,
- (const char **) type->exported_dnd_types._buffer,
- type->accepted_dnd_types._length,
- (const char **) type->accepted_dnd_types._buffer,
+ type->name, type->iconName,
+ type->displayName, type->description,
+ type->userCreatable,
+ type->exportedDndTypes._length,
+ (const char **) type->exportedDndTypes._buffer,
+ type->acceptedDndTypes._length,
+ (const char **) type->acceptedDndTypes._buffer,
component)) {
g_warning ("Cannot register type `%s' for component %s",
type->name, component->id);
@@ -213,7 +213,7 @@ register_component (EComponentRegistry *component_registry,
/* Register the supported external URI schemas. */
- supported_schemas = GNOME_Evolution_ShellComponent__get_external_uri_schemas (component_corba_interface, &ev);
+ supported_schemas = GNOME_Evolution_ShellComponent__get_externalUriSchemas (component_corba_interface, &ev);
if (ev._major == CORBA_NO_EXCEPTION) {
EUriSchemaRegistry *uri_schema_registry;
diff --git a/shell/e-corba-storage.c b/shell/e-corba-storage.c
index 394a06cf3a..9f1d936aee 100644
--- a/shell/e-corba-storage.c
+++ b/shell/e-corba-storage.c
@@ -105,15 +105,15 @@ impl_StorageListener_notifyFolderCreated (PortableServer_Servant servant,
storage_listener_servant = (StorageListenerServant *) servant;
storage = storage_listener_servant->storage;
- e_folder = e_folder_new (folder->display_name,
+ e_folder = e_folder_new (folder->displayName,
folder->type,
folder->description);
- e_folder_set_physical_uri (e_folder, folder->physical_uri);
- e_folder_set_unread_count (e_folder, folder->unread_count);
+ e_folder_set_physical_uri (e_folder, folder->physicalUri);
+ e_folder_set_unread_count (e_folder, folder->unreadCount);
if (! e_storage_new_folder (storage, path, e_folder)) {
- g_print ("Cannot register folder -- %s %s\n", path, folder->display_name);
+ g_print ("Cannot register folder -- %s %s\n", path, folder->displayName);
CORBA_exception_set (ev,
CORBA_USER_EXCEPTION,
ex_GNOME_Evolution_StorageListener_Exists,
@@ -122,7 +122,7 @@ impl_StorageListener_notifyFolderCreated (PortableServer_Servant servant,
return;
}
- g_print ("Folder registered successfully -- %s %s\n", path, folder->display_name);
+ g_print ("Folder registered successfully -- %s %s\n", path, folder->displayName);
}
static void
diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c
index 8dcdff9342..275b9be88e 100644
--- a/shell/e-local-storage.c
+++ b/shell/e-local-storage.c
@@ -502,7 +502,6 @@ remove_folder (ELocalStorage *local_storage,
EStorage *storage;
AsyncRemoveFolderCallbackData *callback_data;
EvolutionShellComponentClient *component_client;
- EStorageResult result;
EFolder *folder;
char *physical_path;
GList *subfolder_paths;
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index 8ba73c433c..ff0600ab98 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -612,7 +612,6 @@ import_druid_finish (GnomeDruidPage *page,
ImportData *data)
{
GtkWidget *folder;
- const char *foldername;
char *filename;
char *iid;
diff --git a/shell/e-shell-startup-wizard.c b/shell/e-shell-startup-wizard.c
index 003242d546..6779a12c54 100644
--- a/shell/e-shell-startup-wizard.c
+++ b/shell/e-shell-startup-wizard.c
@@ -25,6 +25,8 @@
#include <config.h>
#endif
+#include "e-shell-startup-wizard.h"
+
#include <errno.h>
#include <glib.h>
@@ -39,9 +41,14 @@
#include <bonobo/bonobo-moniker-util.h>
#include <bonobo-conf/bonobo-config-database.h>
+#include <gal/widgets/e-gui-utils.h>
+
#include <widgets/e-timezone-dialog/e-timezone-dialog.h>
+
#include "importer/GNOME_Evolution_Importer.h"
+#include "e-timezone-dialog/e-timezone-dialog.h"
+
#include <evolution-wizard.h>
#include "Evolution.h"
diff --git a/shell/e-shell-startup-wizard.h b/shell/e-shell-startup-wizard.h
index 8a4b273380..38f427cf2e 100644
--- a/shell/e-shell-startup-wizard.h
+++ b/shell/e-shell-startup-wizard.h
@@ -24,6 +24,8 @@
#ifndef E_SHELL_STARTUP_WIZARD_H
#define E_SHELL_STARTUP_WIZARD_H
+#include <glib.h>
+
gboolean e_shell_startup_wizard_create (void);
#endif
diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c
index faa5b5cc9f..def1552fcc 100644
--- a/shell/e-shell-user-creatable-items-handler.c
+++ b/shell/e-shell-user-creatable-items-handler.c
@@ -27,6 +27,8 @@
#include "e-shell-user-creatable-items-handler.h"
+#include "e-util/e-corba-utils.h"
+
#include <gal/util/e-util.h>
#include <bonobo/bonobo-ui-util.h>
@@ -73,7 +75,7 @@ component_new_from_client (EvolutionShellComponentClient *client)
CORBA_exception_init (&ev);
objref = bonobo_object_corba_objref (BONOBO_OBJECT (client));
- new->type_list = GNOME_Evolution_ShellComponent__get_user_creatable_item_types (objref, &ev);
+ new->type_list = GNOME_Evolution_ShellComponent__get_userCreatableItemTypes (objref, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
new->type_list = NULL;
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 5f89f6a9a3..9048c3a147 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -72,6 +72,7 @@ static BonoboWindowClass *parent_class = NULL;
struct _View {
char *uri;
GtkWidget *control;
+ EFolder *folder;
};
typedef struct _View View;
@@ -1446,10 +1447,12 @@ update_for_current_uri (EShellView *shell_view)
EShellViewPrivate *priv;
EFolder *folder;
const char *path;
- const char *title;
const char *type;
+ const char *folder_name;
+ char *title;
char *utf8_window_title;
char *gtk_window_title;
+ int unread_count;
priv = shell_view->priv;
@@ -1462,8 +1465,9 @@ update_for_current_uri (EShellView *shell_view)
path = get_storage_set_path_from_uri (priv->uri);
- title = NULL;
+ folder_name = NULL;
type = NULL;
+ unread_count = 0;
if (path == NULL) {
folder = NULL;
@@ -1471,19 +1475,29 @@ update_for_current_uri (EShellView *shell_view)
folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), path);
if (folder != NULL) {
- title = e_folder_get_name (folder);
+ folder_name = e_folder_get_name (folder);
type = e_folder_get_type_string (folder);
+ unread_count = e_folder_get_unread_count (folder);
} else if (path != NULL) {
EStorage *storage;
storage = e_storage_set_get_storage (e_shell_get_storage_set (priv->shell), path + 1);
+ unread_count = 0;
+
if (storage != NULL) {
- title = e_storage_get_display_name (storage);
+ folder_name = e_storage_get_display_name (storage);
type = e_storage_get_toplevel_node_type (storage);
}
}
}
+ if (unread_count > 0)
+ title = g_strdup_printf (_("%s (%d)"), folder_name, unread_count);
+ else if (folder_name == NULL)
+ title = g_strdup (_("(None)"));
+ else
+ title = g_strdup (folder_name);
+
if (SUB_VERSION[0] == '\0')
utf8_window_title = g_strdup_printf (_("%s - Evolution %s"), title, VERSION);
else
@@ -1491,12 +1505,14 @@ update_for_current_uri (EShellView *shell_view)
gtk_window_title = e_utf8_to_gtk_string (GTK_WIDGET (shell_view), utf8_window_title);
gtk_window_set_title (GTK_WINDOW (shell_view), gtk_window_title);
- g_free (gtk_window_title);
- g_free (utf8_window_title);
update_folder_title_bar (shell_view, title, type);
update_window_icon (shell_view, type);
+ g_free (gtk_window_title);
+ g_free (utf8_window_title);
+ g_free (title);
+
gtk_signal_handler_block_by_func (GTK_OBJECT (priv->storage_set_view),
GTK_SIGNAL_FUNC (folder_selected_cb),
shell_view);
diff --git a/shell/e-shortcuts-view-model.c b/shell/e-shortcuts-view-model.c
index bc672a7c0f..fcacdfdd9a 100644
--- a/shell/e-shortcuts-view-model.c
+++ b/shell/e-shortcuts-view-model.c
@@ -289,7 +289,7 @@ init (EShortcutsViewModel *shortcuts_view_model)
EShortcutsViewModelPrivate *priv;
priv = g_new (EShortcutsViewModelPrivate, 1);
- priv->shortcuts = NULL;
+ priv->shortcuts = NULL;
shortcuts_view_model->priv = priv;
}
diff --git a/shell/evolution-activity-client.c b/shell/evolution-activity-client.c
index 22315a37b8..c6ab154ed4 100644
--- a/shell/evolution-activity-client.c
+++ b/shell/evolution-activity-client.c
@@ -104,19 +104,19 @@ create_icon_from_pixbuf (GdkPixbuf *pixbuf,
icon_return->height = height;
icon_return->hasAlpha = has_alpha;
- icon_return->rgba_data._length = icon_return->height * total_width;
- icon_return->rgba_data._maximum = icon_return->rgba_data._length;
- icon_return->rgba_data._buffer = CORBA_sequence_CORBA_octet_allocbuf (icon_return->rgba_data._maximum);
+ icon_return->rgbaData._length = icon_return->height * total_width;
+ icon_return->rgbaData._maximum = icon_return->rgbaData._length;
+ icon_return->rgbaData._buffer = CORBA_sequence_CORBA_octet_allocbuf (icon_return->rgbaData._maximum);
sp = gdk_pixbuf_get_pixels (pixbuf);
- dp = icon_return->rgba_data._buffer;
+ dp = icon_return->rgbaData._buffer;
for (i = 0; i < height; i ++) {
for (j = 0; j < total_width; j++)
*(dp ++) = sp[j];
sp += rowstride;
}
- CORBA_sequence_set_release (& icon_return->rgba_data, TRUE);
+ CORBA_sequence_set_release (& icon_return->rgbaData, TRUE);
}
/* Generate an AnimatedIcon from a NULL-terminated @pixbuf_array. */
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c
index 5e586a2c08..341091dd29 100644
--- a/shell/evolution-shell-component.c
+++ b/shell/evolution-shell-component.c
@@ -169,8 +169,8 @@ fill_corba_sequence_from_null_terminated_string_array (CORBA_sequence_CORBA_stri
/* CORBA interface implementation. */
static GNOME_Evolution_FolderTypeList *
-impl__get_supported_types (PortableServer_Servant servant,
- CORBA_Environment *ev)
+impl__get_supportedTypes (PortableServer_Servant servant,
+ CORBA_Environment *ev)
{
BonoboObject *bonobo_object;
EvolutionShellComponent *shell_component;
@@ -196,15 +196,15 @@ impl__get_supported_types (PortableServer_Servant servant,
folder_type = (EvolutionShellComponentFolderType *) p->data;
corba_folder_type = folder_type_list->_buffer + i;
- corba_folder_type->name = CORBA_string_dup (folder_type->name);
- corba_folder_type->icon_name = CORBA_string_dup (folder_type->icon_name);
- corba_folder_type->display_name = CORBA_string_dup (folder_type->display_name);
- corba_folder_type->description = CORBA_string_dup (folder_type->description);
- corba_folder_type->user_creatable = folder_type->user_creatable;
+ corba_folder_type->name = CORBA_string_dup (folder_type->name);
+ corba_folder_type->iconName = CORBA_string_dup (folder_type->icon_name);
+ corba_folder_type->displayName = CORBA_string_dup (folder_type->display_name);
+ corba_folder_type->description = CORBA_string_dup (folder_type->description);
+ corba_folder_type->userCreatable = folder_type->user_creatable;
- fill_corba_sequence_from_null_terminated_string_array (& corba_folder_type->accepted_dnd_types,
+ fill_corba_sequence_from_null_terminated_string_array (& corba_folder_type->acceptedDndTypes,
folder_type->accepted_dnd_types);
- fill_corba_sequence_from_null_terminated_string_array (& corba_folder_type->exported_dnd_types,
+ fill_corba_sequence_from_null_terminated_string_array (& corba_folder_type->exportedDndTypes,
folder_type->exported_dnd_types);
}
@@ -214,8 +214,8 @@ impl__get_supported_types (PortableServer_Servant servant,
}
static GNOME_Evolution_URISchemaList *
-impl__get_external_uri_schemas (PortableServer_Servant servant,
- CORBA_Environment *ev)
+impl__get_externalUriSchemas (PortableServer_Servant servant,
+ CORBA_Environment *ev)
{
EvolutionShellComponent *shell_component;
EvolutionShellComponentPrivate *priv;
@@ -254,8 +254,8 @@ impl__get_external_uri_schemas (PortableServer_Servant servant,
}
static GNOME_Evolution_UserCreatableItemTypeList *
-impl__get_user_creatable_item_types (PortableServer_Servant servant,
- CORBA_Environment *ev)
+impl__get_userCreatableItemTypes (PortableServer_Servant servant,
+ CORBA_Environment *ev)
{
EvolutionShellComponent *shell_component;
EvolutionShellComponentPrivate *priv;
@@ -658,19 +658,19 @@ class_init (EvolutionShellComponentClass *klass)
parent_class = gtk_type_class (PARENT_TYPE);
- epv->_get_supported_types = impl__get_supported_types;
- epv->_get_external_uri_schemas = impl__get_external_uri_schemas;
- epv->_get_user_creatable_item_types = impl__get_user_creatable_item_types;
- epv->setOwner = impl_setOwner;
- epv->unsetOwner = impl_unsetOwner;
- epv->debug = impl_debug;
- epv->createView = impl_createView;
- epv->handleExternalURI = impl_handleExternalURI;
- epv->createFolderAsync = impl_createFolderAsync;
- epv->removeFolderAsync = impl_removeFolderAsync;
- epv->xferFolderAsync = impl_xferFolderAsync;
- epv->populateFolderContextMenu = impl_populateFolderContextMenu;
- epv->userCreateNewItem = impl_userCreateNewItem;
+ epv->_get_supportedTypes = impl__get_supportedTypes;
+ epv->_get_externalUriSchemas = impl__get_externalUriSchemas;
+ epv->_get_userCreatableItemTypes = impl__get_userCreatableItemTypes;
+ epv->setOwner = impl_setOwner;
+ epv->unsetOwner = impl_unsetOwner;
+ epv->debug = impl_debug;
+ epv->createView = impl_createView;
+ epv->handleExternalURI = impl_handleExternalURI;
+ epv->createFolderAsync = impl_createFolderAsync;
+ epv->removeFolderAsync = impl_removeFolderAsync;
+ epv->xferFolderAsync = impl_xferFolderAsync;
+ epv->populateFolderContextMenu = impl_populateFolderContextMenu;
+ epv->userCreateNewItem = impl_userCreateNewItem;
}
static void
diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c
index 55ca4c3b7d..da76c619ee 100644
--- a/shell/evolution-storage.c
+++ b/shell/evolution-storage.c
@@ -822,11 +822,11 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage,
CORBA_exception_init (&ev);
corba_folder = GNOME_Evolution_Folder__alloc ();
- corba_folder->display_name = CORBA_string_dup (display_name);
- corba_folder->description = CORBA_string_dup (description);
- corba_folder->type = CORBA_string_dup (type);
- corba_folder->physical_uri = CORBA_string_dup (physical_uri);
- corba_folder->unread_count = unread_count;
+ corba_folder->displayName = CORBA_string_dup (display_name);
+ corba_folder->description = CORBA_string_dup (description);
+ corba_folder->type = CORBA_string_dup (type);
+ corba_folder->physicalUri = CORBA_string_dup (physical_uri);
+ corba_folder->unreadCount = unread_count;
if (! e_folder_tree_add (priv->folder_tree, path, corba_folder)) {
CORBA_free (corba_folder);
@@ -915,9 +915,9 @@ evolution_storage_update_folder (EvolutionStorage *evolution_storage,
if (result == EVOLUTION_STORAGE_OK) {
corba_folder = e_folder_tree_get_folder (priv->folder_tree, path);
if (corba_folder != NULL) {
- CORBA_free (corba_folder->display_name);
- corba_folder->display_name = CORBA_string_dup (display_name);
- corba_folder->unread_count = unread_count;
+ CORBA_free (corba_folder->displayName);
+ corba_folder->displayName = CORBA_string_dup (display_name);
+ corba_folder->unreadCount = unread_count;
} else
result = EVOLUTION_STORAGE_ERROR_NOTFOUND;
}
@@ -972,7 +972,7 @@ evolution_storage_removed_folder (EvolutionStorage *evolution_storage,
corba_folder = e_folder_tree_get_folder (priv->folder_tree, path);
if (corba_folder == NULL)
return EVOLUTION_STORAGE_ERROR_NOTFOUND;
- if (g_hash_table_lookup_extended (priv->uri_to_path, corba_folder->physical_uri, &key, &value)) {
+ if (g_hash_table_lookup_extended (priv->uri_to_path, corba_folder->physicalUri, &key, &value)) {
g_hash_table_remove (priv->uri_to_path, key);
g_free (key);
g_free (value);