diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-03-18 08:58:04 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-03-18 08:58:04 +0800 |
commit | e4c6f61966479fbcb8da64ac49bb578c7f2d5017 (patch) | |
tree | 63769914c43c50ed6e7fcb1904ffd921b23a8ce7 | |
parent | 112e49e10dc3c28cf58c88c30076bb1d834367c7 (diff) | |
download | gsoc2013-evolution-e4c6f61966479fbcb8da64ac49bb578c7f2d5017.tar.gz 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
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/dialogs/alarm-page.c | 16 |
2 files changed, 18 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index e23abebe3e..74009d71c8 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,13 @@ 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. + +2003-03-17 Hans Petter Jansson <hpj@ximian.com> + Fixes #39736 * gui/e-day-view.c: Reduce the size of the large-digits font so it's 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 */ |