[evolution-kolab/ek-wip-acl: 27/28] EPlugin: deactivate access_id dropdown in ACL edit dialog



commit b196ea7b3935aa59dd654b81f35146a2f115260a
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Oct 8 16:34:36 2012 +0200

    EPlugin: deactivate access_id dropdown in ACL edit dialog
    
    * when editing an existing ACL entry, we use the
      dropdown combo box for displaying the clicked
      access_id only

 src/eplugin/e-kolab-folder-permissions.c |   11 +++++++++++
 src/eplugin/e-kolab-folder-permissions.h |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-permissions.c b/src/eplugin/e-kolab-folder-permissions.c
index 8c5a3bf..72d4447 100644
--- a/src/eplugin/e-kolab-folder-permissions.c
+++ b/src/eplugin/e-kolab-folder-permissions.c
@@ -181,6 +181,15 @@ kolab_folder_permissions_ui_add_edit_dialog (KolabFolderPermUIData *uidata)
 	gtk_widget_set_sensitive (uidata->widgets->edit_btn_retrieve,
 	                          FALSE);
 
+	/* when editing an existing ACL entry, we use the
+	 * dropdown combo box for displaying the clicked
+	 * access_id only
+	 */
+	if (uidata->editing) {
+		gtk_widget_set_sensitive (uidata->widgets->edit_entry_box,
+		                          FALSE);
+	}
+
 	/* FIXME connect signals */
 	g_warning ("%s: FIXME connect signals", __func__);
 
@@ -205,6 +214,7 @@ kolab_folder_permissions_ui_add_dialog_cb (KolabFolderPermUIData *uidata)
 	g_assert (uidata != NULL);
 	g_assert (uidata->widgets != NULL);
 
+	uidata->editing = FALSE;
 	kolab_folder_permissions_ui_add_edit_dialog (uidata);
 }
 
@@ -214,6 +224,7 @@ kolab_folder_permissions_ui_edit_dialog_cb (KolabFolderPermUIData *uidata)
 	g_assert (uidata != NULL);
 	g_assert (uidata->widgets != NULL);
 
+	uidata->editing = TRUE;
 	kolab_folder_permissions_ui_add_edit_dialog (uidata);
 }
 
diff --git a/src/eplugin/e-kolab-folder-permissions.h b/src/eplugin/e-kolab-folder-permissions.h
index 1939e88..c039471 100644
--- a/src/eplugin/e-kolab-folder-permissions.h
+++ b/src/eplugin/e-kolab-folder-permissions.h
@@ -75,6 +75,7 @@ struct _KolabFolderPermUIData {
 	KolabDataFolderPermissions *permissions;
 	gchar *foldername;
 	gchar *sourcename;
+	gboolean editing;
 };
 
 /*----------------------------------------------------------------------------*/



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