From a05f6a5cb7d0816792080dfeae6c94858c09cf35 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Tue, 30 Jan 2001 01:36:35 +0000 Subject: Remove the FIXME in the glade dialog, and put a nasty hack to change the label of the button to "Import" svn path=/trunk/; revision=7902 --- shell/importer/import.glade | 3 +-- shell/importer/importer.c | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'shell/importer') diff --git a/shell/importer/import.glade b/shell/importer/import.glade index 3ff4cbaee0..d3163c9bbe 100644 --- a/shell/importer/import.glade +++ b/shell/importer/import.glade @@ -90,8 +90,7 @@ importing external files into Evolution. page3 True Import - Click "Finish" to begin importing the file into Evolution. -***FIXME: Change the name of the finish button*** + Click "Import" to begin importing the file into Evolution. 153,174,191 255,255,255 255,255,255 diff --git a/shell/importer/importer.c b/shell/importer/importer.c index 21e110b361..a59ef54a4f 100644 --- a/shell/importer/importer.c +++ b/shell/importer/importer.c @@ -341,6 +341,7 @@ start_import (const char *filename, bonobo_object_unref (BONOBO_OBJECT (icd->client)); gtk_object_unref (GTK_OBJECT (icd->dialog)); g_free (icd); + return; } icd->filename = g_strdup (filename); @@ -544,6 +545,28 @@ prepare_file_page (GnomeDruidPage *page, return FALSE; } +/* Hack to change the Finish button */ +static void +druid_finish_button_change (GnomeDruid *druid) +{ + GtkWidget *button = druid->finish; + GtkWidget *hbox = GTK_BIN (button)->child, *hbox2; + GtkBoxChild *child; + GtkWidget *label; + + /* Get the second item from the children list */ + hbox2 = ((GtkBoxChild *)GTK_BOX (hbox)->children->data)->widget; + + g_return_if_fail (GTK_IS_BOX (hbox2)); + child = (GtkBoxChild *)g_list_nth_data (GTK_BOX (hbox2)->children, 0); + label = child->widget; + + /* Safety check :) */ + g_return_if_fail (GTK_IS_LABEL (label)); + + gtk_label_set_text (GTK_LABEL (label), _("Import")); +} + void show_import_wizard (void) { @@ -560,7 +583,8 @@ show_import_wizard (void) data->druid = glade_xml_get_widget (data->wizard, "druid1"); gtk_signal_connect (GTK_OBJECT (data->druid), "cancel", GTK_SIGNAL_FUNC (import_druid_cancel), data); - + + druid_finish_button_change (GNOME_DRUID (data->druid)); start = GNOME_DRUID_PAGE_START (glade_xml_get_widget (data->wizard, "page1")); data->filedialog = glade_xml_get_widget (data->wizard, "page2"); gtk_signal_connect (GTK_OBJECT (data->filedialog), "prepare", -- cgit