aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/dialogs/calendar-setup.c18
2 files changed, 25 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 2e95abd666..4003753cff 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-25 Larry Ewing <lewing@ximian.com>
+
+ * gui/dialogs/calendar-setup.c (calendar_setup_edit_task_list):
+ use the new dialog.
+ (calendar_setup_edit_calendar): use the new dialog.
+ (key_press_event): look for escape press and destroy dialog.
+
2004-05-25 Jeffrey Stedfast <fejj@novell.com>
* gui/dialogs/url-editor-dialog.c (init_widgets): Use
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index 517804f34e..e50f1f7f47 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <bonobo/bonobo-i18n.h>
+#include <gdk/gdkkeysyms.h>
#include <gtk/gtkdialog.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkmenu.h>
@@ -653,6 +654,17 @@ source_group_changed_sensitive (SourceDialog *source_dialog)
general_update_dialog (source_dialog);
}
+static gboolean
+key_press_event (GtkWidget *widget, GdkEventKey *event)
+{
+ if (event->keyval == GDK_Escape) {
+ gtk_widget_destroy (widget);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
new_calendar_cancel (SourceDialog *source_dialog)
{
@@ -687,6 +699,7 @@ calendar_setup_new_calendar (GtkWindow *parent)
}
source_dialog->window = glade_xml_get_widget (source_dialog->gui_xml, "add-calendar-window");
+ g_signal_connect (source_dialog->window, "key-press-event", G_CALLBACK (key_press_event), NULL);
source_dialog->name_entry = glade_xml_get_widget (source_dialog->gui_xml, "name-entry");
g_signal_connect_swapped (source_dialog->name_entry, "changed",
@@ -782,6 +795,8 @@ calendar_setup_edit_calendar (GtkWindow *parent, ESource *source)
source_dialog->source = source;
g_object_ref (source);
+ g_signal_connect (source_dialog->window, "key-press-event", G_CALLBACK (key_press_event), NULL);
+
source_dialog->name_entry = glade_xml_get_widget (source_dialog->gui_xml, "name-entry");
g_signal_connect_swapped (source_dialog->name_entry, "changed",
G_CALLBACK (general_entry_modified), source_dialog);
@@ -889,6 +904,7 @@ calendar_setup_new_task_list (GtkWindow *parent)
}
source_dialog->window = glade_xml_get_widget (source_dialog->gui_xml, "add-task-list-window");
+ g_signal_connect (source_dialog->window, "key-press-event", G_CALLBACK (key_press_event), NULL);
source_dialog->name_entry = glade_xml_get_widget (source_dialog->gui_xml, "name-entry");
g_signal_connect_swapped (source_dialog->name_entry, "changed",
@@ -985,6 +1001,8 @@ calendar_setup_edit_task_list (GtkWindow *parent, ESource *source)
source_dialog->source = source;
g_object_ref (source);
+ g_signal_connect (source_dialog->window, "key-press-event", G_CALLBACK (key_press_event), NULL);
+
source_dialog->name_entry = glade_xml_get_widget (source_dialog->gui_xml, "name-entry");
g_signal_connect_swapped (source_dialog->name_entry, "changed",
G_CALLBACK (general_entry_modified), source_dialog);