aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-07-10 04:27:17 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-07-10 04:27:17 +0800
commit6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d (patch)
treeebf375b1a6a93278f0a70b74b3545061d6f34074 /shell
parentdbb4e600dede6660bd4f130a7f21b781146319b7 (diff)
downloadgsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.tar
gsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.tar.gz
gsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.tar.bz2
gsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.tar.lz
gsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.tar.xz
gsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.tar.zst
gsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.zip
Pass NULL @custom_icon_name to evolution_storage_new_folder().
* gui/component/addressbook-storage.c (load_source_data): Pass NULL @custom_icon_name to evolution_storage_new_folder(). (addressbook_storage_add_source): Likewise. [Note we could be passing a nice custom here. ;-)] * subscribe-dialog.c (recursive_add_folder): Pass NULL for @custom_icon_name to evolution_storage_new_folder(). * mail-folder-cache.c (real_flush_updates): Pass NULL for @custom_icon_name to evolution_storage_new_folder(). * evolution-test-component.c (setup_custom_storage): Pass NULL for @custom_icon_name to evolution_storage_new_folder(). * e-local-storage.c (new_folder): Pass the custom_icon_name here to evolution_storage_new_folder(). * evolution-shell-client.c (impl_FolderSelectionListener_selected): Set customIconName here too. * e-folder.c (e_folder_to_corba): Set customIconName too. * e-corba-storage-registry.c (impl_StorageRegistry_getFolderByUri): Set customIconName. Also, use e_safe_corba_string() to clean up the code a bit. * evolution-storage.c (evolution_storage_new_folder): New arg @custom_icon_name. * Evolution-common.idl: New member customIconName in struct Folder. svn path=/trunk/; revision=17397
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog24
-rw-r--r--shell/Evolution-common.idl1
-rw-r--r--shell/e-corba-storage-registry.c21
-rw-r--r--shell/e-folder.c1
-rw-r--r--shell/e-local-storage.c1
-rw-r--r--shell/evolution-shell-client.c16
-rw-r--r--shell/evolution-storage.c6
-rw-r--r--shell/evolution-storage.h1
-rw-r--r--shell/evolution-test-component.c4
9 files changed, 55 insertions, 20 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index bf0aa953f9..ea7b1229bd 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,29 @@
2002-07-09 Ettore Perazzoli <ettore@ximian.com>
+ * evolution-test-component.c (setup_custom_storage): Pass NULL for
+ @custom_icon_name to evolution_storage_new_folder().
+
+ * e-local-storage.c (new_folder): Pass the custom_icon_name here
+ to evolution_storage_new_folder().
+
+ * evolution-shell-client.c
+ (impl_FolderSelectionListener_selected): Set customIconName here
+ too.
+
+ * e-folder.c (e_folder_to_corba): Set customIconName too.
+
+ * e-corba-storage-registry.c
+ (impl_StorageRegistry_getFolderByUri): Set customIconName. Also,
+ use e_safe_corba_string() to clean up the code a bit.
+
+ * evolution-storage.c (evolution_storage_new_folder): New arg
+ @custom_icon_name.
+
+ * Evolution-common.idl: New member customIconName in struct
+ Folder.
+
+2002-07-09 Ettore Perazzoli <ettore@ximian.com>
+
* e-shortcuts-view-model.c (get_icon_for_item): If the
custom_icon_name is not NULL, return the pixbuf for it.
diff --git a/shell/Evolution-common.idl b/shell/Evolution-common.idl
index 4cbf45ad7e..0f7da597d0 100644
--- a/shell/Evolution-common.idl
+++ b/shell/Evolution-common.idl
@@ -16,6 +16,7 @@ module Evolution {
string displayName;
string physicalUri;
string evolutionUri;
+ string customIconName;
long unreadCount;
boolean canSyncOffline;
};
diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c
index ed9f1b837c..3a09e3793b 100644
--- a/shell/e-corba-storage-registry.c
+++ b/shell/e-corba-storage-registry.c
@@ -29,6 +29,8 @@
#include "e-corba-storage-registry.h"
#include "e-shell-constants.h"
+#include "e-util/e-corba-utils.h"
+
#include <bonobo/bonobo-exception.h>
#include <gal/util/e-util.h>
@@ -393,18 +395,15 @@ impl_StorageRegistry_getFolderByUri (PortableServer_Servant servant,
}
corba_folder = GNOME_Evolution_Folder__alloc ();
+
corba_folder->displayName = CORBA_string_dup (e_folder_get_name (folder));
- if (e_folder_get_description (folder))
- corba_folder->description = CORBA_string_dup (e_folder_get_description (folder));
- else
- corba_folder->description = CORBA_string_dup ("");
- corba_folder->type = CORBA_string_dup (e_folder_get_type_string (folder));
- if (e_folder_get_physical_uri (folder))
- corba_folder->physicalUri = CORBA_string_dup (e_folder_get_physical_uri (folder));
- else
- corba_folder->physicalUri = CORBA_string_dup ("");
- corba_folder->evolutionUri = corba_evolution_uri;
- corba_folder->unreadCount = e_folder_get_unread_count (folder);
+
+ corba_folder->description = CORBA_string_dup (e_safe_corba_string (e_folder_get_description (folder)));
+ corba_folder->type = CORBA_string_dup (e_folder_get_type_string (folder));
+ corba_folder->physicalUri = CORBA_string_dup (e_safe_corba_string (e_folder_get_physical_uri (folder)));
+ corba_folder->customIconName = CORBA_string_dup (e_safe_corba_string (e_folder_get_custom_icon_name (folder)));
+ corba_folder->evolutionUri = corba_evolution_uri;
+ corba_folder->unreadCount = e_folder_get_unread_count (folder);
return corba_folder;
}
diff --git a/shell/e-folder.c b/shell/e-folder.c
index 0dd6c1ff10..6f36e5b487 100644
--- a/shell/e-folder.c
+++ b/shell/e-folder.c
@@ -460,6 +460,7 @@ e_folder_to_corba (EFolder *folder,
folder_return->displayName = safe_corba_string_dup (e_folder_get_name (folder));
folder_return->physicalUri = safe_corba_string_dup (e_folder_get_physical_uri (folder));
folder_return->evolutionUri = safe_corba_string_dup (evolution_uri);
+ folder_return->customIconName = safe_corba_string_dup (e_folder_get_custom_icon_name (folder));
folder_return->unreadCount = e_folder_get_unread_count (folder);
folder_return->canSyncOffline = e_folder_get_can_sync_offline (folder);
}
diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c
index 9f9a1d1556..0b2f0c7cdc 100644
--- a/shell/e-local-storage.c
+++ b/shell/e-local-storage.c
@@ -145,6 +145,7 @@ new_folder (ELocalStorage *local_storage,
e_folder_get_type_string (folder),
e_folder_get_physical_uri (folder),
e_folder_get_description (folder),
+ e_folder_get_custom_icon_name (folder),
e_folder_get_unread_count (folder),
FALSE);
}
diff --git a/shell/evolution-shell-client.c b/shell/evolution-shell-client.c
index 00b5c4548f..3100991384 100644
--- a/shell/evolution-shell-client.c
+++ b/shell/evolution-shell-client.c
@@ -104,14 +104,16 @@ impl_FolderSelectionListener_selected (PortableServer_Servant servant,
listener_servant = (FolderSelectionListenerServant *) servant;
if (listener_servant->folder_return != NULL) {
- GNOME_Evolution_Folder *ret_folder =
- GNOME_Evolution_Folder__alloc ();
+ GNOME_Evolution_Folder *ret_folder = GNOME_Evolution_Folder__alloc ();
+
ret_folder->type = CORBA_string_dup (folder->type);
- ret_folder->description = CORBA_string_dup (folder->description);
- ret_folder->displayName = CORBA_string_dup (folder->displayName);
- ret_folder->physicalUri = CORBA_string_dup (folder->physicalUri);
- ret_folder->evolutionUri = CORBA_string_dup (folder->evolutionUri);
- ret_folder->unreadCount = folder->unreadCount;
+ ret_folder->description = CORBA_string_dup (folder->description);
+ ret_folder->displayName = CORBA_string_dup (folder->displayName);
+ ret_folder->physicalUri = CORBA_string_dup (folder->physicalUri);
+ ret_folder->customIconName = CORBA_string_dup (folder->customIconName);
+ ret_folder->evolutionUri = CORBA_string_dup (folder->evolutionUri);
+ ret_folder->unreadCount = folder->unreadCount;
+
* (listener_servant->folder_return) = ret_folder;
}
diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c
index ebc514f774..bb1d37cd9e 100644
--- a/shell/evolution-storage.c
+++ b/shell/evolution-storage.c
@@ -965,6 +965,7 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage,
const char *type,
const char *physical_uri,
const char *description,
+ const char *custom_icon_name,
int unread_count,
gboolean can_sync_offline)
{
@@ -999,6 +1000,11 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage,
corba_folder->physicalUri = CORBA_string_dup (physical_uri);
corba_folder->canSyncOffline = (CORBA_boolean) can_sync_offline;
+ if (custom_icon_name != NULL)
+ corba_folder->customIconName = CORBA_string_dup (custom_icon_name);
+ else
+ corba_folder->customIconName = CORBA_string_dup ("");
+
evolutionUri = make_full_uri (evolution_storage, path);
corba_folder->evolutionUri = CORBA_string_dup (evolutionUri);
g_free (evolutionUri);
diff --git a/shell/evolution-storage.h b/shell/evolution-storage.h
index 10cec85ea3..be228c79e0 100644
--- a/shell/evolution-storage.h
+++ b/shell/evolution-storage.h
@@ -138,6 +138,7 @@ EvolutionStorageResult evolution_storage_new_folder (EvolutionStorage
const char *type,
const char *physical_uri,
const char *description,
+ const char *custom_icon_name,
int unread_count,
gboolean can_sync_offline);
EvolutionStorageResult evolution_storage_update_folder (EvolutionStorage *evolution_storage,
diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c
index a091499ee7..daeea054b3 100644
--- a/shell/evolution-test-component.c
+++ b/shell/evolution-test-component.c
@@ -327,9 +327,9 @@ setup_custom_storage (EvolutionShellClient *shell_client)
}
evolution_storage_new_folder (the_storage, "/FirstFolder", "FirstFolder",
- "mail", "file:///tmp/blah", "", 0, TRUE);
+ "mail", "file:///tmp/blah", "", NULL, 0, TRUE);
evolution_storage_new_folder (the_storage, "/SecondFolder", "SecondFolder",
- "calendar", "file:///tmp/bleh", "", 0, FALSE);
+ "calendar", "file:///tmp/bleh", "", NULL, 0, FALSE);
}