[gnote/gnome-3-10] Hold application in background mode
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote/gnome-3-10] Hold application in background mode
- Date: Sat, 28 Dec 2013 14:05:40 +0000 (UTC)
commit 35a69a4a590aaba89c6a8fe51596c19ce1ab5569
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Dec 15 16:44:52 2013 +0200
Hold application in background mode
Do not create background window.
Fixes Bug 719666.
src/gnote.cpp | 13 ++-----------
src/gnote.hpp | 1 -
2 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 9d89ac6..10bcd29 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -140,15 +140,6 @@ namespace gnote {
}
- void Gnote::on_window_removed(Gtk::Window *window)
- {
- // Do not remove last window if background or status icon mode
- if(windowed() || get_windows().size() > 1) {
- Gtk::Application::on_window_removed(window);
- }
- }
-
-
void Gnote::common_init()
{
std::string note_path = get_note_path(cmd_line.note_path());
@@ -213,8 +204,8 @@ namespace gnote {
start_tray_icon();
}
else if(m_is_background) {
- // Create Search All Notes window as we need it present for application to run
- new_main_window();
+ // do not exit when all windows are closed
+ hold();
}
else {
get_main_window().present();
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 81ccedd..39054d5 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -159,7 +159,6 @@ public:
protected:
virtual int on_command_line(const Glib::RefPtr<Gio::ApplicationCommandLine> & command_line) override;
virtual void on_startup() override;
- virtual void on_window_removed(Gtk::Window *window) override;
private:
Gnote();
std::string get_note_path(const std::string & override_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]