aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-04-21 09:19:25 -0500
committerCharles Kerr <charles.kerr@canonical.com>2016-04-21 09:19:25 -0500
commit3b84a37b2caae0c7c971b3c7cc5df9be1319a5ac (patch)
tree32a366f19b3577792b3e7122429e90bc244c1adc /src/main.cpp
parente1c1a9ae367c53561cdb4f53ad8589e2bc859b0b (diff)
downloadayatana-indicator-display-3b84a37b2caae0c7c971b3c7cc5df9be1319a5ac.tar.gz
ayatana-indicator-display-3b84a37b2caae0c7c971b3c7cc5df9be1319a5ac.tar.bz2
ayatana-indicator-display-3b84a37b2caae0c7c971b3c7cc5df9be1319a5ac.zip
don't pass a GDBusConnection to the Greeter ctor
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/main.cpp b/src/main.cpp
index ee05f52..52cdd58 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -47,15 +47,6 @@ main(int /*argc*/, char** /*argv*/)
g_main_loop_quit(loop);
};
- // get the session bus
- GError* error {};
- auto session_bus = g_bus_get_sync(G_BUS_TYPE_SESSION, nullptr, &error);
- if (error != nullptr) {
- g_critical("Unable to get session bus: %s", error->message);
- g_clear_error(&error);
- return 0;
- }
-
// build all our indicators.
// Right now we've only got one -- rotation lock -- but hey, we can dream.
std::vector<std::shared_ptr<Indicator>> indicators;
@@ -72,7 +63,7 @@ main(int /*argc*/, char** /*argv*/)
static constexpr char const * ADB_SOCKET_PATH {"/dev/socket/adbd"};
static constexpr char const * PUBLIC_KEYS_FILENAME {"/data/misc/adb/adb_keys"};
auto usb_monitor = std::make_shared<GUDevUsbMonitor>();
- auto greeter = std::make_shared<UnityGreeter>(session_bus);
+ auto greeter = std::make_shared<UnityGreeter>();
UsbManager usb_manager {ADB_SOCKET_PATH, PUBLIC_KEYS_FILENAME, usb_monitor, greeter};
// let's go!
@@ -80,6 +71,5 @@ main(int /*argc*/, char** /*argv*/)
// cleanup
g_main_loop_unref(loop);
- g_clear_object(&session_bus);
return 0;
}