diff options
-rw-r--r-- | calendar/ChangeLog | 7 | ||||
-rw-r--r-- | calendar/gui/dialogs/alarm-list-dialog.c | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f1780a9d05..5267b41bdf 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,12 @@ 2004-06-24 JP Rosevear <jpr@novell.com> + * gui/dialogs/alarm-list-dialog.c (selection_changed_cb): + sensitize the buttons + (init_widgets): listen for selection changes so we can delete + alarms + +2004-06-24 JP Rosevear <jpr@novell.com> + * gui/dialogs/event-page.c (event_page_fill_component): store all the custom alarms (alarm_custom_clicked_cb): emit changed signal if necessary diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c index 827c5fff41..add08c1dfa 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.c +++ b/calendar/gui/dialogs/alarm-list-dialog.c @@ -169,6 +169,14 @@ delete_clicked_cb (GtkButton *button, gpointer data) gtk_tree_path_free (path); } +static void +selection_changed_cb (GtkTreeSelection *selection, gpointer data) +{ + Dialog *dialog = data; + + sensitize_buttons (dialog); +} + /* Hooks the widget signals */ static void init_widgets (Dialog *dialog) @@ -192,6 +200,9 @@ init_widgets (Dialog *dialog) G_CALLBACK (add_clicked_cb), dialog); g_signal_connect (dialog->delete, "clicked", G_CALLBACK (delete_clicked_cb), dialog); + + g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->list)), "changed", + G_CALLBACK (selection_changed_cb), dialog); } gboolean |