[evolution-kolab/ek-wip-acl: 26/28] EPlugin: differentiate callback paths for add/edit ACL
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-acl: 26/28] EPlugin: differentiate callback paths for add/edit ACL
- Date: Mon, 8 Oct 2012 15:13:33 +0000 (UTC)
commit c355a22e31fc5a7aaa42484c7087e6f4a98a8d6b
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Mon Oct 8 16:16:52 2012 +0200
EPlugin: differentiate callback paths for add/edit ACL
* though the dialogs for adding / editing ACL will be
mostly identical, we will need to accomodate for a
few differences:
- when editing, we'll need to show the current setting,
and the combo box will just display the access_id
(no select / edit)
- when adding, we'll need to hide the "current setting"
widget, since there will be no current setting yet
* since the logic behind the scenes will be identical,
we can still use one function for the dialog itself,
just patching in the differences
src/eplugin/e-kolab-folder-permissions.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-permissions.c b/src/eplugin/e-kolab-folder-permissions.c
index ca1ad8b..8c5a3bf 100644
--- a/src/eplugin/e-kolab-folder-permissions.c
+++ b/src/eplugin/e-kolab-folder-permissions.c
@@ -68,7 +68,7 @@ kolab_folder_permissions_ui_edit_dialog_response_cb (GObject *dialog,
}
static void
-kolab_folder_permissions_ui_edit_dialog_cb (KolabFolderPermUIData *uidata)
+kolab_folder_permissions_ui_add_edit_dialog (KolabFolderPermUIData *uidata)
{
GtkWidget *dialog = NULL;
GtkWidget *content = NULL;
@@ -199,6 +199,24 @@ kolab_folder_permissions_ui_edit_dialog_cb (KolabFolderPermUIData *uidata)
gtk_widget_show (dialog);
}
+static void
+kolab_folder_permissions_ui_add_dialog_cb (KolabFolderPermUIData *uidata)
+{
+ g_assert (uidata != NULL);
+ g_assert (uidata->widgets != NULL);
+
+ kolab_folder_permissions_ui_add_edit_dialog (uidata);
+}
+
+static void
+kolab_folder_permissions_ui_edit_dialog_cb (KolabFolderPermUIData *uidata)
+{
+ g_assert (uidata != NULL);
+ g_assert (uidata->widgets != NULL);
+
+ kolab_folder_permissions_ui_add_edit_dialog (uidata);
+}
+
static GtkWidget*
kolab_folder_permissions_ui_create_tree_view (KolabFolderPermUIData *uidata)
{
@@ -401,7 +419,7 @@ e_kolab_folder_permissions_ui_new (void)
g_signal_connect_swapped (G_OBJECT (uidata->widgets->btn_add),
"clicked",
- G_CALLBACK (kolab_folder_permissions_ui_edit_dialog_cb),
+ G_CALLBACK (kolab_folder_permissions_ui_add_dialog_cb),
uidata);
g_signal_connect_swapped (G_OBJECT (uidata->widgets->btn_edit),
"clicked",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]