Commit bf3341aa8e0c77b8b844eb41ac5c860cc8510a6d

Authored by Perry Werneck
1 parent 4d639bfe
Exists in master and in 1 other branch develop

Adding version and release properties.

src/core/getproperties.c
... ... @@ -122,6 +122,14 @@ GVariant * ipc3270_get_property(GObject *object, const gchar *property_name, GEr
122 122  
123 123 }
124 124  
  125 + if(!g_ascii_strcasecmp("version", property_name)) {
  126 + return g_variant_new_string(PACKAGE_VERSION);
  127 + }
  128 +
  129 + if(!g_ascii_strcasecmp("revision", property_name)) {
  130 + return g_variant_new_string(G_STRINGIFY(PACKAGE_RELEASE));
  131 + }
  132 +
125 133 return NULL;
126 134  
127 135 }
... ...
src/core/linux/gobject.c
... ... @@ -85,6 +85,9 @@ void ipc3270_add_terminal_introspection(GString *introspection) {
85 85 " <arg type='s' name='url' direction='in'/>"
86 86 " <arg type='i' name='result' direction='out' />" \
87 87 " </method>"
  88 + " <method name='disconnect'>"
  89 + " <arg type='i' name='result' direction='out' />" \
  90 + " </method>"
88 91 " <method name='pfkey'>" \
89 92 " <arg type='i' name='keycode' direction='in'/>" \
90 93 " <arg type='i' name='result' direction='out' />" \
... ... @@ -123,7 +126,9 @@ void ipc3270_add_terminal_introspection(GString *introspection) {
123 126 " <arg type='i' name='len' direction='in' />" \
124 127 " <arg type='y' name='lf' direction='in' />" \
125 128 " <arg type='s' name='text' direction='out' />" \
126   - " </method>"
  129 + " </method>" \
  130 + " <property type='s' name='version' access='read'/>" \
  131 + " <property type='s' name='revision' access='read'/>"
127 132 );
128 133  
129 134 // Constrói métodos usando a tabela de controle
... ...