diff --git a/pw3270.cbp b/pw3270.cbp
index b4f9906..ddcd7f8 100644
--- a/pw3270.cbp
+++ b/pw3270.cbp
@@ -56,11 +56,6 @@
-
-
-
-
-
@@ -101,26 +96,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -170,20 +145,13 @@
-
-
-
-
-
-
-
@@ -191,14 +159,9 @@
-
-
-
-
-
@@ -342,41 +305,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/pw3270/actions.c b/src/pw3270/actions.c
index 1906439..9505dc8 100644
--- a/src/pw3270/actions.c
+++ b/src/pw3270/actions.c
@@ -363,6 +363,8 @@ static void lib3270_toggle_action(GtkToggleAction *action,GtkWidget *widget)
{
LIB3270_TOGGLE toggle = (LIB3270_TOGGLE) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"toggle_id"));
+ trace("Action %s toggled on widget %p (id=%d)\n",gtk_action_get_name(GTK_ACTION(action)),widget,(int) toggle);
+
lib3270_trace_event(v3270_get_session(widget),"Action %s toggled on widget %p (id=%d)\n",gtk_action_get_name(GTK_ACTION(action)),widget,(int) toggle);
if(toggle == TOGGLE_GDKDEBUG)
@@ -438,6 +440,8 @@ static void action_set_toggle(GtkAction *action, GtkWidget *widget)
{
LIB3270_TOGGLE id = (LIB3270_TOGGLE) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"toggle_id"));
+ trace("Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id);
+
lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id);
lib3270_set_toggle(v3270_get_session(widget),id,1);
}
@@ -445,6 +449,9 @@ static void action_set_toggle(GtkAction *action, GtkWidget *widget)
static void action_reset_toggle(GtkAction *action, GtkWidget *widget)
{
LIB3270_TOGGLE id = (LIB3270_TOGGLE) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"toggle_id"));
+
+ trace("Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id);
+
lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id);
lib3270_set_toggle(v3270_get_session(widget),id,0);
}
diff --git a/src/pw3270/tools.c b/src/pw3270/tools.c
index 21248c3..1c9b9d8 100644
--- a/src/pw3270/tools.c
+++ b/src/pw3270/tools.c
@@ -136,6 +136,8 @@ LIB3270_EXPORT gboolean pw3270_set_toggle_by_name(GtkWidget *widget, const gchar
H3270 * hSession = pw3270_get_session(widget);
LIB3270_TOGGLE id = lib3270_get_toggle_id(name);
+ trace("%s(%s) id=%u",__FUNCTION__,name,id);
+
if(!hSession || id == (LIB3270_TOGGLE) -1)
return FALSE;
diff --git a/src/pw3270/window.c b/src/pw3270/window.c
index 851f3ae..86f89fd 100644
--- a/src/pw3270/window.c
+++ b/src/pw3270/window.c
@@ -257,13 +257,36 @@
lib3270_set_toggle(hSession,LIB3270_TOGGLE_NETWORK_TRACE,0);
}
+ struct trace_data
+ {
+ H3270 * hSession;
+ gchar * text;
+ };
- static void trace_window(G_GNUC_UNUSED H3270 *hSession, G_GNUC_UNUSED void * userdata, const char *fmt, va_list args)
+ static gboolean bg_trace_window(struct trace_data *data)
{
- GtkWidget * widget = v3270_trace_new_from_session(hSession);
+ GtkWidget * widget = v3270_trace_new_from_session(data->hSession,data->text);
+
v3270_trace_set_destroy_on_close(widget,TRUE);
- g_signal_connect(widget, "destroy", G_CALLBACK(trace_window_destroy), hSession);
- gtk_widget_show(widget);
+
+ g_signal_connect(widget, "destroy", G_CALLBACK(trace_window_destroy), data->hSession);
+
+ gtk_widget_show_all(widget);
+
+ g_free(data->text);
+
+ return FALSE;
+ }
+
+ static void trace_window(G_GNUC_UNUSED H3270 *hSession, G_GNUC_UNUSED void * userdata, const char *fmt, va_list args)
+ {
+ struct trace_data * data = g_new0(struct trace_data,1);
+
+ data->hSession = hSession;
+ data->text = g_strdup_vprintf(fmt,args);
+
+ g_idle_add_full(G_PRIORITY_DEFAULT_IDLE,(GSourceFunc) bg_trace_window, data, g_free);
+
}
GtkWidget * pw3270_new(const gchar *host, const gchar *systype, unsigned short colors)
@@ -292,7 +315,7 @@
if(*ptr)
{
pw3270_set_url(widget,ptr);
- connct = pw3270_get_toggle(widget,LIB3270_TOGGLE_CONNECT_ON_STARTUP) ? TRUE : FALSE;
+// connct = pw3270_get_toggle(widget,LIB3270_TOGGLE_CONNECT_ON_STARTUP) ? TRUE : FALSE;
}
g_free(ptr);
}
@@ -318,8 +341,10 @@
v3270_set_scaled_fonts(GTK_PW3270(widget)->terminal,get_boolean_from_config("terminal","sfonts",FALSE));
+ /*
if(connct)
pw3270_connect(widget);
+ */
return widget;
}
diff --git a/ui/98trace.xml b/ui/98trace.xml
index 0b9a1ba..aaa4bfc 100644
--- a/ui/98trace.xml
+++ b/ui/98trace.xml
@@ -37,6 +37,7 @@
+
--
libgit2 0.21.2