[gnote] Remove bunch of unused code



commit fde431406d72c3c5436ea3a00885a917134616a0
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Tue Mar 2 22:56:26 2021 +0200

    Remove bunch of unused code

 src/remotecontrolproxy.cpp | 41 -----------------------------------------
 src/remotecontrolproxy.hpp |  8 --------
 2 files changed, 49 deletions(-)
---
diff --git a/src/remotecontrolproxy.cpp b/src/remotecontrolproxy.cpp
index 3ae20568..23128b39 100644
--- a/src/remotecontrolproxy.cpp
+++ b/src/remotecontrolproxy.cpp
@@ -61,10 +61,8 @@ const char *RemoteControlProxy::GNOTE_SEARCH_PROVIDER_INTERFACE_NAME = "org.gnom
 
 RemoteControlProxy::RemoteControlProxy(IGnote & g)
   : m_gnote(g)
-  , m_manager(NULL)
   , m_remote_control(NULL)
   , m_search_provider(NULL)
-  , m_bus_acquired(false)
 {
 }
 
@@ -73,39 +71,6 @@ RemoteControl *RemoteControlProxy::get_remote_control()
   return m_remote_control;
 }
 
-void RemoteControlProxy::register_remote(NoteManagerBase & manager, const slot_name_acquire_finish & 
on_finish)
-{
-  m_on_name_acquire_finish = on_finish;
-  m_manager = &manager;
-  Gio::DBus::own_name(Gio::DBus::BUS_TYPE_SESSION, GNOTE_SERVER_NAME,
-                      sigc::mem_fun(*this, &RemoteControlProxy::on_bus_acquired),
-                      sigc::mem_fun(*this, &RemoteControlProxy::on_name_acquired),
-                      sigc::mem_fun(*this, &RemoteControlProxy::on_name_lost));
-}
-
-
-void RemoteControlProxy::on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection> & conn, const 
Glib::ustring &)
-{
-  m_bus_acquired = true;
-  m_connection = conn;
-}
-
-
-void RemoteControlProxy::on_name_acquired(const Glib::RefPtr<Gio::DBus::Connection> & conn, const 
Glib::ustring &)
-{
-  try {
-    if(m_bus_acquired) {
-      register_object(conn, *m_manager, m_on_name_acquire_finish);
-      return;
-    }
-  }
-  catch(Glib::Exception & e) {
-    DBG_OUT("Failed to acquire name: %s", e.what().c_str());
-  }
-
-  m_on_name_acquire_finish(false, false);
-}
-
 
 void RemoteControlProxy::register_object(const Glib::RefPtr<Gio::DBus::Connection> & conn, NoteManagerBase & 
manager,
                                          const slot_name_acquire_finish & on_finish)
@@ -118,12 +83,6 @@ void RemoteControlProxy::register_object(const Glib::RefPtr<Gio::DBus::Connectio
 }
 
 
-void RemoteControlProxy::on_name_lost(const Glib::RefPtr<Gio::DBus::Connection> &, const Glib::ustring &)
-{
-  m_on_name_acquire_finish(m_bus_acquired, false);
-}
-
-
 void RemoteControlProxy::load_introspection_xml()
 {
   load_interface_from_file(DATADIR"/gnote/gnote-introspect.xml", GNOTE_INTERFACE_NAME, m_gnote_interface);
diff --git a/src/remotecontrolproxy.hpp b/src/remotecontrolproxy.hpp
index 1952ec5b..cbea2e98 100644
--- a/src/remotecontrolproxy.hpp
+++ b/src/remotecontrolproxy.hpp
@@ -54,24 +54,16 @@ public:
   explicit RemoteControlProxy(IGnote & g);
 
   RemoteControl *get_remote_control();
-  void register_remote(NoteManagerBase & manager, const slot_name_acquire_finish & on_finish);
   void register_object(const Glib::RefPtr<Gio::DBus::Connection> & conn, NoteManagerBase & manager,
                        const slot_name_acquire_finish & on_finish);
 private:
-  void on_bus_acquired(const Glib::RefPtr<Gio::DBus::Connection> & conn, const Glib::ustring & name);
-  void on_name_acquired(const Glib::RefPtr<Gio::DBus::Connection> & conn, const Glib::ustring & name);
-  void on_name_lost(const Glib::RefPtr<Gio::DBus::Connection> & conn, const Glib::ustring & name);
   void load_introspection_xml();
 
   IGnote & m_gnote;
-  NoteManagerBase *m_manager;
   RemoteControl *m_remote_control;
   org::gnome::Gnote::SearchProvider *m_search_provider;
-  bool m_bus_acquired;
-  Glib::RefPtr<Gio::DBus::Connection> m_connection;
   Glib::RefPtr<Gio::DBus::InterfaceInfo> m_gnote_interface;
   Glib::RefPtr<Gio::DBus::InterfaceInfo> m_search_provider_interface;
-  slot_name_acquire_finish m_on_name_acquire_finish;
 };
 
 }


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