[evolution-kolab] EPlugin: new util function for adding a GError to an EAlertBar
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] EPlugin: new util function for adding a GError to an EAlertBar
- Date: Wed, 10 Oct 2012 18:39:04 +0000 (UTC)
commit 54f6c472217764d590309b11aae83a78a2aa1b12
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Wed Oct 10 18:07:12 2012 +0200
EPlugin: new util function for adding a GError to an EAlertBar
src/eplugin/e-kolab-plugin-util.c | 20 +++++++++++++++++++-
src/eplugin/e-kolab-plugin-util.h | 7 ++++++-
2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/src/eplugin/e-kolab-plugin-util.c b/src/eplugin/e-kolab-plugin-util.c
index 6a632c8..5797e52 100644
--- a/src/eplugin/e-kolab-plugin-util.c
+++ b/src/eplugin/e-kolab-plugin-util.c
@@ -34,7 +34,6 @@
#include <mail/em-folder-tree.h>
#include <shell/e-shell-sidebar.h>
-#include <shell/e-shell-view.h>
#include <shell/e-shell-window.h>
#include <libedataserverui/libedataserverui.h>
@@ -459,4 +458,23 @@ e_kolab_plugin_util_ui_alert_new_from_gerror (GError *err)
return alert;
}
+void
+e_kolab_plugin_util_ui_alert_bar_add_error (EAlertBar *alert_bar,
+ GError *err)
+{
+ EAlert *alert = NULL;
+
+ g_return_if_fail (E_IS_ALERT_BAR (alert_bar));
+
+ if (err == NULL)
+ return;
+
+ alert = e_kolab_plugin_util_ui_alert_new_from_gerror (err);
+
+ if (alert == NULL)
+ return;
+
+ e_alert_bar_add_alert (alert_bar, alert);
+}
+
/*----------------------------------------------------------------------------*/
diff --git a/src/eplugin/e-kolab-plugin-util.h b/src/eplugin/e-kolab-plugin-util.h
index 6b59335..497b9a6 100644
--- a/src/eplugin/e-kolab-plugin-util.h
+++ b/src/eplugin/e-kolab-plugin-util.h
@@ -34,8 +34,9 @@
#include <glib.h>
#include <gtk/gtk.h>
-#include <shell/e-shell-view.h>
#include <libevolution-utils/e-alert.h>
+#include <misc/e-alert-bar.h>
+#include <shell/e-shell-view.h>
#include <libekolab/camel-kolab-imapx-store.h>
@@ -83,6 +84,10 @@ e_kolab_plugin_util_ui_get_selected_foldername (EShellView *shell_view);
EAlert*
e_kolab_plugin_util_ui_alert_new_from_gerror (GError *err);
+void
+e_kolab_plugin_util_ui_alert_bar_add_error (EAlertBar *alert_bar,
+ GError *err);
+
/*----------------------------------------------------------------------------*/
#endif /* _E_KOLAB_PLUGIN_UTIL_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]