aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/eventedit.c
diff options
context:
space:
mode:
authorJason Tackaberry <tack@dok.org>1999-01-31 06:18:25 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-01-31 06:18:25 +0800
commit2d126d6634af26d7a4db216fe8c9922932b8f1f2 (patch)
tree31059fffe51ddcd309663a372c28650b1c625e61 /calendar/gui/eventedit.c
parentb1f6df5d5d869861e1fb3e38d6e665f2cf638709 (diff)
downloadgsoc2013-evolution-2d126d6634af26d7a4db216fe8c9922932b8f1f2.tar
gsoc2013-evolution-2d126d6634af26d7a4db216fe8c9922932b8f1f2.tar.gz
gsoc2013-evolution-2d126d6634af26d7a4db216fe8c9922932b8f1f2.tar.bz2
gsoc2013-evolution-2d126d6634af26d7a4db216fe8c9922932b8f1f2.tar.lz
gsoc2013-evolution-2d126d6634af26d7a4db216fe8c9922932b8f1f2.tar.xz
gsoc2013-evolution-2d126d6634af26d7a4db216fe8c9922932b8f1f2.tar.zst
gsoc2013-evolution-2d126d6634af26d7a4db216fe8c9922932b8f1f2.zip
if the user clicks on an event that is an occurance, the menu will allow
1999-01-29 Jason Tackaberry <tack@dok.org> * gncal-full-day.c (child_popup_menu): if the user clicks on an event that is an occurance, the menu will allow the user to delete all occurances of this event, or just the selected occurance. (delete_occurance): added. * eventedit.c (append_exception): force the clist to select the new exception. (fixes segfault) (delete_exception): if the last exception in the clist is deleted, move the selection index up. (fixes segfault) svn path=/trunk/; revision=636
Diffstat (limited to 'calendar/gui/eventedit.c')
-rw-r--r--calendar/gui/eventedit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c
index 0f94a87a5d..05b9f1e126 100644
--- a/calendar/gui/eventedit.c
+++ b/calendar/gui/eventedit.c
@@ -1287,6 +1287,7 @@ append_exception (EventEditor *ee, time_t t)
i = gtk_clist_append (GTK_CLIST (ee->recur_ex_clist), c);
gtk_clist_set_row_data (GTK_CLIST (ee->recur_ex_clist), i, tt);
+ gtk_clist_select_row (GTK_CLIST (ee->recur_ex_clist), i, 0);
gtk_widget_set_sensitive (ee->recur_ex_vbox, TRUE);
}
@@ -1329,7 +1330,7 @@ static void
delete_exception (GtkWidget *widget, EventEditor *ee)
{
GtkCList *clist;
- int sel;
+ int sel, length;
clist = GTK_CLIST (ee->recur_ex_clist);
sel = GPOINTER_TO_INT(clist->selection->data);
@@ -1337,6 +1338,10 @@ delete_exception (GtkWidget *widget, EventEditor *ee)
g_free (gtk_clist_get_row_data (clist, sel)); /* free the time_t stored there */
gtk_clist_remove (clist, sel);
+ length = g_list_length(clist->row_list);
+ if (sel >= length)
+ sel--;
+ gtk_clist_select_row (GTK_CLIST (ee->recur_ex_clist), sel, 0);
if (clist->rows == 0)
gtk_widget_set_sensitive (ee->recur_ex_vbox, FALSE);