aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gncal-todo.c7
-rw-r--r--calendar/gui/gncal-todo.c7
3 files changed, 15 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 4bb47d706f..a3309c2ba5 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,10 @@
1998-10-08 Federico Mena Quintero <federico@nuclecu.unam.mx>
+ * gncal-todo.c (clist_row_selected): Set the sensitivity of the
+ edit/delete buttons.
+ (gncal_todo_update): Likewise. Thanks to Dirk Luetjens for the
+ bug report.
+
* layout.c: Do some cleanup; now we pass a struct with the layout
algorithm's state instead of passing a trillion parameters around.
diff --git a/calendar/gncal-todo.c b/calendar/gncal-todo.c
index d527d6ff09..0a39522622 100644
--- a/calendar/gncal-todo.c
+++ b/calendar/gncal-todo.c
@@ -201,6 +201,9 @@ clist_row_selected (GtkCList *clist, gint row, gint column, GdkEventButton *even
int i;
+ gtk_widget_set_sensitive (todo->edit_button, (todo->clist->selection != NULL));
+ gtk_widget_set_sensitive (todo->delete_button, (todo->clist->selection != NULL));
+
if (!event)
return;
@@ -351,6 +354,6 @@ gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags)
gtk_clist_thaw (todo->clist);
- gtk_widget_set_sensitive (todo->edit_button, (todo->clist->rows > 0));
- gtk_widget_set_sensitive (todo->delete_button, (todo->clist->rows > 0));
+ gtk_widget_set_sensitive (todo->edit_button, (todo->clist->selection != NULL));
+ gtk_widget_set_sensitive (todo->delete_button, (todo->clist->selection != NULL));
}
diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c
index d527d6ff09..0a39522622 100644
--- a/calendar/gui/gncal-todo.c
+++ b/calendar/gui/gncal-todo.c
@@ -201,6 +201,9 @@ clist_row_selected (GtkCList *clist, gint row, gint column, GdkEventButton *even
int i;
+ gtk_widget_set_sensitive (todo->edit_button, (todo->clist->selection != NULL));
+ gtk_widget_set_sensitive (todo->delete_button, (todo->clist->selection != NULL));
+
if (!event)
return;
@@ -351,6 +354,6 @@ gncal_todo_update (GncalTodo *todo, iCalObject *ico, int flags)
gtk_clist_thaw (todo->clist);
- gtk_widget_set_sensitive (todo->edit_button, (todo->clist->rows > 0));
- gtk_widget_set_sensitive (todo->delete_button, (todo->clist->rows > 0));
+ gtk_widget_set_sensitive (todo->edit_button, (todo->clist->selection != NULL));
+ gtk_widget_set_sensitive (todo->delete_button, (todo->clist->selection != NULL));
}