diff options
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 50 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.glade | 69 |
2 files changed, 92 insertions, 27 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 6c5d4c9d99..e72d803fd5 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -28,15 +28,14 @@ struct _AddressbookSourceDialog { GtkWidget *name; GtkWidget *host; + GtkWidget *email; + GtkWidget *email_label; GtkWidget *port; GtkWidget *rootdn; GtkWidget *scope_optionmenu; AddressbookLDAPScopeType ldap_scope; GtkWidget *auth_checkbutton; -#if the_ui_gods_smile_upon_me - GtkWidget *remember_checkbutton; -#endif gint id; /* button we closed the dialog with */ @@ -82,10 +81,10 @@ auth_checkbutton_changed (GtkWidget *item, AddressbookSourceDialog *dialog) /* make sure the change is reflected by the state of the dialog's OK button */ addressbook_source_edit_changed (item, dialog); -#if the_ui_gods_smile_upon_me - gtk_widget_set_sensitive (dialog->remember_checkbutton, + gtk_widget_set_sensitive (dialog->email_label, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton))); -#endif + gtk_entry_set_editable (GTK_ENTRY(dialog->email), + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton))); } static void @@ -129,6 +128,7 @@ addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, Addressbo { e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->name), source ? source->name : ""); e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->host), source ? source->host : ""); + e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->email), source ? source->email_addr : ""); e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->port), source ? source->port : "389"); e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->rootdn), source ? source->rootdn : ""); @@ -136,9 +136,8 @@ addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, Addressbo dialog->ldap_scope = source ? source->scope : ADDRESSBOOK_LDAP_SCOPE_ONELEVEL; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton), source && source->auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE); -#if the_ui_gods_smile_upon_me - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->remember_checkbutton), source && source->remember_passwd); -#endif + gtk_widget_set_sensitive (dialog->email_label, source && source->auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE); + gtk_entry_set_editable (GTK_ENTRY(dialog->email), source && source->auth == ADDRESSBOOK_LDAP_AUTH_SIMPLE); } static AddressbookSource * @@ -146,15 +145,14 @@ addressbook_source_dialog_get_source (AddressbookSourceDialog *dialog) { AddressbookSource *source = g_new0 (AddressbookSource, 1); - source->name = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->name)); - source->host = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->host)); - source->port = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->port)); - source->rootdn = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->rootdn)); - source->scope = dialog->ldap_scope; - source->auth = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->auth_checkbutton)) ? ADDRESSBOOK_LDAP_AUTH_SIMPLE : ADDRESSBOOK_LDAP_AUTH_NONE; -#if the_ui_gods_smile_upon_me - source->remember_passwd = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->remember_checkbutton)); -#endif + source->name = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->name)); + source->host = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->host)); + source->email_addr = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->email)); + source->port = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->port)); + source->rootdn = e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->rootdn)); + source->scope = dialog->ldap_scope; + source->auth = (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->auth_checkbutton)) + ? ADDRESSBOOK_LDAP_AUTH_SIMPLE : ADDRESSBOOK_LDAP_AUTH_NONE); addressbook_storage_init_source_uri (source); @@ -209,20 +207,18 @@ addressbook_source_dialog (GladeXML *gui, AddressbookSource *source, GtkWidget * GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog); add_focus_handler (dialog->host, dialog->basic_notebook, 1); + dialog->email = glade_xml_get_widget (gui, "email-address-entry"); + gtk_signal_connect (GTK_OBJECT (dialog->email), "changed", + GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog); + add_focus_handler (dialog->email, dialog->basic_notebook, 2); + + dialog->email_label = glade_xml_get_widget (gui, "email-address-label"); + dialog->auth_checkbutton = glade_xml_get_widget (gui, "auth-checkbutton"); add_focus_handler (dialog->auth_checkbutton, dialog->basic_notebook, 2); gtk_signal_connect (GTK_OBJECT (dialog->auth_checkbutton), "toggled", GTK_SIGNAL_FUNC (auth_checkbutton_changed), dialog); -#if the_ui_gods_smile_upon_me - dialog->remember_checkbutton = glade_xml_get_widget (gui, "remember-checkbutton"); - add_focus_handler (dialog->auth_checkbutton, dialog->basic_notebook, 3); - gtk_signal_connect (GTK_OBJECT (dialog->remember_checkbutton), "toggled", - GTK_SIGNAL_FUNC (addressbook_source_edit_changed), dialog); - gtk_widget_set_sensitive (dialog->remember_checkbutton, - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton))); -#endif - /* ADVANCED STUFF */ dialog->port = glade_xml_get_widget (gui, "port-entry"); gtk_signal_connect (GTK_OBJECT (dialog->port), "changed", diff --git a/addressbook/gui/component/addressbook-config.glade b/addressbook/gui/component/addressbook-config.glade index 3e34388548..50241167c2 100644 --- a/addressbook/gui/component/addressbook-config.glade +++ b/addressbook/gui/component/addressbook-config.glade @@ -255,6 +255,50 @@ </widget> <widget> + <class>GtkHBox</class> + <name>hbox4</name> + <homogeneous>False</homogeneous> + <spacing>0</spacing> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + + <widget> + <class>GtkLabel</class> + <name>email-address-label</name> + <label>Email Address:</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> + <class>GtkEntry</class> + <name>email-address-entry</name> + <can_focus>True</can_focus> + <editable>True</editable> + <text_visible>True</text_visible> + <text_max_length>0</text_max_length> + <text></text> + <child> + <padding>0</padding> + <expand>True</expand> + <fill>True</fill> + </child> + </widget> + </widget> + + <widget> <class>GtkNotebook</class> <name>basic-notebook</name> <show_tabs>False</show_tabs> @@ -319,6 +363,31 @@ <xpad>0</xpad> <ypad>0</ypad> </widget> + + <widget> + <class>GtkLabel</class> + <name>label48</name> + <label>Evolution will use this email address to authenticate you with the server</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>True</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> + + <widget> + <class>GtkLabel</class> + <child_name>Notebook:tab</child_name> + <name>label47</name> + <label>label47</label> + <justify>GTK_JUSTIFY_CENTER</justify> + <wrap>False</wrap> + <xalign>0.5</xalign> + <yalign>0.5</yalign> + <xpad>0</xpad> + <ypad>0</ypad> + </widget> </widget> </widget> |