aboutsummaryrefslogtreecommitdiffstats
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
parentdbb4e600dede6660bd4f130a7f21b781146319b7 (diff)
downloadgsoc2013-evolution-6d2b6fa6d25e72aef704f3fefb0d3fa907f2086d.tar.gz
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
-rw-r--r--addressbook/ChangeLog7
-rw-r--r--addressbook/gui/component/addressbook-storage.c4
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-folder-cache.c3
-rw-r--r--mail/subscribe-dialog.c2
-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
14 files changed, 75 insertions, 24 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 3c26705674..343c9a394b 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,10 @@
+2002-07-09 Ettore Perazzoli <ettore@ximian.com>
+
+ * 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. ;-)]
+
2002-07-02 Ettore Perazzoli <ettore@ximian.com>
* gui/component/addressbook-component.c (add_creatable_item): New
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
index be2ad3d1e7..fe0a7760a7 100644
--- a/addressbook/gui/component/addressbook-storage.c
+++ b/addressbook/gui/component/addressbook-storage.c
@@ -460,7 +460,7 @@ load_source_data (const char *file_path)
path = g_strdup_printf ("/%s", source->name);
evolution_storage_new_folder (storage, path, source->name,
"ldap-contacts", source->uri,
- source->description, 0, FALSE);
+ source->description, NULL, 0, FALSE);
sources = g_list_append (sources, source);
@@ -579,7 +579,7 @@ addressbook_storage_add_source (AddressbookSource *source)
addressbook_get_other_contact_storage();
path = g_strdup_printf ("/%s", source->name);
evolution_storage_new_folder (storage, path, source->name, "ldap-contacts",
- source->uri, source->description, 0, FALSE);
+ source->uri, source->description, NULL, 0, FALSE);
g_free (path);
}
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9e42c25a82..88af461378 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2002-07-09 Ettore Perazzoli <ettore@ximian.com>
+
+ * 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().
+
2002-07-08 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (redirect): Don't ever use the mail-display's
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 8b55601f7a..945406b99a 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -191,7 +191,8 @@ real_flush_updates(void *o, void *event_data, void *data)
d(printf("Adding new folder: %s\n", up->path));
evolution_storage_new_folder(storage,
- up->path, up->name, type, up->uri, up->name, up->unread,
+ up->path, up->name, type, up->uri, up->name, NULL,
+ up->unread,
TRUE);
}
diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c
index 0d553dd326..46484ddbd4 100644
--- a/mail/subscribe-dialog.c
+++ b/mail/subscribe-dialog.c
@@ -185,7 +185,7 @@ recursive_add_folder (EvolutionStorage *storage, const char *path, const char *n
g_free (parent);
}
- evolution_storage_new_folder (storage, path, name, "mail", url, name, FALSE, TRUE);
+ evolution_storage_new_folder (storage, path, name, "mail", url, name, NULL, FALSE, TRUE);
}
/* ** Get one level of folderinfo ****************************************** */
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);
}