[gnote] Fix RemoteControl::HideNote



commit f15081d54d3ef8888163ca250a0552c50cf7d1be
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Feb 9 19:26:31 2014 +0200

    Fix RemoteControl::HideNote

 src/dbus/remotecontrol.cpp |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/dbus/remotecontrol.cpp b/src/dbus/remotecontrol.cpp
index 9d3d6c6..99a78f4 100644
--- a/src/dbus/remotecontrol.cpp
+++ b/src/dbus/remotecontrol.cpp
@@ -275,7 +275,14 @@ bool RemoteControl::HideNote(const std::string& uri)
   if (!note)
     return false;
 
-  note->get_window()->hide();
+  NoteWindow *window = note->get_window();
+  if(window == NULL) {
+    return true;
+  }
+  MainWindow *win = MainWindow::get_owning(*window);
+  if(win) {
+    win->unembed_widget(*window);
+  }
   return true;
 }
 


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