? patch.diff
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1078
diff -u -p -r1.1078 ChangeLog
--- ChangeLog	17 Jun 2002 19:04:07 -0000	1.1078
+++ ChangeLog	21 Jun 2002 14:38:02 -0000
@@ -1,3 +1,11 @@
+2002-06-21  Sean Atkinson  <sean@cantab.net>
+
+	* gui/component/addressbook-config.c (addressbook_edit_server_dialog):
+	remove source argument (get it from the dialog).
+	(edit_source_clicked): same.
+	(sources_table_double_click): added to edit server by double-clicking.
+	(ldap_dialog_new): use sources_table_double_click.
+
 2002-06-17  Chris Toshok  <toshok@ximian.com>
 
 	* gui/widgets/e-addressbook-view.c (e_addressbook_view_save_as):
Index: gui/component/addressbook-config.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-config.c,v
retrieving revision 1.30
diff -u -p -r1.30 addressbook-config.c
--- gui/component/addressbook-config.c	24 May 2002 19:45:11 -0000	1.30
+++ gui/component/addressbook-config.c	21 Jun 2002 14:38:03 -0000
@@ -1300,12 +1300,14 @@ edit_dialog_ok_clicked (GtkWidget *item,
 }
 
 static AddressbookSourceDialog*
-addressbook_edit_server_dialog (AddressbookDialog *dialog, AddressbookSource *source, int model_row)
+addressbook_edit_server_dialog (AddressbookDialog *dialog, int model_row)
 {
+	AddressbookSource *source = e_table_memory_get_data (E_TABLE_MEMORY(dialog->sourcesModel), model_row);
 	AddressbookSourceDialog *sdialog = g_new0 (AddressbookSourceDialog, 1);
 	GtkWidget *general_tab_help;
 	GtkWidget *fewer_options_button, *more_options_button;
 
+
 	sdialog->addressbook_dialog = dialog;
 	sdialog->source_model_row = model_row;
 
@@ -1425,9 +1427,7 @@ edit_source_clicked (GtkWidget *widget, 
 
 	for (i = 0; i < row_count; i ++) {
 		if (e_selection_model_is_row_selected (selection_model, i)) {
-			AddressbookSource *source = e_table_memory_get_data (E_TABLE_MEMORY(dialog->sourcesModel), i);
-			AddressbookSourceDialog *sdialog;
-			sdialog = addressbook_edit_server_dialog (dialog, source, i);
+			addressbook_edit_server_dialog (dialog, i);
 			break; /* single select so we're done now */
 		}
 	}
@@ -1523,12 +1523,20 @@ sources_selection_changed (ESelectionMod
 	gtk_widget_set_sensitive (dialog->deleteSource, sensitive);
 }
 
+static void
+sources_table_double_click (ETable *et, int row, int col, GdkEvent *event, AddressbookDialog *dialog)
+{
+	addressbook_edit_server_dialog (dialog, row);
+}
+
+
 static AddressbookDialog *
 ldap_dialog_new (GNOME_Evolution_Shell shell)
 {
 	AddressbookDialog *dialog;
 	GList *l;
 	ESelectionModel *esm;
+	ETable *et;
 
 	dialog = g_new0 (AddressbookDialog, 1);
 
@@ -1536,6 +1544,10 @@ ldap_dialog_new (GNOME_Evolution_Shell s
 	dialog->shell = shell;
 
 	dialog->sourcesTable = glade_xml_get_widget (dialog->gui, "sourcesTable");
+	et = e_table_scrolled_get_table (E_TABLE_SCROLLED(dialog->sourcesTable));
+	gtk_signal_connect (GTK_OBJECT (et), "double_click",
+			    GTK_SIGNAL_FUNC (sources_table_double_click), dialog);
+	
 	dialog->sourcesModel = gtk_object_get_data (GTK_OBJECT (dialog->sourcesTable), "model");
 	
 	dialog->addSource = glade_xml_get_widget (dialog->gui, "addSource");
@@ -1563,7 +1575,7 @@ ldap_dialog_new (GNOME_Evolution_Shell s
 					     -1, source, source->name, source->host);
 	}
 
-	esm = e_table_get_selection_model (e_table_scrolled_get_table (E_TABLE_SCROLLED(dialog->sourcesTable)));
+	esm = e_table_get_selection_model (et);
 	gtk_signal_connect (GTK_OBJECT (esm), "selection_changed",
 			    GTK_SIGNAL_FUNC (sources_selection_changed), dialog);
 
@@ -1596,7 +1608,7 @@ addressbook_dialog_create_sources_table 
 {
 	GtkWidget *table;
 	ETableModel *model;
-	
+
 	model = e_table_memory_store_new (sources_table_columns);
 
 	table = e_table_scrolled_new (model, NULL, SOURCES_TABLE_SPEC, NULL);
