[gnote/gnome-3-22] 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/gnome-3-22] Make D-Bus APIs for opening notes respect new window setting
- Date: Sun, 19 Mar 2017 16:04:30 +0000 (UTC)
commit 63c038d962a0d2694c5293e9b8873f38e680b63b
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 0464381..f2311e4 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 4f3f808..59be826 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]