aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-01-24 22:39:32 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-01-24 22:39:32 +0800
commit601b97decb3c0f34a38eee8d59b5378f4c19de40 (patch)
tree3c6a10db823041bac8b444f269c064ab1aad240f
parent41b8acd59d410521c8e98ccebcce2a72d3e6e1d9 (diff)
downloadgsoc2013-evolution-601b97decb3c0f34a38eee8d59b5378f4c19de40.tar
gsoc2013-evolution-601b97decb3c0f34a38eee8d59b5378f4c19de40.tar.gz
gsoc2013-evolution-601b97decb3c0f34a38eee8d59b5378f4c19de40.tar.bz2
gsoc2013-evolution-601b97decb3c0f34a38eee8d59b5378f4c19de40.tar.lz
gsoc2013-evolution-601b97decb3c0f34a38eee8d59b5378f4c19de40.tar.xz
gsoc2013-evolution-601b97decb3c0f34a38eee8d59b5378f4c19de40.tar.zst
gsoc2013-evolution-601b97decb3c0f34a38eee8d59b5378f4c19de40.zip
Disabling auth sections in druid, and having it only in editor.
svn path=/trunk/; revision=28526
-rw-r--r--plugins/exchange-account-setup/exchange-account-setup.c2
-rw-r--r--plugins/exchange-account-setup/exchange-ask-password.c71
-rw-r--r--plugins/exchange-account-setup/org-gnome-exchange-account-setup.eplug.in9
3 files changed, 80 insertions, 2 deletions
diff --git a/plugins/exchange-account-setup/exchange-account-setup.c b/plugins/exchange-account-setup/exchange-account-setup.c
index 5448a7ec79..4d4fd6187d 100644
--- a/plugins/exchange-account-setup/exchange-account-setup.c
+++ b/plugins/exchange-account-setup/exchange-account-setup.c
@@ -326,7 +326,7 @@ add_owa_entry_to_editor (GtkWidget *parent, EConfig *config,
gtk_entry_set_text (GTK_ENTRY (owa_entry), url_value);
gtk_widget_show (owa_entry);
- button = gtk_button_new_from_stock (GTK_STOCK_OK);
+ button = gtk_button_new_with_mnemonic (_("A_uthenticate"));
gtk_widget_set_sensitive (button, FALSE);
gtk_widget_show (button);
diff --git a/plugins/exchange-account-setup/exchange-ask-password.c b/plugins/exchange-account-setup/exchange-ask-password.c
index c0798b97ca..c21bd67c07 100644
--- a/plugins/exchange-account-setup/exchange-ask-password.c
+++ b/plugins/exchange-account-setup/exchange-ask-password.c
@@ -190,7 +190,7 @@ add_owa_entry (GtkWidget *parent,
owa_entry = gtk_entry_new ();
gtk_widget_show (owa_entry);
- button = gtk_button_new_from_stock (GTK_STOCK_OK);
+ button = gtk_button_new_with_mnemonic (_("A_uthenticate"));
gtk_widget_set_sensitive (button, FALSE);
gtk_widget_show (button);
@@ -247,6 +247,75 @@ org_gnome_exchange_read_url (EPlugin *epl, EConfigHookItemFactoryData *data)
return owa_entry;
}
+
+GtkWidget *
+org_gnome_exchange_handle_auth (EPlugin *epl, EConfigHookItemFactoryData *data)
+{
+ EMConfigTargetAccount *target_account;
+ EConfig *config;
+ char *account_url = NULL, *exchange_url = NULL, *url_string;
+ const char *source_url;
+ char *auth_type;
+ GtkWidget *auth_section=NULL, *parent, *section;
+
+ config = data->config;
+ target_account = (EMConfigTargetAccount *)data->config->target;
+
+ source_url = e_account_get_string (target_account->account,
+ E_ACCOUNT_SOURCE_URL);
+ account_url = g_strdup (source_url);
+ exchange_url = g_strrstr (account_url, "exchange");
+
+ if (exchange_url) {
+ parent = data->parent;
+
+ /* We don't need auth section while creating the account. But
+ * we need that in the Editor. And since we get the child vbox
+ * from the plugin, we are finding the parent section and
+ * hiding it. This is a temporary fix and this needs to be handled
+ * in the proper way. */
+ section = gtk_widget_get_parent (gtk_widget_get_parent (parent));
+ gtk_widget_hide (section);
+ }
+ auth_section = gtk_entry_new ();
+ gtk_widget_hide (auth_section);
+ return auth_section;
+}
+
+GtkWidget *
+org_gnome_exchange_handle_send_auth_option (EPlugin *epl, EConfigHookItemFactoryData *data)
+{
+ EMConfigTargetAccount *target_account;
+ EConfig *config;
+ char *account_url = NULL, *exchange_url = NULL, *url_string;
+ const char *source_url;
+ char *auth_type;
+ GtkWidget *auth_section=NULL, *parent, *section;
+
+ config = data->config;
+ target_account = (EMConfigTargetAccount *)data->config->target;
+
+ source_url = e_account_get_string (target_account->account,
+ E_ACCOUNT_SOURCE_URL);
+ account_url = g_strdup (source_url);
+ exchange_url = g_strrstr (account_url, "exchange");
+
+ if (exchange_url) {
+ parent = data->parent;
+ /* We don't need auth section while creating the account. But
+ * we need that in the Editor. And since we get the child vbox
+ * from the plugin, we are finding the parent section and
+ * hiding it. This is a temporary fix and this needs to be handled
+ * in the proper way. */
+ section = gtk_widget_get_parent (
+ gtk_widget_get_parent (gtk_widget_get_parent(parent)));
+ gtk_widget_hide (section);
+ }
+ auth_section = gtk_entry_new ();
+ gtk_widget_hide (auth_section);
+ return auth_section;
+}
+
gboolean
org_gnome_exchange_check_options (EPlugin *epl, EConfigHookPageCheckData *data)
{
diff --git a/plugins/exchange-account-setup/org-gnome-exchange-account-setup.eplug.in b/plugins/exchange-account-setup/org-gnome-exchange-account-setup.eplug.in
index 251824f96d..6542cf8313 100644
--- a/plugins/exchange-account-setup/org-gnome-exchange-account-setup.eplug.in
+++ b/plugins/exchange-account-setup/org-gnome-exchange-account-setup.eplug.in
@@ -29,6 +29,15 @@
<item type="section"
path="10.receive/00.config"
factory="org_gnome_exchange_read_url"/>
+ <item type="section"
+ path="10.receive/00.config"
+ label=""/>
+ <item type="item"
+ path="10.receive/30.auth/00.hide"
+ factory="org_gnome_exchange_handle_auth"/>
+ <item type="item"
+ path="30.send/30.auth/00.hide"
+ factory="org_gnome_exchange_handle_send_auth_option"/>
</group>
<group
target="account"