diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-10-23 02:39:47 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-10-23 02:39:47 +0800 |
commit | 708dc70ac5b5cf2711a1f43293a9e0a4467adcb7 (patch) | |
tree | 5b5618b4e6b508a62df340c38633afa61ff62287 /composer | |
parent | 0787edd7b8e161e8ac1f05cded7e81983e124280 (diff) | |
download | gsoc2013-evolution-708dc70ac5b5cf2711a1f43293a9e0a4467adcb7.tar gsoc2013-evolution-708dc70ac5b5cf2711a1f43293a9e0a4467adcb7.tar.gz gsoc2013-evolution-708dc70ac5b5cf2711a1f43293a9e0a4467adcb7.tar.bz2 gsoc2013-evolution-708dc70ac5b5cf2711a1f43293a9e0a4467adcb7.tar.lz gsoc2013-evolution-708dc70ac5b5cf2711a1f43293a9e0a4467adcb7.tar.xz gsoc2013-evolution-708dc70ac5b5cf2711a1f43293a9e0a4467adcb7.tar.zst gsoc2013-evolution-708dc70ac5b5cf2711a1f43293a9e0a4467adcb7.zip |
Check that account->id->address != NULL.
2001-10-22 Jon Trowbridge <trow@ximian.com>
* e-msg-composer-hdrs.c (create_from_optionmenu): Check that
account->id->address != NULL.
svn path=/trunk/; revision=13886
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 62 |
2 files changed, 41 insertions, 26 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 2006ad796b..a958afc762 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2001-10-22 Jon Trowbridge <trow@ximian.com> + + * e-msg-composer-hdrs.c (create_from_optionmenu): Check that + account->id->address != NULL. + 2001-10-21 Dan Winship <danw@ximian.com> Make inline images used for replies not show up as diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index c64aab4cb9..0778ee8171 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -201,34 +201,37 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs) continue; } - if (strcmp (account->name, account->id->address)) - label = g_strdup_printf ("%s <%s> (%s)", account->id->name, - account->id->address, account->name); - else - label = g_strdup_printf ("%s <%s>", account->id->name, account->id->address); - - native_label = e_utf8_to_gtk_string (GTK_WIDGET (menu), label); - item = gtk_menu_item_new_with_label (native_label); - g_free (native_label); - g_free (label); - - gtk_object_set_data (GTK_OBJECT (item), "account", account_copy (account)); - gtk_signal_connect (GTK_OBJECT (item), "activate", - GTK_SIGNAL_FUNC (from_changed), hdrs); - - if (i == default_account) { - first = item; - history = i; + if (account->id->address && *account->id->address) { + + if (strcmp (account->name, account->id->address)) + label = g_strdup_printf ("%s <%s> (%s)", account->id->name, + account->id->address, account->name); + else + label = g_strdup_printf ("%s <%s>", account->id->name, account->id->address); + + native_label = e_utf8_to_gtk_string (GTK_WIDGET (menu), label); + item = gtk_menu_item_new_with_label (native_label); + g_free (native_label); + g_free (label); + + gtk_object_set_data (GTK_OBJECT (item), "account", account_copy (account)); + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (from_changed), hdrs); + + if (i == default_account) { + first = item; + history = i; + } + + /* this is so we can later set which one we want */ + hdrs->priv->from_options = g_slist_append (hdrs->priv->from_options, item); + + gtk_menu_append (GTK_MENU (menu), item); + gtk_widget_show (item); + ++i; } - /* this is so we can later set which one we want */ - hdrs->priv->from_options = g_slist_append (hdrs->priv->from_options, item); - - gtk_menu_append (GTK_MENU (menu), item); - gtk_widget_show (item); - accounts = accounts->next; - i++; } gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu); @@ -397,6 +400,13 @@ create_headers (EMsgComposerHdrs *hdrs) "the message.")); } +static GtkDirectionType +focus_cb (GtkContainer *contain, GtkDirectionType dir, gpointer closure) +{ + g_message ("FOCUS: %d", dir); + return dir; +} + static void attach_couple (EMsgComposerHdrs *hdrs, EMsgComposerHdrPair *pair, int line) { @@ -406,7 +416,7 @@ attach_couple (EMsgComposerHdrs *hdrs, EMsgComposerHdrPair *pair, int line) pad = GNOME_PAD; else pad = 2; - + gtk_table_attach (GTK_TABLE (hdrs), pair->label, 0, 1, line, line + 1, |