Commit ab27b84734cf70d4281f0ad51b69564705bd720c

Authored by Perry Werneck
1 parent 07b2fcd8
Exists in master and in 1 other branch develop

Updating IPC object.

src/linux/getproperties.c
... ... @@ -59,7 +59,10 @@ ipc3270_get_property (GDBusConnection *connection,
59 59 if(proplist[ix].get && !g_ascii_strcasecmp(proplist[ix].name, property_name)) {
60 60  
61 61 // Found it!
62   - int value = 0; // proplist[ix].get(IPC3270(user_data)->hSession);
  62 + int value = proplist[ix].get(IPC3270(user_data)->hSession);
  63 +
  64 + debug("%s=%d",property_name,value);
  65 +
63 66 if(value > 0 || errno == 0) {
64 67 return g_variant_new_int16((gint16) value);
65 68 }
... ...
src/linux/gobject.c
... ... @@ -136,13 +136,7 @@ void ipc3270_set_session(GObject *object, H3270 *hSession, const char *name, GEr
136 136  
137 137 g_message("Got %s", object_name);
138 138  
139   - /*
140   - gchar * widget_name = g_strdup_printf("%s:%c",gtk_widget_get_name(window),id);
141   - v3270_set_session_name(terminal, widget_name);
142   - g_free(widget_name);
143   -
144   - g_message("Got %s - %s", name, v3270_get_session_name(terminal));
145   - */
  139 + lib3270_set_session_id(ipc->hSession, id);
146 140  
147 141 // Introspection data for the service we are exporting
148 142 GString * introspection = g_string_new(
... ...
src/plugin/start.c
... ... @@ -72,9 +72,17 @@
72 72  
73 73 gtk_dialog_run(GTK_DIALOG(dialog));
74 74 gtk_widget_destroy(dialog);
  75 + return 0;
75 76  
76 77 }
77 78  
  79 + char id = lib3270_get_session_id(v3270_get_session(terminal));
  80 + if(id) {
  81 + gchar * widget_name = g_strdup_printf("%s:%c",gtk_widget_get_name(window),id);
  82 + v3270_set_session_name(terminal, widget_name);
  83 + g_free(widget_name);
  84 + }
  85 +
78 86 return 0;
79 87 }
80 88  
... ...
testscripts/introspect.sh 0 → 100755
... ... @@ -0,0 +1,7 @@
  1 +#!/bin/bash
  2 +gdbus \
  3 + introspect \
  4 + --session \
  5 + --dest=br.com.bb.pw3270.a \
  6 + --object-path=/br/com/bb/tn3270
  7 +
... ...