[gnote] Make D-Bus APIs for opening notes respect new window setting
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Make D-Bus APIs for opening notes respect new window setting
- Date: Sat, 11 Mar 2017 20:47:01 +0000 (UTC)
commit 5e6892a46c0a7533a2c112dcf597753be65eb850
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat Mar 11 22:45:57 2017 +0200
Make D-Bus APIs for opening notes respect new window setting
Fixes Bug 778871
src/dbus/remotecontrol.cpp | 4 +---
src/mainwindow.cpp | 3 +++
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/dbus/remotecontrol.cpp b/src/dbus/remotecontrol.cpp
index 45d7531..a90cfdd 100644
--- a/src/dbus/remotecontrol.cpp
+++ b/src/dbus/remotecontrol.cpp
@@ -393,9 +393,7 @@ void RemoteControl::on_note_saved(const NoteBase::Ptr & note)
MainWindow & RemoteControl::present_note(const NoteBase::Ptr & note)
{
- MainWindow & window = IGnote::obj().get_window_for_note();
- MainWindow::present_in(window, static_pointer_cast<Note>(note));
- return window;
+ return *MainWindow::present_default(static_pointer_cast<Note>(note));
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index e5e5bba..b87e777 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -93,6 +93,9 @@ MainWindow *MainWindow::present_default(const Note::Ptr & note)
if (note->has_window()) {
win = dynamic_cast<MainWindow*>(note->get_window()->host());
}
+ else {
+ win = &IGnote::obj().get_window_for_note();
+ }
}
if(!win) {
win = &IGnote::obj().new_main_window();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]