diff options
author | Milan Crha <mcrha@redhat.com> | 2007-11-23 17:56:15 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2007-11-23 17:56:15 +0800 |
commit | ced5862cb604ccaad1ff82090b972b875e36724b (patch) | |
tree | e427a067eb54fa3319918051c2236a29403ced44 /calendar | |
parent | 36917891fe11507d70971a54f0378cf84b8c2a59 (diff) | |
download | gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar.gz gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.tar.zst gsoc2013-evolution-ced5862cb604ccaad1ff82090b972b875e36724b.zip |
** Fix for bug #325730
2007-11-23 Milan Crha <mcrha@redhat.com>
** Fix for bug #325730
* gui/e-memos.c: (table_selection_change_cb):
* gui/e-tasks.c: (table_selection_change_cb):
Clear task/memo preview when have more or less than one row selected.
* gui/e-cal-model.c: (e_cal_view_objects_added_cb),
(e_cal_view_objects_removed_cb), (remove_client_objects):
First delete, then notify, so we read from updated store.
svn path=/trunk/; revision=34577
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 11 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 13 | ||||
-rw-r--r-- | calendar/gui/e-memos.c | 4 | ||||
-rw-r--r-- | calendar/gui/e-tasks.c | 3 |
4 files changed, 26 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 668368ab15..b6c64011e5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,16 @@ 2007-11-23 Milan Crha <mcrha@redhat.com> + ** Fix for bug #325730 + + * gui/e-memos.c: (table_selection_change_cb): + * gui/e-tasks.c: (table_selection_change_cb): + Clear task/memo preview when have more or less than one row selected. + * gui/e-cal-model.c: (e_cal_view_objects_added_cb), + (e_cal_view_objects_removed_cb), (remove_client_objects): + First delete, then notify, so we read from updated store. + +2007-11-23 Milan Crha <mcrha@redhat.com> + ** Fix for bug #484603 * gui/e-week-view.c: (e_week_view_reshape_event_span): diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index ec387e43eb..6b1fc97251 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1424,10 +1424,11 @@ e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data pos = get_position_in_array (priv->objects, comp_data); e_table_model_pre_change (E_TABLE_MODEL (model)); - e_table_model_row_deleted (E_TABLE_MODEL (model), pos); if (g_ptr_array_remove (priv->objects, comp_data)) e_cal_model_free_component_data (comp_data); + + e_table_model_row_deleted (E_TABLE_MODEL (model), pos); } e_cal_component_free_id (id); @@ -1484,15 +1485,16 @@ e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer user_data) ECalComponentId *id = l->data; int pos; - e_table_model_pre_change (E_TABLE_MODEL (model)); - /* make sure we remove all objects with this UID */ while ((comp_data = search_by_id_and_client (priv, e_cal_view_get_client (query), id))) { pos = get_position_in_array (priv->objects, comp_data); - e_table_model_row_deleted (E_TABLE_MODEL (model), pos); + + e_table_model_pre_change (E_TABLE_MODEL (model)); if (g_ptr_array_remove (priv->objects, comp_data)) e_cal_model_free_component_data (comp_data); + + e_table_model_row_deleted (E_TABLE_MODEL (model), pos); } } } @@ -1667,10 +1669,11 @@ remove_client_objects (ECalModel *model, ECalModelClient *client_data) if (comp_data->client == client_data->client) { e_table_model_pre_change (E_TABLE_MODEL (model)); - e_table_model_row_deleted (E_TABLE_MODEL (model), i - 1); g_ptr_array_remove (model->priv->objects, comp_data); e_cal_model_free_component_data (comp_data); + + e_table_model_row_deleted (E_TABLE_MODEL (model), i - 1); } } } diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c index 6d5120787d..a782204297 100644 --- a/calendar/gui/e-memos.c +++ b/calendar/gui/e-memos.c @@ -177,6 +177,10 @@ table_selection_change_cb (ETable *etable, gpointer data) n_selected = e_table_selected_count (etable); gtk_signal_emit (GTK_OBJECT (memos), e_memos_signals[SELECTION_CHANGED], n_selected); + + if (n_selected != 1) + e_cal_component_memo_preview_clear (E_CAL_COMPONENT_MEMO_PREVIEW (memos->priv->preview)); + } static void diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c index b127fdab30..acd176a7c2 100644 --- a/calendar/gui/e-tasks.c +++ b/calendar/gui/e-tasks.c @@ -190,6 +190,9 @@ table_selection_change_cb (ETable *etable, gpointer data) n_selected = e_table_selected_count (etable); gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SELECTION_CHANGED], n_selected); + + if (n_selected != 1) + e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (tasks->priv->preview)); } static void |