Commit f3b8aa20e5ef7e1c1cab520f769b2708e112811c

Authored by Perry Werneck
1 parent 44fee5c5
Exists in master and in 1 other branch develop

+ Fixing rpm build.

+ Adding host URL as widget property.
glade/v3270.xml.in
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 <glade-widget-class title="v3270 Terminal" name="v3270" generic-name="TN3270 Terminal"> 4 <glade-widget-class title="v3270 Terminal" name="v3270" generic-name="TN3270 Terminal">
5 <properties> 5 <properties>
6 <property id="online"/> 6 <property id="online"/>
  7 + <property id="url"/>
7 <property id="selection"/> 8 <property id="selection"/>
8 <property id="model"/> 9 <property id="model"/>
9 <property id="luname"/> 10 <property id="luname"/>
rpm/libv3270.spec
@@ -61,7 +61,7 @@ BuildRequires: coreutils @@ -61,7 +61,7 @@ BuildRequires: coreutils
61 BuildRequires: gcc-c++ 61 BuildRequires: gcc-c++
62 BuildRequires: gettext-devel 62 BuildRequires: gettext-devel
63 BuildRequires: m4 63 BuildRequires: m4
64 -BuildRequires: libgladeui 64 +BuildRequires: libgladeui-2-6
65 65
66 %description 66 %description
67 67
@@ -96,7 +96,7 @@ Summary: Glade catalog for the TN3270 terminal emulator library @@ -96,7 +96,7 @@ Summary: Glade catalog for the TN3270 terminal emulator library
96 Group: Development/Libraries/C and C++ 96 Group: Development/Libraries/C and C++
97 97
98 Requires: libv3270-devel = %{version} 98 Requires: libv3270-devel = %{version}
99 -Requires: libgladeui 99 +Requires: glade
100 100
101 %description -n glade-catalog-v3270 101 %description -n glade-catalog-v3270
102 102
@@ -165,4 +165,4 @@ exit 0 @@ -165,4 +165,4 @@ exit 0
165 /sbin/ldconfig 165 /sbin/ldconfig
166 exit 0 166 exit 0
167 167
168 -%changelog 168 -%changelog
  169 +%changelog
169 \ No newline at end of file 170 \ No newline at end of file
src/v3270/private.h
@@ -215,6 +215,7 @@ G_BEGIN_DECLS @@ -215,6 +215,7 @@ G_BEGIN_DECLS
215 PROP_MODEL, 215 PROP_MODEL,
216 PROP_LUNAME, 216 PROP_LUNAME,
217 PROP_AUTO_DISCONNECT, 217 PROP_AUTO_DISCONNECT,
  218 + PROP_URL,
218 219
219 /* Toggles - always the last one, the real values are PROP_TOGGLE+LIB3270_TOGGLE */ 220 /* Toggles - always the last one, the real values are PROP_TOGGLE+LIB3270_TOGGLE */
220 PROP_TOGGLE 221 PROP_TOGGLE
src/v3270/properties.c
@@ -63,6 +63,10 @@ @@ -63,6 +63,10 @@
63 v3270_set_auto_disconnect(GTK_WIDGET(object),g_value_get_int(value)); 63 v3270_set_auto_disconnect(GTK_WIDGET(object),g_value_get_int(value));
64 break; 64 break;
65 65
  66 + case PROP_URL:
  67 + v3270_set_url(GTK_WIDGET(object),g_value_get_string(value));
  68 + break;
  69 +
66 default: 70 default:
67 if(prop_id < (PROP_TOGGLE + LIB3270_TOGGLE_COUNT)) 71 if(prop_id < (PROP_TOGGLE + LIB3270_TOGGLE_COUNT))
68 { 72 {
@@ -100,6 +104,14 @@ @@ -100,6 +104,14 @@
100 g_value_set_boolean(value,lib3270_has_selection(window->host) ? TRUE : FALSE ); 104 g_value_set_boolean(value,lib3270_has_selection(window->host) ? TRUE : FALSE );
101 break; 105 break;
102 106
  107 + case PROP_URL:
  108 + {
  109 + char buffer[1024];
  110 + memset(buffer,0,sizeof(buffer));
  111 + g_value_set_string(value,lib3270_get_url(window->host, buffer, sizeof(buffer)));
  112 + }
  113 + break;
  114 +
103 default: 115 default:
104 if(prop_id < (PROP_TOGGLE + LIB3270_TOGGLE_COUNT)) 116 if(prop_id < (PROP_TOGGLE + LIB3270_TOGGLE_COUNT))
105 { 117 {
@@ -145,7 +157,6 @@ @@ -145,7 +157,6 @@
145 FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE); 157 FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE);
146 g_object_class_install_property(gobject_class,PROP_LUNAME,v3270_properties[PROP_LUNAME]); 158 g_object_class_install_property(gobject_class,PROP_LUNAME,v3270_properties[PROP_LUNAME]);
147 159
148 -  
149 v3270_properties[PROP_AUTO_DISCONNECT] = g_param_spec_string( 160 v3270_properties[PROP_AUTO_DISCONNECT] = g_param_spec_string(
150 "auto_disconnect", 161 "auto_disconnect",
151 "auto_disconnect", 162 "auto_disconnect",
@@ -153,6 +164,13 @@ @@ -153,6 +164,13 @@
153 FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE); 164 FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE);
154 g_object_class_install_property(gobject_class,PROP_AUTO_DISCONNECT,v3270_properties[PROP_AUTO_DISCONNECT]); 165 g_object_class_install_property(gobject_class,PROP_AUTO_DISCONNECT,v3270_properties[PROP_AUTO_DISCONNECT]);
155 166
  167 + v3270_properties[PROP_URL] = g_param_spec_string(
  168 + "url",
  169 + "url",
  170 + "Host URL",
  171 + FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE);
  172 + g_object_class_install_property(gobject_class,PROP_AUTO_DISCONNECT,v3270_properties[PROP_URL]);
  173 +
156 // Toggle properties 174 // Toggle properties
157 int f; 175 int f;
158 176