From 67a0890956d2c9878e2fdaf078c90551548b765c Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Thu, 19 Feb 2009 14:28:58 +0100 Subject: Rewritten applet - got rid of gtkmm --- src/Applet/Applet.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Applet/Applet.cpp') diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index cc40642..b33cc9f 100644 --- a/src/Applet/Applet.cpp +++ b/src/Applet/Applet.cpp @@ -38,7 +38,11 @@ crash_notify_cb(const char* progname) int main(int argc, char **argv) { - Gtk::Main kit(argc, argv); + /* need to be thread safe */ + g_thread_init(NULL); + gdk_threads_init(); + gdk_threads_enter(); + gtk_init(&argc,&argv); applet = new CApplet(); /* move to the DBusClient::connect */ DBus::Glib::BusDispatcher dispatcher; @@ -49,6 +53,7 @@ int main(int argc, char **argv) DBus::Connection conn = DBus::Connection::SystemBus(); CDBusClient client(conn, CC_DBUS_PATH, CC_DBUS_NAME); client.ConnectCrashHandler(crash_notify_cb); - Gtk::Main::run(); + gtk_main(); + gdk_threads_leave(); return 0; } -- cgit