[evolution-kolab/ek-wip-gui: 10/16] EPlugin: extended PIM types config dialog



commit c285acd54e7ba1c0c1707af4ffc6f77a6d0353e6
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Wed Feb 15 17:28:59 2012 +0100

    EPlugin: extended PIM types config dialog
    
    * added widgets for extended user experience:
      - re-use of already configured Kolab accounts
      - list and query button for server folders
    * currently accessible for addressbooks, same
      dialog will be shown for all calendar types

 src/eplugin/e-kolab-account-setup.c |   65 ++++++++++++++++++++++++++--------
 1 files changed, 49 insertions(+), 16 deletions(-)
---
diff --git a/src/eplugin/e-kolab-account-setup.c b/src/eplugin/e-kolab-account-setup.c
index f8f8ea7..24700e0 100644
--- a/src/eplugin/e-kolab-account-setup.c
+++ b/src/eplugin/e-kolab-account-setup.c
@@ -59,9 +59,12 @@ typedef struct {
 	ESource *source;
 	gboolean is_new;
 	GtkWidget *kolab_box;
+	GtkComboBoxText *kolab_accounts_avail;
 	GtkEntry *kolab_servername;
-	GtkEntry *kolab_foldername;
 	GtkEntry *kolab_username;
+	GtkComboBoxText *kolab_folders_avail;
+	GtkButton *retrieve_folder_list;
+	GtkEntry *kolab_foldername;
 	GtkComboBoxText *kolab_conflict_strategy;
 	GtkComboBoxText *encryption_method;
 	GtkCheckButton *require_pkcs11_infrastructure;
@@ -373,10 +376,23 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 
 	/* Server section */
 	section = gtk_label_new (NULL);
-	gtk_label_set_markup (GTK_LABEL (section), "<b>Kolab server settings</b>");
+	gtk_label_set_markup (GTK_LABEL (section), "<b>Kolab Server Settings</b>");
 	gtk_misc_set_alignment (GTK_MISC (section), 0.0, 0.0);
 	gtk_box_pack_start (GTK_BOX (kolab_vbox), section, FALSE, FALSE, 0);
 
+	/* Pre-configured Kolab Mail accounts */
+	hbox = gtk_hbox_new (FALSE, 10);
+	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
+	spacer = gtk_label_new("   ");
+	gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+	label = gtk_label_new_with_mnemonic("Kolab Account:");
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	uidata->kolab_accounts_avail = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
+	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_accounts_avail), TRUE, TRUE, 0);
+	/* FIXME add Kolab accounts to GTK box */
+	g_warning ("%s: FIXME add Kolab accounts to GTK box", __func__);
+	gtk_combo_box_set_active (GTK_COMBO_BOX (uidata->kolab_accounts_avail), 0);
+
 	/* Kolab server option */
 	hbox = gtk_hbox_new (FALSE, 10);
 	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
@@ -387,6 +403,31 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 	uidata->kolab_servername = GTK_ENTRY(gtk_entry_new());
 	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_servername), TRUE, TRUE, 0);
 
+	/* Kolab user name option */
+	hbox = gtk_hbox_new (FALSE, 10);
+	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
+	spacer = gtk_label_new("   ");
+	gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+	label = gtk_label_new_with_mnemonic("User Name:");
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	uidata->kolab_username = GTK_ENTRY(gtk_entry_new());
+	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_username), TRUE, TRUE, 0);
+
+	/* Existing Kolab PIM type folders for selected account */
+	hbox = gtk_hbox_new (FALSE, 10);
+	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
+	spacer = gtk_label_new("   ");
+	gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
+	label = gtk_label_new_with_mnemonic ("Server Folders:");
+	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+	uidata->kolab_folders_avail = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
+	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_folders_avail), TRUE, TRUE, 0);
+	/* FIXME add Kolab PIM folders to GTK box */
+	g_warning ("%s: FIXME add Kolab PIM folders to GTK box", __func__);
+	gtk_combo_box_set_active (GTK_COMBO_BOX (uidata->kolab_folders_avail), 0);
+	uidata->retrieve_folder_list = GTK_BUTTON (gtk_button_new_with_label ("Retrieve"));
+	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->retrieve_folder_list), FALSE, FALSE, 0);
+
 	/* Kolab folder name option */
 	hbox = gtk_hbox_new (FALSE, 10);
 	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
@@ -400,22 +441,12 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 	uidata->kolab_foldername = GTK_ENTRY(gtk_entry_new());
 	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_foldername), TRUE, TRUE, 0);
 
-	/* Kolab user name option */
-	hbox = gtk_hbox_new (FALSE, 10);
-	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
-	spacer = gtk_label_new("   ");
-	gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
-	label = gtk_label_new_with_mnemonic("User name:");
-	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-	uidata->kolab_username = GTK_ENTRY(gtk_entry_new());
-	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_username), TRUE, TRUE, 0);
-
 	/* Encryption setting */
 	hbox = gtk_hbox_new (FALSE, 10);
 	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
 	spacer = gtk_label_new("   ");
 	gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
-	label = gtk_label_new_with_mnemonic("Encryption method:");
+	label = gtk_label_new_with_mnemonic("Encryption Method:");
 	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
 	uidata->encryption_method = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
 	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->encryption_method), TRUE, TRUE, 0);
@@ -429,7 +460,7 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
 	spacer = gtk_label_new("   ");
 	gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
-	label = gtk_label_new_with_mnemonic("PKCS #11 infrastructure:");
+	label = gtk_label_new_with_mnemonic("PKCS #11 Infrastructure:");
 	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
 	uidata->require_pkcs11_infrastructure = GTK_CHECK_BUTTON (gtk_check_button_new_with_label ("PIN:"));
 	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->require_pkcs11_infrastructure), TRUE, TRUE, 0);
@@ -439,7 +470,7 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 
 	/* Options section */
 	section = gtk_label_new (NULL);
-	gtk_label_set_markup (GTK_LABEL (section), "<b>Kolab folder options</b>");
+	gtk_label_set_markup (GTK_LABEL (section), "<b>Kolab Folder Options</b>");
 	gtk_misc_set_alignment (GTK_MISC (section), 0.0, 0.0);
 	gtk_box_pack_start (GTK_BOX (kolab_vbox), section, FALSE, FALSE, 0);
 
@@ -447,7 +478,7 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 	gtk_box_pack_start (GTK_BOX (kolab_vbox), GTK_WIDGET (hbox), TRUE, TRUE, 0);
 	spacer = gtk_label_new ("   ");
 	gtk_box_pack_start (GTK_BOX (hbox), spacer, FALSE, FALSE, 0);
-	label = gtk_label_new_with_mnemonic ("Conflict solving strategy:");
+	label = gtk_label_new_with_mnemonic ("Conflict Solving Strategy:");
 	gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
 	uidata->kolab_conflict_strategy = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ());
 	gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (uidata->kolab_conflict_strategy), TRUE, TRUE, 0);
@@ -500,6 +531,7 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 		                          "changed",
 		                          G_CALLBACK (set_contact_source_from_ui_cb),
 		                          uidata);
+		/* FIXME add signals for new widgets */
 	} else {
 		g_signal_connect_swapped (G_OBJECT (uidata->kolab_username),
 		                          "changed",
@@ -529,6 +561,7 @@ e_kolab_account_setup_backend_create (EPlugin *epl,
 		                          "changed",
 		                          G_CALLBACK (set_calendar_source_from_ui_cb),
 		                          uidata);
+		/* FIXME add signals for new widgets */
 	}
 
 	return NULL;



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