[evolution-patches] Request review my new patch for bug #46017



Hello,
I have maken a new patch for bug #46017 according to Ettore's advice.
Bug Summary:  Incorrect behaviour in import wizard
Bug Link:http://bugzilla.ximian.com/show_bug.cgi?id=46017

Please review my patch.

Best Regard
Antonio Xu


Index: shell/e-shell-importer.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-importer.c,v
retrieving revision 1.56
diff -u -r1.56 e-shell-importer.c
--- shell/e-shell-importer.c	29 Apr 2003 02:40:56 -0000	1.56
+++ shell/e-shell-importer.c	1 Jan 1997 09:02:49 -0000
@@ -146,6 +146,10 @@
 	},
 	{ "intelligent_html",
 	  N_("Please select the information that you would like to import:")
+	},
+	{ "nodata_html",
+	  N_("Evolution didn't find any settings that could be imported\n" 
+	     "from other applications.")
 	}
 };
 #define num_info (sizeof (info) / sizeof (info[0]))
@@ -734,6 +738,7 @@
 	ImportDialogImporterPage *import;
 	GList *l, *importers;
 	GtkWidget *table;
+	GtkLabel *no_data;
 	int running = 0;
 
 	if (data->importerpage->prepared == TRUE) {
@@ -763,8 +768,11 @@
 		/* No importers, go directly to finish, do not pass go
 		   Do not collect $200 */
 		import->running = 0;
-		gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->finish))
-			;
+		no_data = create_help ("nodata_html");
+		gtk_box_pack_start (GTK_BOX (data->importerpage->vbox), no_data,
+				    FALSE, TRUE, 0);
+		gnome_druid_set_buttons_sensitive(GNOME_DRUID (data->druid),
+						  TRUE, FALSE, TRUE, FALSE);
 		gtk_widget_destroy (dialog);
 		return TRUE;
 	}
@@ -887,7 +895,11 @@
 	gtk_widget_show_all (table);
 
 	if (running == 0) {
-		gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->finish));
+		no_data = create_help ("nodata_html");
+		gtk_box_pack_start (GTK_BOX (data->importerpage->vbox), no_data,
+				    FALSE, TRUE, 0);
+		gnome_druid_set_buttons_sensitive(GNOME_DRUID (data->druid),
+						  TRUE, FALSE, TRUE, FALSE);
 		gtk_widget_destroy (dialog);
 		return TRUE;
 	}
@@ -1194,7 +1206,7 @@
 			  G_CALLBACK (next_intelligent_page), data);
 	g_signal_connect (data->intelligent, "back",
 			  G_CALLBACK (back_intelligent_page), data);
-	g_signal_connect (data->intelligent, "prepare",
+	g_signal_connect_after (data->intelligent, "prepare",
 			  G_CALLBACK (prepare_intelligent_page), data);
 
 	data->importerpage = importer_importer_page_new (data);
@@ -1206,7 +1218,7 @@
 	
 
 	data->filedialog = glade_xml_get_widget (data->wizard, "page2-file");
-	g_signal_connect (data->filedialog, "prepare",
+	g_signal_connect_after (data->filedialog, "prepare",
 			  G_CALLBACK (prepare_file_page), data);
 	g_signal_connect (data->filedialog, "next",
 			  G_CALLBACK (next_file_page), data);
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1287
diff -u -r1.1287 ChangeLog
--- shell/ChangeLog	9 Jul 2003 19:54:25 -0000	1.1287
+++ shell/ChangeLog	1 Jan 1997 09:19:01 -0000
@@ -1,3 +1,10 @@
+2003-07-10  Antonio Xu <antonio xu sun com>
+                                                                                        
+        * e-shell-importer.c: (show_import_wizard): use
+        g_signal_connect_after to connect "prepare" signal.
+        (prepare_intelligent_page): Display some error log and disable
+        forward button rather than jump to finish page.  [#46017]
+
 2003-07-09  Ettore Perazzoli  <ettore ximian com>
 
 	* e-shell-folder-commands.c (e_shell_command_rename_folder): Do


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