static void openconsole (void) { if (realconsole) { if (debugger_type == 2) { open_debug_window (); consoleopen = 1; } else { close_debug_window (); consoleopen = -1; } return; } if (debugger_active && (debugger_type < 0 || debugger_type == 2)) { if (consoleopen > 0 || debuggerinitializing) return; if (debugger_type < 0) { regqueryint (NULL, _T("DebuggerType"), &debugger_type); if (debugger_type <= 0) debugger_type = 2; openconsole(); return; } close_console (); if (open_debug_window ()) { consoleopen = 1; return; } open_console_window (); } else { if (consoleopen < 0) return; close_console (); open_console_window (); } }
__declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow) { GDBusDaemon *daemon; GMainLoop *loop; const char *address; GError *error = NULL; if (g_getenv ("GDBUS_DAEMON_DEBUG") != NULL) open_console_window (); loop = g_main_loop_new (NULL, FALSE); address = "nonce-tcp:"; daemon = _g_dbus_daemon_new (address, NULL, &error); if (daemon == NULL) { g_printerr ("Can't init bus: %s\n", error->message); return; } g_signal_connect (daemon, "idle-timeout", G_CALLBACK (idle_timeout_cb), loop); if ( publish_session_bus (_g_dbus_daemon_get_address (daemon))) { g_main_loop_run (loop); unpublish_session_bus (); } g_main_loop_unref (loop); g_object_unref (daemon); }