[evolution-kolab] EPlugin: propagate EShellView and the dialog's EAlertBar



commit 7a820cacaa1c99a65986d0313d970b010359b2a4
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Fri Aug 3 18:13:44 2012 +0200

    EPlugin: propagate EShellView and the dialog's EAlertBar
    
    * need to get the CamelStore (get it from EShellView)
    * need a place to inform the user about (I/O) errors
      (display it in a dialog alert bar instead of yet another
      popup)

 src/eplugin/e-kolab-folder-permissions.c |   16 ++++++++++------
 src/eplugin/e-kolab-folder-permissions.h |    9 +++++++--
 2 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/src/eplugin/e-kolab-folder-permissions.c b/src/eplugin/e-kolab-folder-permissions.c
index b357571..14bb91e 100644
--- a/src/eplugin/e-kolab-folder-permissions.c
+++ b/src/eplugin/e-kolab-folder-permissions.c
@@ -94,8 +94,8 @@ kolab_folder_permissions_ui_edit_dialog_cb (KolabFolderPermUIData *uidata)
 	content = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 	gtk_container_set_border_width (GTK_CONTAINER (content), 6);
 
-	widget = e_kolab_plugin_util_ui_selected_folder_widget (uidata->selected_folder,
-	                                                        uidata->selected_source);
+	widget = e_kolab_plugin_util_ui_selected_folder_widget (uidata->foldername,
+	                                                        uidata->sourcename);
 	gtk_container_add (GTK_CONTAINER (content), widget);
 
 	widget = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
@@ -328,7 +328,11 @@ e_kolab_folder_permissions_ui_new (void)
 	GtkWidget *treeview = NULL;
 	gint row = 0;
 
+	uidata->shell_view = NULL;
+	uidata->alert_bar = NULL;
+
 	uidata->widgets = g_new0 (KolabFolderPermUIWidgets, 1);
+
 	uidata->widgets->container = gtk_frame_new (C_("Kolab Folder Permissions",
 	                                               "IMAP Folder Permissions"));
 	gtk_container_set_border_width (GTK_CONTAINER (uidata->widgets->container), 6);
@@ -409,10 +413,10 @@ e_kolab_folder_permissions_ui_free (KolabFolderPermUIData *uidata)
 		g_free (uidata->widgets);
 
 	kolab_data_folder_permissions_free (uidata->permissions);
-	if (uidata->selected_folder != NULL)
-		g_free (uidata->selected_folder);
-	if (uidata->selected_source != NULL)
-		g_free (uidata->selected_source);
+	if (uidata->foldername != NULL)
+		g_free (uidata->foldername);
+	if (uidata->sourcename != NULL)
+		g_free (uidata->sourcename);
 
 	g_free (uidata);
 }
diff --git a/src/eplugin/e-kolab-folder-permissions.h b/src/eplugin/e-kolab-folder-permissions.h
index add3fef..b14e131 100644
--- a/src/eplugin/e-kolab-folder-permissions.h
+++ b/src/eplugin/e-kolab-folder-permissions.h
@@ -34,6 +34,9 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
+#include <shell/e-shell-view.h>
+#include <misc/e-alert-bar.h>
+
 #include <libekolab/kolab-data-folder-permissions.h>
 #include <libekolab/kolab-data-imap-account.h>
 
@@ -65,10 +68,12 @@ struct _KolabFolderPermUIWidgets {
 
 typedef struct _KolabFolderPermUIData KolabFolderPermUIData;
 struct _KolabFolderPermUIData {
+	EShellView *shell_view;
+	EAlertBar *alert_bar;
 	KolabFolderPermUIWidgets *widgets;
 	KolabDataFolderPermissions *permissions;
-	gchar *selected_folder;
-	gchar *selected_source;
+	gchar *foldername;
+	gchar *sourcename;
 };
 
 /*----------------------------------------------------------------------------*/



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