From bdc396c0012257c1d5a1bd78993dd42cdf52bdb8 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sun, 15 Jul 2001 09:06:27 +0000 Subject: Added a call to e_table_view_to_model_row here. 2001-07-15 Christopher James Lahey * gui/widgets/e-addressbook-view.c (table_drag_data_get): Added a call to e_table_view_to_model_row here. (e_addressbook_view_can_print, e_addressbook_view_can_delete, e_addressbook_view_can_copy): If the selection model is NULL here, return NULL (this was done before in a g_return_val_if_fail which is only conditionally included.) svn path=/trunk/; revision=11110 --- addressbook/gui/widgets/e-addressbook-view.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'addressbook/gui/widgets') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 436632e77f..4f39360045 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -651,6 +651,7 @@ table_drag_data_get (ETable *table, case DND_TARGET_TYPE_VCARD: { char *value; + row = e_table_view_to_model_row (table, row); value = e_card_get_vcard(view->model->data[row]); gtk_selection_data_set (selection_data, @@ -1266,7 +1267,8 @@ e_addressbook_view_can_print (EAddressbookView *view) return FALSE; selection_model = get_selection_model (view); - g_return_val_if_fail (selection_model != NULL, FALSE); + if (selection_model == NULL) + return FALSE; return e_selection_model_selected_count (selection_model) != 0; } @@ -1280,7 +1282,8 @@ e_addressbook_view_can_delete (EAddressbookView *view) return FALSE; selection_model = get_selection_model (view); - g_return_val_if_fail (selection_model != NULL, FALSE); + if (selection_model == NULL) + return FALSE; return e_selection_model_selected_count (selection_model) != 0; } @@ -1300,7 +1303,8 @@ e_addressbook_view_can_copy (EAddressbookView *view) return FALSE; selection_model = get_selection_model (view); - g_return_val_if_fail (selection_model != NULL, FALSE); + if (selection_model == NULL) + return FALSE; return e_selection_model_selected_count (selection_model) != 0; } -- cgit v1.2.3