aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog18
-rw-r--r--mail/mail-account-editor.c8
-rw-r--r--mail/mail-accounts.c7
-rw-r--r--mail/mail-callbacks.c2
-rw-r--r--mail/mail-config-druid.c100
-rw-r--r--mail/mail-config-druid.glade18
6 files changed, 130 insertions, 23 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d51f546553..36e766c5ac 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,21 @@
+2001-01-08 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * mail-config-druid.c: A bunch of fixes.
+
+ * mail-accounts.c: More fixes...
+
+ * mail-account-editor.c (construct): Reparent the notebook to the
+ editor->vbox and set the resize policy.
+
+2001-01-07 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * mail-callbacks.c (providers_config): Use a
+ gnome_dialog_run_and_close().
+
+ * mail-accounts.c (construct): Reparent the notebook to the
+ dialog->vbox not to the dialog itself. Also set the resize policy
+ to allow the user to stretch it.
+
2001-01-07 Jeffrey Stedfast <fejj@helixcode.com>
* mail-tools.c (mail_tool_quote_message): Updated to reflect
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 1efbfec9d0..6d25d54a0a 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -391,14 +391,16 @@ construct (MailAccountEditor *editor, const MailConfigAccount *account)
notebook = glade_xml_get_widget (gui, "notebook");
/* reparent */
- gtk_widget_reparent (notebook, GTK_WIDGET (editor));
+ gtk_widget_reparent (notebook, GNOME_DIALOG (editor)->vbox);
/* give our dialog an OK button and title */
gtk_window_set_title (GTK_WINDOW (editor), _("Evolution Account Editor"));
+ gtk_window_set_policy (GTK_WINDOW (editor), FALSE, TRUE, TRUE);
gnome_dialog_append_buttons (GNOME_DIALOG (editor),
GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_APPLY,
- GNOME_STOCK_BUTTON_CANCEL);
+ GNOME_STOCK_BUTTON_CANCEL,
+ NULL);
gnome_dialog_button_connect (GNOME_DIALOG (editor), 0 /* OK */,
GTK_SIGNAL_FUNC (ok_clicked),
@@ -415,7 +417,7 @@ construct (MailAccountEditor *editor, const MailConfigAccount *account)
gtk_entry_set_text (editor->account_name, account->name);
editor->name = GTK_ENTRY (glade_xml_get_widget (gui, "txtName"));
gtk_entry_set_text (editor->name, account->id->name);
- editor->email = GTK_ENTRY (glade_xml_get_widget (gui, "txtEMail"));
+ editor->email = GTK_ENTRY (glade_xml_get_widget (gui, "txtAddress"));
gtk_entry_set_text (editor->email, account->id->address);
editor->reply_to = GTK_ENTRY (glade_xml_get_widget (gui, "txtReplyTo"));
gtk_entry_set_text (editor->reply_to, account->id->reply_to);
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index 952342cfc1..6d6d9b9fce 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -326,11 +326,12 @@ construct (MailAccountsDialog *dialog)
notebook = glade_xml_get_widget (gui, "notebook");
/* reparent */
- gtk_widget_reparent (notebook, GTK_WIDGET (dialog));
+ gtk_widget_reparent (notebook, GNOME_DIALOG (dialog)->vbox);
/* give our dialog an OK button and title */
- gnome_dialog_construct (GNOME_DIALOG (dialog), _("Evolution Accounts"),
- GNOME_STOCK_BUTTON_OK);
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Evolution Account Manager"));
+ gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, TRUE);
+ gnome_dialog_append_button (GNOME_DIALOG (dialog), GNOME_STOCK_BUTTON_OK);
dialog->mail_accounts = GTK_CLIST (glade_xml_get_widget (gui, "clistAccounts"));
gtk_signal_connect (GTK_OBJECT (dialog->mail_accounts), "select-row",
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index ab461a6b04..3f59d474e5 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -948,7 +948,7 @@ providers_config (BonoboUIComponent *uih, void *user_data, const char *path)
MailAccountsDialog *dialog;
dialog = mail_accounts_dialog_new ((FOLDER_BROWSER (user_data))->shell);
- gtk_widget_show (GTK_WIDGET (dialog));
+ gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
}
/*
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 1a7ae15312..f1af22136a 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -36,6 +36,9 @@
extern CamelSession *session;
+GtkWidget *mail_config_create_html (const char *name, const char *str1, const char *str2,
+ int int1, int int2);
+
static void mail_config_druid_class_init (MailConfigDruidClass *class);
static void mail_config_druid_init (MailConfigDruid *druid);
static void mail_config_druid_finalise (GtkObject *obj);
@@ -129,7 +132,7 @@ html_size_req (GtkWidget *widget, GtkRequisition *requisition)
requisition->height = GTK_LAYOUT (widget)->height;
}
-static GtkWidget *
+GtkWidget *
mail_config_create_html (const char *name, const char *str1, const char *str2,
int int1, int int2)
{
@@ -332,7 +335,7 @@ incoming_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
/* If we can't connect, don't let them continue. */
if (!mail_config_check_service (url, CAMEL_PROVIDER_STORE, &authtypes)) {
camel_url_free (url);
- return TRUE;
+ return FALSE;
}
camel_url_free (url);
@@ -343,7 +346,7 @@ incoming_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
}
/* Otherwise, skip to transport page. */
- transport_page = glade_xml_get_widget (config->gui, "transport-page");
+ transport_page = glade_xml_get_widget (config->gui, "druidTransportPage");
gnome_druid_set_page (config->druid, GNOME_DRUID_PAGE (transport_page));
return TRUE;
@@ -681,23 +684,108 @@ set_defaults (MailConfigDruid *druid)
gtk_option_menu_set_menu (druid->outgoing_type, transports);
}
+static gboolean
+start_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
+{
+ return FALSE;
+}
+
+static struct {
+ char *name;
+ GtkSignalFunc next_func;
+ GtkSignalFunc prepare_func;
+ GtkSignalFunc back_func;
+ GtkSignalFunc finish_func;
+} pages[] = {
+ { "druidStartPage",
+ GTK_SIGNAL_FUNC (start_next),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL) },
+ { "druidIdentityPage",
+ GTK_SIGNAL_FUNC (identity_next),
+ GTK_SIGNAL_FUNC (identity_prepare),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL) },
+ { "druidSourcePage",
+ GTK_SIGNAL_FUNC (incoming_next),
+ GTK_SIGNAL_FUNC (incoming_prepare),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL) },
+ { "druidAuthPage",
+ GTK_SIGNAL_FUNC (authentication_next),
+ GTK_SIGNAL_FUNC (authentication_prepare),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL) },
+ { "druidTransportPage",
+ GTK_SIGNAL_FUNC (transport_next),
+ GTK_SIGNAL_FUNC (transport_prepare),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL) },
+ { "druidManagementPage",
+ GTK_SIGNAL_FUNC (management_next),
+ GTK_SIGNAL_FUNC (management_prepare),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL) },
+ { "druidFinishPage",
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (druid_finish) },
+ { NULL,
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (NULL) }
+};
+
static void
construct (MailConfigDruid *druid)
{
GladeXML *gui;
GtkWidget *widget;
+ int i;
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config-druid.glade", "mail-config-window");
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config-druid.glade", "mail-config-druid");
druid->gui = gui;
/* get our toplevel widget */
- widget = glade_xml_get_widget (gui, "gnome-config-druid");
+ widget = glade_xml_get_widget (gui, "druid");
/* reparent */
gtk_widget_reparent (widget, GTK_WIDGET (druid));
druid->druid = GNOME_DRUID (widget);
+ /* set window title */
+ gtk_window_set_title (GTK_WINDOW (druid), _("Evolution Account Wizard"));
+ gtk_window_set_policy (GTK_WINDOW (druid), FALSE, TRUE, TRUE);
+
+ /* attach to druid page signals */
+ i = 0;
+ while (pages[i].name) {
+ GnomeDruidPage *page;
+
+ page = GNOME_DRUID_PAGE (glade_xml_get_widget (gui, pages[i].name));
+
+ if (pages[i].next_func)
+ gtk_signal_connect (GTK_OBJECT (page), "next",
+ pages[i].next_func, druid);
+ if (pages[i].prepare_func)
+ gtk_signal_connect (GTK_OBJECT (page), "prepare",
+ pages[i].prepare_func, druid);
+ if (pages[i].back_func)
+ gtk_signal_connect (GTK_OBJECT (page), "back",
+ pages[i].back_func, druid);
+ if (pages[i].finish_func)
+ gtk_signal_connect (GTK_OBJECT (page), "finish",
+ pages[i].finish_func, druid);
+
+ i++;
+ }
+ gtk_signal_connect (GTK_OBJECT (druid->druid), "cancel",
+ druid_cancel, druid);
+
/* get our cared-about widgets */
druid->account_text = glade_xml_get_widget (gui, "htmlAccountInfo");
druid->account_name = GTK_ENTRY (glade_xml_get_widget (gui, "txtAccountName"));
@@ -734,8 +822,6 @@ construct (MailConfigDruid *druid)
gtk_signal_connect (GTK_OBJECT (druid->outgoing_hostname), "changed", transport_changed, druid);
druid->outgoing_requires_auth = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chkTransportNeedsAuth"));
- glade_xml_signal_autoconnect (gui);
-
set_defaults (druid);
gnome_druid_set_buttons_sensitive (druid->druid, FALSE, TRUE, TRUE);
diff --git a/mail/mail-config-druid.glade b/mail/mail-config-druid.glade
index 694e2aefea..4b14f39919 100644
--- a/mail/mail-config-druid.glade
+++ b/mail/mail-config-druid.glade
@@ -33,7 +33,7 @@
<widget>
<class>GnomeDruid</class>
- <name>mail-config-druid</name>
+ <name>druid</name>
<signal>
<name>cancel</name>
<handler>druid_cancel</handler>
@@ -42,7 +42,7 @@
<widget>
<class>GnomeDruidPageStart</class>
- <name>druidpagestart1</name>
+ <name>druidStartPage</name>
<title>Mail Configuration</title>
<text>Welcome to the Evolution Mail Configuration Druid.
@@ -57,7 +57,7 @@ Click &quot;Next&quot; to begin. </text>
<widget>
<class>GnomeDruidPageStandard</class>
- <name>identity-page</name>
+ <name>druidIdentityPage</name>
<signal>
<name>prepare</name>
<handler>identity_prepare</handler>
@@ -443,7 +443,7 @@ Click &quot;Next&quot; to begin. </text>
<widget>
<class>GnomeDruidPageStandard</class>
- <name>source-page</name>
+ <name>druidSourcePage</name>
<signal>
<name>prepare</name>
<handler>incoming_prepare</handler>
@@ -797,7 +797,7 @@ Click &quot;Next&quot; to begin. </text>
<widget>
<class>GnomeDruidPageStandard</class>
- <name>authentication-page</name>
+ <name>druidAuthPage</name>
<signal>
<name>prepare</name>
<handler>authentication_prepare</handler>
@@ -1001,7 +1001,7 @@ Click &quot;Next&quot; to begin. </text>
<widget>
<class>GnomeDruidPageStandard</class>
- <name>transport-page</name>
+ <name>druidTransportPage</name>
<signal>
<name>prepare</name>
<handler>transport_prepare</handler>
@@ -1238,7 +1238,7 @@ Click &quot;Next&quot; to begin. </text>
<widget>
<class>GnomeDruidPageStandard</class>
- <name>management-page</name>
+ <name>druidManagementPage</name>
<signal>
<name>prepare</name>
<handler>management_prepare</handler>
@@ -1394,7 +1394,7 @@ Click &quot;Next&quot; to begin. </text>
<widget>
<class>GnomeDruidPageFinish</class>
- <name>druidpagefinish1</name>
+ <name>druidFinishPage</name>
<title>Done</title>
<text>Congratulations, your mail configuration is complete.
@@ -1675,7 +1675,7 @@ Click &quot;Finish&quot; to save your settings.</text>
<widget>
<class>GtkEntry</class>
- <name>txtEMail</name>
+ <name>txtAddress</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>