[tasque/transition: 115/213] Fix NRE on uiManager in tray
- From: Antonius Riha <antoniusri src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tasque/transition: 115/213] Fix NRE on uiManager in tray
- Date: Wed, 29 Aug 2012 18:43:41 +0000 (UTC)
commit 6037d4f1e6e2ac2af928400ec89b1b4af84971a0
Author: Antonius Riha <antoniusriha gmail com>
Date: Thu Aug 16 14:01:15 2012 +0200
Fix NRE on uiManager in tray
src/Tasque.Gtk/GtkTray.cs | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/Tasque.Gtk/GtkTray.cs b/src/Tasque.Gtk/GtkTray.cs
index 04120c1..5906e9f 100644
--- a/src/Tasque.Gtk/GtkTray.cs
+++ b/src/Tasque.Gtk/GtkTray.cs
@@ -189,6 +189,10 @@ namespace Tasque
{
var backend = GtkApplication.Instance.Backend;
bool backendItemsSensitive = (backend != null && backend.Initialized);
+
+ if (uiManager == null)
+ RegisterUIManager ();
+
uiManager.GetAction ("/TrayIconMenu/NewTaskAction").Sensitive = backendItemsSensitive;
uiManager.GetAction ("/TrayIconMenu/RefreshAction").Sensitive = backendItemsSensitive;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]