aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1998-10-09 05:49:42 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-10-09 05:49:42 +0800
commit52f7fe06901ad02630525a21c25993456577d133 (patch)
treef326eb4f62560c99714e6fde746e668976bb6e19 /calendar
parent2389bd7bedc9b1caf3e9f34631c70c8ddf3fb306 (diff)
downloadgsoc2013-evolution-52f7fe06901ad02630525a21c25993456577d133.tar
gsoc2013-evolution-52f7fe06901ad02630525a21c25993456577d133.tar.gz
gsoc2013-evolution-52f7fe06901ad02630525a21c25993456577d133.tar.bz2
gsoc2013-evolution-52f7fe06901ad02630525a21c25993456577d133.tar.lz
gsoc2013-evolution-52f7fe06901ad02630525a21c25993456577d133.tar.xz
gsoc2013-evolution-52f7fe06901ad02630525a21c25993456577d133.tar.zst
gsoc2013-evolution-52f7fe06901ad02630525a21c25993456577d133.zip
Set the sensitivity of the edit/delete buttons. (gncal_todo_update):
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. svn path=/trunk/; revision=435
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));
}