summaryrefslogtreecommitdiffstats
path: root/src/Applet/Applet.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-07-28 15:22:48 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-07-28 15:22:48 +0200
commit88a9c7fdaee695f15a9aeaaef177c0318896dc6a (patch)
treed9866cf66a16b37305349e520fe47698f74deef8 /src/Applet/Applet.cpp
parent4e7ebc3c2bc770f0aac4f857954755fe8a3d074a (diff)
downloadabrt-88a9c7fdaee695f15a9aeaaef177c0318896dc6a.tar.gz
abrt-88a9c7fdaee695f15a9aeaaef177c0318896dc6a.tar.xz
abrt-88a9c7fdaee695f15a9aeaaef177c0318896dc6a.zip
Applet: Added detection whether daemon is running
Diffstat (limited to 'src/Applet/Applet.cpp')
-rw-r--r--src/Applet/Applet.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp
index b3ea05b9..3ae9b4a8 100644
--- a/src/Applet/Applet.cpp
+++ b/src/Applet/Applet.cpp
@@ -61,12 +61,16 @@ int main(int argc, char **argv)
session.request_name("com.redhat.abrt.applet");
}
- DBus::Connection conn = DBus::Connection::SystemBus();
- //CDBusClient client(conn, CC_DBUS_PATH, CC_DBUS_NAME);
+ DBus::Connection conn = DBus::Connection::SystemBus();
applet = new CApplet(conn, CC_DBUS_PATH, CC_DBUS_NAME);
applet->ConnectCrashHandler(crash_notify_cb);
- gtk_main();
+ if(!conn.has_name(CC_DBUS_NAME))
+ {
+ std::cout << "Daemon is not running" << std::endl;
+ applet->Disable("Daemon is not running");
+ }
gtk_main();
gdk_threads_leave();
+ delete applet;
return 0;
}