aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog10
-rw-r--r--composer/e-msg-composer-hdrs.c8
-rw-r--r--composer/e-msg-composer.c14
3 files changed, 22 insertions, 10 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index b57d72aa94..acb5eeaf5f 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,13 @@
+2007-09-03 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #471791 (Move away from asserts to g_ret*)
+
+ * e-msg-composer-hdrs.c: (setup_name_selector),
+ (create_from_optionmenu), (e_msg_composer_hdrs_get_recipients):
+ * e-msg-composer.c: (menu_edit_cut_cb), (menu_edit_copy_cb),
+ (menu_edit_paste_cb), (menu_edit_select_all_cb),
+ (update_auto_recipients), (composer_entry_focus_out_event_cb):
+
2007-08-24 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #355766
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index 188781c4f8..144b9bd1b2 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -143,7 +143,7 @@ setup_name_selector (EMsgComposerHdrs *hdrs)
priv = hdrs->priv;
- g_assert (priv->name_selector == NULL);
+ g_return_if_fail (priv->name_selector == NULL);
priv->name_selector = e_name_selector_new ();
name_selector_dialog = e_name_selector_peek_dialog (priv->name_selector);
@@ -399,7 +399,7 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs)
/* this should never ever fail */
if (!account || !account->name || !account->id) {
- g_assert_not_reached ();
+ g_warning ("account details are bad\n");
continue;
}
@@ -1540,7 +1540,9 @@ e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs)
for (i = 0; bcc_destv && bcc_destv[i] != NULL; i++, j++)
recip_destv[j] = bcc_destv[i];
- g_assert (j == n);
+ if (j != n) {
+ g_warning ("j!=n \n");
+ }
recip_destv[j] = NULL;
g_free (to_destv);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 75dcd0eaa5..f38afb554e 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1896,7 +1896,7 @@ menu_edit_cut_cb (BonoboUIComponent *uic, void *data, const char *path)
gtk_editable_cut_clipboard (GTK_EDITABLE (p->focused_entry));
} else {
/* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
+ g_return_if_reached ();
}
}
@@ -1912,7 +1912,7 @@ menu_edit_copy_cb (BonoboUIComponent *uic, void *data, const char *path)
gtk_editable_copy_clipboard (GTK_EDITABLE (p->focused_entry));
} else {
/* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
+ g_return_if_reached ();
}
}
@@ -1928,7 +1928,7 @@ menu_edit_paste_cb (BonoboUIComponent *uic, void *data, const char *path)
gtk_editable_paste_clipboard (GTK_EDITABLE (p->focused_entry));
} else {
/* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
+ g_return_if_reached ();
}
}
@@ -1960,7 +1960,7 @@ menu_edit_select_all_cb (BonoboUIComponent *uic, void *data, const char *path)
gtk_editable_select_region (GTK_EDITABLE (p->focused_entry), 0, -1);
} else {
/* happy happy joy joy, an EEntry. */
- g_assert_not_reached ();
+ g_return_if_reached ();
}
}
@@ -2701,7 +2701,7 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs
destv = e_msg_composer_hdrs_get_bcc (hdrs);
break;
default:
- g_assert_not_reached ();
+ g_return_if_reached ();
}
if (destv) {
@@ -2738,7 +2738,7 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs
e_msg_composer_hdrs_set_bcc (hdrs, destv);
break;
default:
- g_assert_not_reached ();
+ g_return_if_reached ();
}
e_destination_freev (destv);
@@ -3626,7 +3626,7 @@ composer_entry_focus_out_event_cb (GtkWidget *widget, GdkEventFocus *event, gpoi
EMsgComposer *composer = user_data;
EMsgComposerPrivate *p = composer->priv;
- g_assert (p->focused_entry == widget);
+ g_return_val_if_fail (p->focused_entry == widget, FALSE);
p->focused_entry = NULL;
bonobo_ui_component_unset_container (p->entry_uic, NULL);