[evolution-kolab/ek-wip-acl] EPlugin: update Kolab folder context menu "metadata" tab from folder data
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-acl] EPlugin: update Kolab folder context menu "metadata" tab from folder data
- Date: Tue, 25 Sep 2012 12:52:40 +0000 (UTC)
commit 788a497408a4d128eac9427c39b644334c5e8bd7
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Tue Sep 25 14:49:55 2012 +0200
EPlugin: update Kolab folder context menu "metadata" tab from folder data
* in the "metadata" tab of the "Kolab Folder Properties"
context menu, update the folder type initially displayed
from the actual Kolab folder metadata
* need to implement a check whether or not the settings
have actually changed before writing anything back
to the store
src/eplugin/e-kolab-folder-metadata.c | 41 +++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-metadata.c b/src/eplugin/e-kolab-folder-metadata.c
index 3e38f5f..98bba62 100644
--- a/src/eplugin/e-kolab-folder-metadata.c
+++ b/src/eplugin/e-kolab-folder-metadata.c
@@ -212,6 +212,8 @@ e_kolab_folder_metadata_ui_new (void)
"Show all PIM folders in this Kolab account"));
gtk_container_add (GTK_CONTAINER (uidata->widgets->chk_btn_show_all), widget);
+ /* "show all folders" switch */
+
uidata->widgets->chk_btn_show_all_handler_id =
g_signal_connect (G_OBJECT (uidata->widgets->chk_btn_show_all),
"toggled",
@@ -261,6 +263,7 @@ e_kolab_folder_metadata_ui_update_from_uidata (KolabFolderMetaUIData *uidata)
{
GtkWidget *widget = NULL;
gulong handler_id = 0;
+ guint ii = 0;
g_return_if_fail (uidata != NULL);
g_return_if_fail (E_IS_SHELL_VIEW (uidata->shell_view));
@@ -294,7 +297,45 @@ e_kolab_folder_metadata_ui_update_from_uidata (KolabFolderMetaUIData *uidata)
g_signal_handler_unblock (widget, handler_id);
/* radio button group (current folder type) */
+ for (ii = 0; ii < KOLAB_FOLDER_META_UI_NUM_TYPES; ii++) {
+ g_signal_handler_block (uidata->widgets->radio_btn_type[ii],
+ uidata->widgets->radio_btn_handler_id[ii]);
+ }
+
+ switch (uidata->metadata->foldertype) {
+
+ case KOLAB_FOLDER_TYPE_EVENT:
+ case KOLAB_FOLDER_TYPE_EVENT_DEFAULT:
+ ii = 1;
+ break;
+
+ case KOLAB_FOLDER_TYPE_TASK:
+ case KOLAB_FOLDER_TYPE_TASK_DEFAULT:
+ ii = 2;
+ break;
+
+ case KOLAB_FOLDER_TYPE_NOTE:
+ case KOLAB_FOLDER_TYPE_NOTE_DEFAULT:
+ ii = 3;
+ break;
+
+ case KOLAB_FOLDER_TYPE_CONTACT:
+ case KOLAB_FOLDER_TYPE_CONTACT_DEFAULT:
+ ii = 4;
+ break;
+
+ default:
+ /* all else is regarded email */
+ ii = 0;
+ }
+
+ widget = uidata->widgets->radio_btn_type[ii];
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
+ for (ii = 0; ii < KOLAB_FOLDER_META_UI_NUM_TYPES; ii++) {
+ g_signal_handler_unblock (uidata->widgets->radio_btn_type[ii],
+ uidata->widgets->radio_btn_handler_id[ii]);
+ }
g_warning ("%s: FIXME implement me", __func__);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]