aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2003-03-18 08:58:04 +0800
committerHans Petter <hansp@src.gnome.org>2003-03-18 08:58:04 +0800
commite4c6f61966479fbcb8da64ac49bb578c7f2d5017 (patch)
tree63769914c43c50ed6e7fcb1904ffd921b23a8ce7 /calendar/gui
parent112e49e10dc3c28cf58c88c30076bb1d834367c7 (diff)
downloadgsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.tar
gsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.tar.gz
gsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.tar.bz2
gsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.tar.lz
gsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.tar.xz
gsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.tar.zst
gsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.zip
Fixes #39757
2003-03-17 Hans Petter Jansson <hpj@ximian.com> Fixes #39757 * gui/dialogs/alarm-page.c (sensitize_buttons): Somehow this code reverted to thinking it was dealing with a GtkCList, when in reality it's a GtkTreeView. Fix that, so the buttons are sensitized correctly. svn path=/trunk/; revision=20328
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/alarm-page.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c
index b28e0dd0b3..2008881ff3 100644
--- a/calendar/gui/dialogs/alarm-page.c
+++ b/calendar/gui/dialogs/alarm-page.c
@@ -313,15 +313,19 @@ sensitize_buttons (AlarmPage *apage)
{
AlarmPagePrivate *priv;
CalClient *client;
- GtkCList *clist;
-
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ gboolean have_selected;
+
priv = apage->priv;
-
+
client = COMP_EDITOR_PAGE (apage)->client;
- clist = GTK_CLIST (priv->list);
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list));
+ have_selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
- gtk_widget_set_sensitive (priv->add, cal_client_get_one_alarm_only (client) && clist->rows > 0 ? FALSE : TRUE);
- gtk_widget_set_sensitive (priv->delete, clist->rows > 0 ? TRUE : FALSE);
+ gtk_widget_set_sensitive (priv->add,
+ cal_client_get_one_alarm_only (client) && have_selected ? FALSE : TRUE);
+ gtk_widget_set_sensitive (priv->delete, have_selected);
}
/* Appends an alarm to the list */