}
}
+static guint ui_gnome_g_log_handler_handler_id;
static void ui_gnome_g_log_handler(const gchar *log_domain,GLogLevelFlags log_level,const gchar *message,gpointer user_data)
{
GtkWidget *dialog;
/* 'dialog' gets destroyed automatically */
}
+static void ui_gnome_interactive(void)
+{
+ gtk_main();
+ network_notify_hostip=NULL;
+ g_log_remove_handler(
+ G_LOG_DOMAIN, /* log_domain; "Captive" */
+ ui_gnome_g_log_handler_handler_id); /* handler_id */
+ network_detach();
+}
+
/* of "ui-gnome-interface.h": */
GtkWidget *create_App(void);
/* of "ui-gnome-support.h": */
HostIPEntry=GTK_ENTRY(lookup_widget(GTK_WIDGET(App),"HostIPEntry"));
/* ui_gnome_g_log_handler() needs 'App'. */
- g_log_set_handler(
+ ui_gnome_g_log_handler_handler_id=g_log_set_handler(
G_LOG_DOMAIN, /* log_domain; "Captive" */
(G_LOG_LEVEL_MASK|G_LOG_FLAG_FATAL)&~(0
|G_LOG_LEVEL_MESSAGE
NULL); /* user_data */
ui_gnome_network_notify_hostip(0);
+ gtk_entry_set_text(PortEntry,udpgate_printf_alloca("%d",(int)optarg_port));
gtk_widget_show_all(GTK_WIDGET(App));
g_timeout_add(
network_notify_hostip=ui_gnome_network_notify_hostip;
- return TRUE;
-}
+ ui_interactive=ui_gnome_interactive;
-void ui_gnome_interactive(void)
-{
- gtk_main();
+ return TRUE;
}