Port the editor to the new g_thread stuff
This commit is contained in:
parent
73849d693a
commit
ae40a85ce1
1 changed files with 1 additions and 3 deletions
|
@ -116,7 +116,6 @@ gint main(gint argc, gchar *argv[]) {
|
||||||
glade_xml_signal_autoconnect(xml);
|
glade_xml_signal_autoconnect(xml);
|
||||||
|
|
||||||
if (g_thread_supported()) {
|
if (g_thread_supported()) {
|
||||||
g_thread_init(NULL);
|
|
||||||
gdk_threads_init();
|
gdk_threads_init();
|
||||||
} else {
|
} else {
|
||||||
g_error("Threads not supported, we die.");
|
g_error("Threads not supported, we die.");
|
||||||
|
@ -125,8 +124,7 @@ gint main(gint argc, gchar *argv[]) {
|
||||||
|
|
||||||
// Start the polling thread to try to connect to the LED-Cube.
|
// Start the polling thread to try to connect to the LED-Cube.
|
||||||
GError *error;
|
GError *error;
|
||||||
g_thread_init(NULL);
|
connectThread = g_thread_new("connection_thread", (GThreadFunc)connectToLEDCube, &error);
|
||||||
connectThread = g_thread_create((GThreadFunc)connectToLEDCube, NULL, TRUE, &error);
|
|
||||||
if (connectThread == NULL) {
|
if (connectThread == NULL) {
|
||||||
g_error("Can't create the thread, we stop here.");
|
g_error("Can't create the thread, we stop here.");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in a new issue