[gnote] Cleanup end_main related code
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Cleanup end_main related code
- Date: Tue, 2 Mar 2021 21:11:49 +0000 (UTC)
commit 767c68a8deddb37202a09e0114bd98abcbd9ff68
Author: Aurimas Černius <aurisc4 gmail com>
Date: Tue Mar 2 23:06:21 2021 +0200
Cleanup end_main related code
src/gnote.cpp | 11 +++--------
src/gnote.hpp | 2 +-
src/remotecontrolproxy.cpp | 5 ++---
src/remotecontrolproxy.hpp | 3 +--
4 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/src/gnote.cpp b/src/gnote.cpp
index 22a61320..81b69fe4 100644
--- a/src/gnote.cpp
+++ b/src/gnote.cpp
@@ -123,6 +123,7 @@ namespace gnote {
if(!m_manager) {
common_init();
register_object();
+ end_main();
}
else {
cmdline.set_note_manager(*m_manager);
@@ -155,19 +156,13 @@ namespace gnote {
}
- void Gnote::end_main(bool bus_acquired, bool name_acquired)
+ void Gnote::end_main()
{
m_cmd_line.set_note_manager(*m_manager);
if(m_cmd_line.needs_execute()) {
m_cmd_line.execute();
}
- if(bus_acquired) {
- if(name_acquired) {
- DBG_OUT("Gnote remote control active.");
- }
- }
-
make_app_actions();
if(is_background()) {
// do not exit when all windows are closed
@@ -202,7 +197,7 @@ namespace gnote {
void Gnote::register_object()
{
- m_remote_control.register_object(Gio::DBus::Connection::get_sync(Gio::DBus::BUS_TYPE_SESSION), *this,
default_note_manager(), sigc::mem_fun(*this, &Gnote::end_main));
+ m_remote_control.register_object(Gio::DBus::Connection::get_sync(Gio::DBus::BUS_TYPE_SESSION), *this,
default_note_manager());
}
diff --git a/src/gnote.hpp b/src/gnote.hpp
index 5a690ccd..00c465a7 100644
--- a/src/gnote.hpp
+++ b/src/gnote.hpp
@@ -170,7 +170,7 @@ private:
Gnote();
Glib::ustring get_note_path(const Glib::ustring & override_path);
void common_init();
- void end_main(bool bus_aquired, bool name_acquired);
+ void end_main();
void on_sync_dialog_response(int response_id);
void on_main_window_closed(Gtk::Window*);
void make_app_actions();
diff --git a/src/remotecontrolproxy.cpp b/src/remotecontrolproxy.cpp
index 15c10b77..4ef21728 100644
--- a/src/remotecontrolproxy.cpp
+++ b/src/remotecontrolproxy.cpp
@@ -71,14 +71,13 @@ RemoteControl *RemoteControlProxy::get_remote_control()
}
-void RemoteControlProxy::register_object(const Glib::RefPtr<Gio::DBus::Connection> & conn, IGnote & g,
NoteManagerBase & manager,
- const slot_name_acquire_finish & on_finish)
+void RemoteControlProxy::register_object(const Glib::RefPtr<Gio::DBus::Connection> & conn, IGnote & g,
NoteManagerBase & manager)
{
load_introspection_xml();
m_remote_control = new RemoteControl(conn, g, manager, GNOTE_SERVER_PATH, GNOTE_INTERFACE_NAME,
m_gnote_interface);
m_search_provider = new org::gnome::Gnote::SearchProvider(conn, GNOTE_SEARCH_PROVIDER_PATH,
m_search_provider_interface, g, manager);
- on_finish(true, true);
+ DBG_OUT("Gnote remote control active.");
}
diff --git a/src/remotecontrolproxy.hpp b/src/remotecontrolproxy.hpp
index 1467f558..06eec1fc 100644
--- a/src/remotecontrolproxy.hpp
+++ b/src/remotecontrolproxy.hpp
@@ -54,8 +54,7 @@ public:
RemoteControlProxy();
RemoteControl *get_remote_control();
- void register_object(const Glib::RefPtr<Gio::DBus::Connection> & conn, IGnote & g, NoteManagerBase &
manager,
- const slot_name_acquire_finish & on_finish);
+ void register_object(const Glib::RefPtr<Gio::DBus::Connection> & conn, IGnote & g, NoteManagerBase &
manager);
private:
void load_introspection_xml();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]