[evolution-kolab/ek-wip-acl: 28/28] EPlugin: new widget folder rights in ACL edit dialog



commit d084e0af4a9caad80621a2d80bee49ccbf67466d
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Oct 8 17:10:31 2012 +0200

    EPlugin: new widget folder rights in ACL edit dialog
    
    * added widget to display the currently set
      access rights for the selected access_id
      and selected folder
    * when adding to the ACL, this widget is
      hidden

 src/eplugin/e-kolab-folder-permissions.c |   24 ++++++++++++++++++++++++
 src/eplugin/e-kolab-folder-permissions.h |    2 ++
 2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-permissions.c b/src/eplugin/e-kolab-folder-permissions.c
index 72d4447..a2bae29 100644
--- a/src/eplugin/e-kolab-folder-permissions.c
+++ b/src/eplugin/e-kolab-folder-permissions.c
@@ -118,6 +118,21 @@ kolab_folder_permissions_ui_add_edit_dialog (KolabFolderPermUIData *uidata)
 	gtk_container_add (GTK_CONTAINER (content), hbox);
 
 	frame = gtk_frame_new (C_("Kolab Folder Permissions",
+	                          "Current Folder Rights"));
+	gtk_container_set_border_width (GTK_CONTAINER (frame), 2);
+	gtk_widget_set_margin_bottom (frame, 4);
+	uidata->widgets->access_rights = frame;
+	label = gtk_label_new (C_("Kolab Folder Permissions",
+	                          "(No access rights retrieved from server)"));
+	gtk_widget_set_margin_left (label, 4);
+	gtk_widget_set_margin_right (label, 4);
+	gtk_widget_set_margin_top (label, 2);
+	gtk_widget_set_margin_bottom (label, 2);
+	uidata->widgets->access_rights_lbl = label;
+	gtk_container_add (GTK_CONTAINER (frame), label);
+	gtk_container_add (GTK_CONTAINER (content), frame);
+
+	frame = gtk_frame_new (C_("Kolab Folder Permissions",
 	                          "IMAP Folder Permissions"));
 	gtk_container_add (GTK_CONTAINER (content), frame);
 
@@ -205,6 +220,15 @@ kolab_folder_permissions_ui_add_edit_dialog (KolabFolderPermUIData *uidata)
 	uidata->widgets->edit_dialog = dialog;
 
 	gtk_widget_show_all (content);
+
+	/* when editing an existing ACL entry, we show
+	 * the current rights string for the selected
+	 * access_id, otherwise we hide it
+	 */
+	if (! uidata->editing) {
+		gtk_widget_hide (uidata->widgets->access_rights);
+	}
+
 	gtk_widget_show (dialog);
 }
 
diff --git a/src/eplugin/e-kolab-folder-permissions.h b/src/eplugin/e-kolab-folder-permissions.h
index c039471..36941f1 100644
--- a/src/eplugin/e-kolab-folder-permissions.h
+++ b/src/eplugin/e-kolab-folder-permissions.h
@@ -59,6 +59,8 @@ struct _KolabFolderPermUIWidgets {
 	/* sub-widgets of add/edit dialog */
 	GtkWidget *edit_entry_box;
 	GtkWidget *edit_btn_retrieve;
+	GtkWidget *access_rights;
+	GtkWidget *access_rights_lbl;
 	GSList *radio_group;
 	GtkWidget *radio_btn_perm_read;
 	GtkWidget *radio_btn_perm_append;



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