aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-04-30 06:33:50 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-04-30 06:33:50 +0800
commit1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db (patch)
tree0a4157e125c66eb0621fbdb4d8fc1ed6252a100b
parentc049d43462e76a1f96891819fdf8798ed52a513e (diff)
downloadgsoc2013-evolution-1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db.tar
gsoc2013-evolution-1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db.tar.gz
gsoc2013-evolution-1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db.tar.bz2
gsoc2013-evolution-1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db.tar.lz
gsoc2013-evolution-1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db.tar.xz
gsoc2013-evolution-1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db.tar.zst
gsoc2013-evolution-1ea21ba3e616d4a2b38ed6cbaf0fe3ff8f9140db.zip
Convert UTF-8 to gtkstrings since we are using a clist and not an E-widget
2002-04-29 Jeffrey Stedfast <fejj@ximian.com> * message-tag-followup.c (message_tag_followup_append_message): Convert UTF-8 to gtkstrings since we are using a clist and not an E-widget that takes UTF-8. * mail-display.c (mail_display_add_url): If the data-urls is NULL, add a data-urls hash to the datalist. This finishes up bug #90. svn path=/trunk/; revision=16640
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-display.c38
-rw-r--r--mail/message-tag-followup.c10
3 files changed, 43 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3b8f49b304..bacd3e8416 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
2002-04-29 Jeffrey Stedfast <fejj@ximian.com>
+ * message-tag-followup.c (message_tag_followup_append_message):
+ Convert UTF-8 to gtkstrings since we are using a clist and not an
+ E-widget that takes UTF-8.
+
+ * mail-display.c (mail_display_add_url): If the data-urls is NULL,
+ add a data-urls hash to the datalist. This finishes up bug #90.
+
* mail-account-gui.c (save_service): Strip leading/trailing
whitespace from the username because users sometimes accidently
add extra spaces here and there. Fixes bug #24009 (along with a
diff --git a/mail/mail-display.c b/mail/mail-display.c
index a26ba35563..a1c3e04ed7 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -2210,33 +2210,32 @@ set_status_message (const char *message, int busy)
{
EList *controls;
EIterator *it;
-
+
controls = folder_browser_factory_get_control_list ();
for (it = e_list_get_iterator (controls); e_iterator_is_valid (it); e_iterator_next (it)) {
BonoboControl *control;
GNOME_Evolution_ShellView shell_view_interface;
CORBA_Environment ev;
-
+
control = BONOBO_CONTROL (e_iterator_get (it));
-
+
shell_view_interface = gtk_object_get_data (GTK_OBJECT (control), "mail_threads_shell_view_interface");
-
+
if (shell_view_interface == CORBA_OBJECT_NIL)
shell_view_interface = retrieve_shell_view_interface_from_control (control);
-
+
CORBA_exception_init (&ev);
-
+
if (shell_view_interface != CORBA_OBJECT_NIL) {
-
if (message != NULL)
GNOME_Evolution_ShellView_setMessage (shell_view_interface,
message[0] ? message: "",
busy,
&ev);
}
-
+
CORBA_exception_free (&ev);
-
+
/* yeah we only set the first one. Why? Because it seems to leave
random ones lying around otherwise. Shrug. */
break;
@@ -2345,6 +2344,20 @@ mail_display_initialize_gtkhtml (MailDisplay *mail_display, GtkHTML *html)
GTK_SIGNAL_FUNC (html_on_url), mail_display);
}
+static void
+free_url (gpointer key, gpointer value, gpointer data)
+{
+ g_free (key);
+ if (data)
+ g_byte_array_free (value, TRUE);
+}
+
+static void
+free_data_urls (gpointer urls)
+{
+ g_hash_table_foreach (urls, free_url, GINT_TO_POINTER (1));
+ g_hash_table_destroy (urls);
+}
char *
mail_display_add_url (MailDisplay *md, const char *kind, char *url, gpointer data)
@@ -2353,7 +2366,12 @@ mail_display_add_url (MailDisplay *md, const char *kind, char *url, gpointer dat
gpointer old_key, old_value;
urls = g_datalist_get_data (md->data, kind);
- g_return_val_if_fail (urls != NULL, NULL);
+ if (!urls) {
+ urls = g_hash_table_new (g_str_hash, g_str_equal);
+ g_datalist_set_data_full (md->data, "data_urls", urls,
+ free_data_urls);
+ }
+
if (g_hash_table_lookup_extended (urls, url, &old_key, &old_value)) {
g_free (url);
url = old_key;
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index 4b6af39e40..b228f689c7 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -31,8 +31,11 @@
#include <glade/glade.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnomeui/gnome-window-icon.h>
#include <libgnomeui/gnome-pixmap.h>
+#include <gal/widgets/e-unicode.h>
#include <gal/util/e-unicode-i18n.h>
#include "message-tag-followup.h"
@@ -377,9 +380,12 @@ message_tag_followup_append_message (MessageTagFollowUp *editor,
g_return_if_fail (IS_MESSAGE_TAG_FOLLOWUP (editor));
- text[0] = (char *) from;
- text[1] = (char *) subject;
+ text[0] = e_utf8_to_gtk_string (GTK_WIDGET (editor->message_list), from);
+ text[1] = e_utf8_to_gtk_string (GTK_WIDGET (editor->message_list), subject);
text[2] = NULL;
gtk_clist_append (editor->message_list, text);
+
+ g_free (text[0]);
+ g_free (text[1]);
}