diff options
author | Milan Crha <mcrha@redhat.com> | 2008-07-30 00:38:30 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2008-07-30 00:38:30 +0800 |
commit | 7742a1e98b0a021812d09dda112cf5b51db7e096 (patch) | |
tree | 6e7c5431d75e06d9fa5227345298e1b0befc9456 /calendar | |
parent | b0a67833252ecb523cd546e115fb494dbc30773a (diff) | |
download | gsoc2013-evolution-7742a1e98b0a021812d09dda112cf5b51db7e096.tar.gz gsoc2013-evolution-7742a1e98b0a021812d09dda112cf5b51db7e096.tar.zst gsoc2013-evolution-7742a1e98b0a021812d09dda112cf5b51db7e096.zip |
** Fix for bug #329821
2008-07-29 Milan Crha <mcrha@redhat.com>
** Fix for bug #329821
* gui/e-calendar-table.c: (query_tooltip_cb):
Recalculate returned row to the model row, if we are sorting.
svn path=/trunk/; revision=35861
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9d82f8e930..34f3667662 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2008-07-29 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #329821 + + * gui/e-calendar-table.c: (query_tooltip_cb): + Recalculate returned row to the model row, if we are sorting. + 2008-07-20 Andre Klapper <a9016009@gmx.de> * calendar.error.xml: Fix some strings. See bug #543753. diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index de9578af93..4038c73c04 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -296,6 +296,8 @@ query_tooltip_cb (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, Gtk icaltimezone *zone, *default_zone; GSList *desc, *p; int len; + ETable *etable; + ESelectionModel *esm; if (keyboard_mode) return FALSE; @@ -306,10 +308,16 @@ query_tooltip_cb (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, Gtk cal_table = E_CALENDAR_TABLE (user_data); - e_table_get_mouse_over_cell (e_calendar_table_get_table (cal_table), x, y, &row, &col); - if (row == -1) + etable = e_calendar_table_get_table (cal_table); + e_table_get_mouse_over_cell (etable, x, y, &row, &col); + if (row == -1 || !etable) return FALSE; + /* respect sorting option, the 'e_table_get_mouse_over_cell' returns sorted row, not the model one */ + esm = e_table_get_selection_model (etable); + if (esm && esm->sorter && e_sorter_needs_sorting (esm->sorter)) + row = e_sorter_sorted_to_model (esm->sorter, row); + comp = e_cal_model_get_component_at (cal_table->model, row); if (!comp || !comp->icalcomp) return FALSE; |