[evolution-patches] Patch for -> http://bugzilla.ximian.com/show_bug.cgi?id=53653



The following is a patch for the bug:
(attached to the bug at bugzilla)

I hope its ok...

Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1615
diff -u -3 -p -u -r1.1615 ChangeLog
--- addressbook/ChangeLog	18 Mar 2004 00:59:11 -0000	1.1615
+++ addressbook/ChangeLog	19 Mar 2004 17:32:58 -0000
@@ -1,3 +1,10 @@
+2004-03-19  Pratik V. Parikh <pratikvp despammed com>
+
+	Fixes #53653
+
+	* /gui/widgets/eab-gui-util.c (eab_select_source) : Close move/copy 
+	dialog when ESC is pressed.
+
 2004-03-17  Hans Petter Jansson  <hpj ximian com>
 
 	Fixes #53625.
Index: addressbook/gui/widgets/eab-gui-util.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/eab-gui-util.c,v
retrieving revision 1.8
diff -u -3 -p -u -r1.8 eab-gui-util.c
--- addressbook/gui/widgets/eab-gui-util.c	11 Feb 2004 20:29:33 -0000	1.8
+++ addressbook/gui/widgets/eab-gui-util.c	19 Mar 2004 17:32:59 -0000
@@ -351,6 +351,9 @@ eab_select_source (const gchar *title, c
 					      NULL);
 	gtk_window_set_default_size (GTK_WINDOW (dialog), 200, 350);
 
+	g_signal_connect (dialog, "key-press-event",
+	  		  G_CALLBACK (dialog_key_pressed), NULL);
+
 	cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
 	ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
 	gtk_widget_set_sensitive (ok_button, FALSE);
@@ -883,3 +886,14 @@ eab_create_image_chooser_widget(gchar *n
 
 	return w;
 }
+
+static int
+dialog_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
+{
+	if (event->keyval == GDK_Escape) {
+		gtk_widget_destroy (widget);
+		g_signal_stop_emission_by_name (widget, "key-press-event");
+		return TRUE; /* Handled.  */
+	}
+	return FALSE; /* Not handled. */
+}
Index: addressbook/gui/widgets/eab-gui-util.h
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/eab-gui-util.h,v
retrieving revision 1.5
diff -u -3 -p -u -r1.5 eab-gui-util.h
--- addressbook/gui/widgets/eab-gui-util.h	30 Jan 2004 22:52:38 -0000	1.5
+++ addressbook/gui/widgets/eab-gui-util.h	19 Mar 2004 17:32:59 -0000
@@ -70,6 +70,7 @@ GtkWidget *eab_create_image_chooser_widg
 
 ESource            *eab_select_source             (const gchar *title, const gchar *message,
 						   const gchar *select_uid, GtkWindow *parent);
+static int          dialog_key_pressed            (GtkWidget *widget, GdkEventKey *event, gpointer user_data);
 
 G_END_DECLS
 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]