/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * camel-private.h: Private info for class implementers. * * Authors: Michael Zucchi * * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef CAMEL_PRIVATE_H #define CAMEL_PRIVATE_H 1 #ifdef __cplusplus extern "C" { #pragma } #endif /* __cplusplus */ /* need a way to configure and save this data, if this header is to be installed. For now, dont install it */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include struct _CamelFolderPrivate { EMutex *lock; EMutex *change_lock; /* must require the 'change_lock' to access this */ int frozen; struct _CamelFolderChangeInfo *changed_frozen; /* queues changed events */ }; #define CAMEL_FOLDER_LOCK(f, l) (e_mutex_lock(((CamelFolder *)f)->priv->l)) #define CAMEL_FOLDER_UNLOCK(f, l) (e_mutex_unlock(((CamelFolder *)f)->priv->l)) struct _CamelStorePrivate { EMutex *folder_lock; /* for locking folder operations */ }; #define CAMEL_STORE_LOCK(f, l) (e_mutex_lock(((CamelStore *)f)->priv->l)) #define CAMEL_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelStore *)f)->priv->l)) struct _CamelTransportPrivate { GMutex *send_lock; /* for locking send operations */ }; #define CAMEL_TRANSPORT_LOCK(f, l) (g_mutex_lock(((CamelTransport *)f)->priv->l)) #define CAMEL_TRANSPORT_UNLOCK(f, l) (g_mutex_unlock(((CamelTransport *)f)->priv->l)) struct _CamelServicePrivate { EMutex *connect_lock; /* for locking connection operations */ EMutex *connect_op_lock;/* for locking the connection_op */ }; #define CAMEL_SERVICE_LOCK(f, l) (e_mutex_lock(((CamelService *)f)->priv->l)) #define CAMEL_SERVICE_UNLOCK(f, l) (e_mutex_unlock(((CamelService *)f)->priv->l)) #define CAMEL_SERVICE_ASSERT_LOCKED(f, l) (e_mutex_assert_locked (((CamelService *)f)->priv->l)) struct _CamelSessionPrivate { GMutex *lock; /* for locking everything basically */ GMutex *thread_lock; /* locking threads */ int thread_id; GHashTable *thread_active; EThread *thread_queue; GHashTable *thread_msg_op; }; #define CAMEL_SESSION_LOCK(f, l) (g_mutex_lock(((CamelSession *)f)->priv->l)) #define CAMEL_SESSION_UNLOCK(f, l) (g_mutex_unlock(((CamelSession *)f)->priv->l)) /* most of this stuff really is private, but the lock can be used by subordinate classes */ struct _CamelFolderSummaryPrivate { GHashTable *filter_charset; /* CamelMimeFilterCharset's indexed by source charset */ struct _CamelMimeFilterIndex *filter_index; struct _CamelMimeFilterBasic *filter_64; struct _CamelMimeFilterBasic *filter_qp; struct _CamelMimeFilterBasic *filter_uu; struct _CamelMimeFilterSave *filter_save; struct _CamelMimeFilterHTML *filter_html; struct _CamelStreamFilter *filter_stream; struct _CamelIndex *index; GMutex *summary_lock; /* for the summary hashtable/array */ GMutex *io_lock; /* load/save lock, for access to saved_count, etc */ GMutex *filter_lock; /* for accessing any of the filtering/indexing stuff, since we share them */ GMutex *alloc_lock; /* for setting up and using allocators */ GMutex *ref_lock; /* for reffing/unreffing messageinfo's ALWAYS obtain before summary_lock */ }; #define CAMEL_SUMMARY_LOCK(f, l) (g_mutex_lock(((CamelFolderSummary *)f)->priv->l)) #define CAMEL_SUMMARY_UNLOCK(f, l) (g_mutex_unlock(((CamelFolderSummary *)f)->priv->l)) struct _CamelStoreSummaryPrivate { GMutex *summary_lock; /* for the summary hashtable/array */ GMutex *io_lock; /* load/save lock, for access to saved_count, etc */ GMutex *alloc_lock; /* for setting up and using allocators */ GMutex *ref_lock; /* for reffing/unreffing messageinfo's ALWAYS obtain before summary_lock */ }; #define CAMEL_STORE_SUMMARY_LOCK(f, l) (g_mutex_lock(((CamelStoreSummary *)f)->priv->l)) #define CAMEL_STORE_SUMMARY_UNLOCK(f, l) (g_mutex_unlock(((CamelStoreSummary *)f)->priv->l)) struct _CamelVeeFolderPrivate { GList *folders; /* lock using subfolder_lock before changing/accessing */ GList *folders_changed; /* for list of folders that have changed between updates */ int freeze_count; GMutex *summary_lock; /* for locking vfolder summary */ GMutex *subfolder_lock; /* for locking the subfolder list */ GMutex *changed_lock; /* for locking the folders-changed list */ }; #define CAMEL_VEE_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelVeeFolder *)f)->priv->l)) #define CAMEL_VEE_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelVeeFolder *)f)->priv->l)) struct _CamelDataWrapperPrivate { pthread_mutex_t stream_lock; }; #define CAMEL_DATA_WRAPPER_LOCK(dw, l) (pthread_mutex_lock(&((CamelDataWrapper *)dw)->priv->l)) #define CAMEL_DATA_WRAPPER_UNLOCK(dw, l) (pthread_mutex_unlock(&((CamelDataWrapper *)dw)->priv->l)) /* most of this stuff really is private, but the lock can be used by subordinate classes */ struct _CamelCertDBPrivate { GMutex *db_lock; /* for the db hashtable/array */ GMutex *io_lock; /* load/save lock, for access to saved_count, etc */ GMutex *alloc_lock; /* for setting up and using allocators */ GMutex *ref_lock; /* for reffing/unreffing certs */ }; #define CAMEL_CERTDB_LOCK(db, l) (g_mutex_lock (((CamelCertDB *) db)->priv->l)) #define CAMEL_CERTDB_UNLOCK(db, l) (g_mutex_unlock (((CamelCertDB *) db)->priv->l)) #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CAMEL_PRIVATE_H */ mmary='file diffstat' width='45%'> -rw-r--r--my-evolution/e-summary-tasks.c8
5 files changed, 54 insertions, 15 deletions
diff --git a/art/Makefile.am b/art/Makefile.am
index ab7ca76f6b..0828716318 100644
--- a/art/Makefile.am
+++ b/art/Makefile.am
@@ -69,6 +69,9 @@ images_DATA = \
mail-config-druid-receive.png \
mail-config-druid-send.png \
mail-config-druid-account-name.png \
+ myevo-appointments.png \
+ myevo-mail-summary.png \
+ myevo-post-it.png \
myweather-rain.png \
myweather-snow.png \
myweather-storm.png \
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index c108a1c758..b7a56d49d4 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,12 @@
+2001-08-02 Jason Leach <jleach@ximian.com>
+
+ * e-summary-calendar.c (generate_html): Use the new and beautiful
+ icon from Jakub.
+
+ * e-summary-mail.c (e_summary_mail_generate_html): Ditto.
+
+ * e-summary-tasks.c (generate_html): Ditto.
+
2001-07-23 Zbigniew Chyla <cyba@gnome.pl>
* e-summary-rdf.c (display_doc): Convert translated string to UTF8.
diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c
index 33d4f15a39..442bf1db6e 100644
--- a/my-evolution/e-summary-calendar.c
+++ b/my-evolution/e-summary-calendar.c
@@ -176,7 +176,7 @@ generate_html (gpointer data)
s1 = e_utf8_from_locale_string (_("Appointments"));
s2 = e_utf8_from_locale_string (_("No appointments"));
g_free (calendar->html);
- calendar->html = g_strconcat ("<dl><dt><img src=\"ico-calendar.png\" align=\"middle\" "
+ calendar->html = g_strconcat ("<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" "
"alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Calendar\">",
s1, "</a></b></dt><dd><b>", s2, "</b></dd></dl>", NULL);
g_free (s1);
@@ -189,7 +189,7 @@ generate_html (gpointer data)
uids = cal_list_sort (uids, sort_uids, summary);
- string = g_string_new ("<dl><dt><img src=\"ico-calendar.png\" align=\"middle\" "
+ string = g_string_new ("<dl><dt><img src=\"myevo-appointments.png\" align=\"middle\" "
"alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Calendar\">");
s = e_utf8_from_locale_string (_("Appointments"));
g_string_append (string, s);
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
index dda2fa6ed4..b024e42c4f 100644
--- a/my-evolution/e-summary-mail.c
+++ b/my-evolution/e-summary-mail.c
@@ -18,6 +18,7 @@
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
+#include <libgnome/gnome-util.h> /* gnome_util_prepend_user_home */
#include <gtk/gtksignal.h>
#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-listener.h>
@@ -98,7 +99,7 @@ e_summary_mail_generate_html (ESummary *summary)
g_return_if_fail (IS_E_SUMMARY (summary));
mail = summary->mail;
- string = g_string_new ("<dl><dt><img src=\"ico-mail.png\" "
+ string = g_string_new ("<dl><dt><img src=\"myevo-mail-summary.png\" "
"align=\"middle\" alt=\"\" width=\"48\" "
"height=\"48\"> <b><a href=\"evolution:/local/Inbox\">");
s = e_utf8_from_locale_string (_("Mail summary"));
@@ -183,6 +184,29 @@ new_folder_cb (EvolutionStorageListener *listener,
}
static void
+update_folder_cb (EvolutionStorageListener *listener,
+ const char *path,
+ const char *display_name,
+ ESummary *summary)
+{
+ char *evolution_dir;
+ char *proto;
+ char *uri;
+
+ evolution_dir = gnome_util_prepend_user_home ("evolution/local");
+
+ proto = g_strconcat ("file://", evolution_dir, NULL);
+ uri = e_path_to_physical (proto, path);
+ printf ("uri in update: %s\n", uri);
+
+ e_summary_mail_get_info (summary->mail, uri, summary->mail->listener);
+
+ g_free (uri);
+ g_free (evolution_dir);
+ g_free (proto);
+}
+
+static void
remove_folder_cb (EvolutionStorageListener *listener,
const char *path,
ESummary *summary)
@@ -265,7 +289,9 @@ e_summary_mail_register_storage (ESummary *summary,
GTK_SIGNAL_FUNC (new_folder_cb), summary);
gtk_signal_connect (GTK_OBJECT (mail->storage_listener), "removed-folder",
GTK_SIGNAL_FUNC (remove_folder_cb), summary);
- }
+ gtk_signal_connect (GTK_OBJECT (mail->storage_listener), "update_folder",
+ GTK_SIGNAL_FUNC (update_folder_cb), summary);
+ }
listener = mail->storage_listener;
corba_listener = evolution_storage_listener_corba_objref (listener);
@@ -278,10 +304,11 @@ e_summary_mail_register_storage (ESummary *summary,
CORBA_exception_free (&ev);
g_free (mail);
- return TRUE;
+ return FALSE;
}
CORBA_exception_free (&ev);
+
return TRUE;
}
@@ -289,14 +316,13 @@ static gboolean
e_summary_mail_register_storages (ESummary *summary,
GNOME_Evolution_Shell corba_shell)
{
- GNOME_Evolution_LocalStorage local_storage;
+ GNOME_Evolution_Storage local_storage;
CORBA_Environment ev;
g_return_val_if_fail (summary != NULL, FALSE);
g_return_val_if_fail (IS_E_SUMMARY (summary), FALSE);
CORBA_exception_init (&ev);
-
local_storage = GNOME_Evolution_Shell_getLocalStorage (corba_shell, &ev);
if (BONOBO_EX (&ev)) {
g_warning ("Exception getting local storage: %s",
@@ -305,11 +331,12 @@ e_summary_mail_register_storages (ESummary *summary,
return FALSE;
}
-
- e_summary_mail_register_storage (summary, local_storage);
-
CORBA_exception_free (&ev);
- return TRUE;
+
+ if (e_summary_mail_register_storage (summary, local_storage))
+ return TRUE;
+ else
+ return FALSE;
}
void
diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c
index 27ef1a4cbe..d691b58e1e 100644
--- a/my-evolution/e-summary-tasks.c
+++ b/my-evolution/e-summary-tasks.c
@@ -205,9 +205,9 @@ generate_html (gpointer data)
s1 = e_utf8_from_locale_string (_("Tasks"));
s2 = e_utf8_from_locale_string (_("No tasks"));
g_free (tasks->html);
- tasks->html = g_strconcat ("<dl><dt><img src=\"ico-calendar.png\" align=\"middle\" "
- "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Tasks\">",
- s1, "</a></b></dt><dd><b>", s2, "</b></dd></dl>", NULL);
+ tasks->html = g_strconcat ("<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" "
+ "alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Tasks\">",
+ s1, "</a></b></dt><dd><b>", s2, "</b></dd></dl>", NULL);
g_free (s1);
g_free (s2);
@@ -216,7 +216,7 @@ generate_html (gpointer data)
} else {
char *s;
- string = g_string_new ("<dl><dt><img src=\"ico-calendar.png\" align=\"middle\" "
+ string = g_string_new ("<dl><dt><img src=\"myevo-post-it.png\" align=\"middle\" "
"alt=\"\" width=\"48\" height=\"48\"> <b><a href=\"evolution:/local/Tasks\">");
s = e_utf8_from_locale_string (_("Tasks"));
g_string_append (string, s);