[evolution-kolab/ek-wip-acl] EPlugin: added label for IMAP ACL MYRIGHTS display
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-acl] EPlugin: added label for IMAP ACL MYRIGHTS display
- Date: Tue, 31 Jul 2012 13:43:33 +0000 (UTC)
commit 72a41248c8637bc73340da4991769b419c1bfe8a
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Tue Jul 31 15:10:05 2012 +0200
EPlugin: added label for IMAP ACL MYRIGHTS display
* when retrieving the ACL for an IMAP folder from
the server, we retrieve the folder MYRIGHTS first
and display them
* this lets us determine whether at all the user
has administrative rights to edit folder ACL
* if the 'a' flag is missing from the MYRIGHTS
string, we will deactivate the add/edit/delete
buttons (we may still be able to get the ACL
for the folder, in which case we display it
in the treeview)
src/eplugin/e-kolab-folder-permissions.c | 19 +++++++++++++++++++
src/eplugin/e-kolab-folder-permissions.h | 2 ++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-permissions.c b/src/eplugin/e-kolab-folder-permissions.c
index 4e461d6..e7a63fc 100644
--- a/src/eplugin/e-kolab-folder-permissions.c
+++ b/src/eplugin/e-kolab-folder-permissions.c
@@ -322,6 +322,8 @@ e_kolab_folder_permissions_ui_new (void)
KolabFolderPermUIData *uidata = g_new0 (KolabFolderPermUIData, 1);
GtkGrid *grid = NULL;
GtkWidget *vbox = NULL;
+ GtkWidget *myrights = NULL;
+ GtkWidget *myrights_lbl = NULL;
GtkWidget *treeview = NULL;
gint row = 0;
@@ -342,6 +344,23 @@ e_kolab_folder_permissions_ui_new (void)
row = 0;
+ myrights = gtk_frame_new (C_("Kolab Folder Permissions",
+ "My Folder Rights"));
+ gtk_container_set_border_width (GTK_CONTAINER (myrights), 2);
+ gtk_widget_set_margin_bottom (myrights, 4);
+ uidata->widgets->myrights = myrights;
+ myrights_lbl = gtk_label_new (C_("Kolab Folder Permissions",
+ "(No access rights retrieved from server)"));
+ gtk_widget_set_margin_left (myrights_lbl, 4);
+ gtk_widget_set_margin_right (myrights_lbl, 4);
+ gtk_widget_set_margin_top (myrights_lbl, 2);
+ gtk_widget_set_margin_bottom (myrights_lbl, 2);
+ uidata->widgets->myrights_lbl = myrights;
+ gtk_container_add (GTK_CONTAINER (myrights), myrights_lbl);
+ gtk_grid_attach (GTK_GRID (grid), myrights, 0, row, 2, 1);
+
+ row++;
+
/* permissions tree view */
treeview = kolab_folder_permissions_ui_create_tree_view (uidata);
/* gtk_container_set_resize_mode (GTK_CONTAINER (treeview), GTK_RESIZE_QUEUE); */
diff --git a/src/eplugin/e-kolab-folder-permissions.h b/src/eplugin/e-kolab-folder-permissions.h
index 7160c91..add3fef 100644
--- a/src/eplugin/e-kolab-folder-permissions.h
+++ b/src/eplugin/e-kolab-folder-permissions.h
@@ -45,6 +45,8 @@ typedef struct _KolabFolderPermUIWidgets KolabFolderPermUIWidgets;
struct _KolabFolderPermUIWidgets {
GtkWidget *container;
/* sub-widgets of container */
+ GtkWidget *myrights;
+ GtkWidget *myrights_lbl;
GtkWidget *treeview;
GtkWidget *btn_add;
GtkWidget *btn_edit;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]