Commit 3089057ad1e06b052c1c2fbe7bb870626f88560d

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

Adding "get_url" method.

Showing 2 changed files with 10 additions and 1 deletions   Show diff stats
src/include/v3270.h
... ... @@ -240,8 +240,9 @@
240 240 LIB3270_EXPORT int v3270_set_host_type_by_name(GtkWidget *widget, const char *name);
241 241  
242 242 LIB3270_EXPORT void v3270_set_url(GtkWidget *widget, const gchar *uri);
  243 + LIB3270_EXPORT const gchar * v3270_get_url(GtkWidget *widget);
  244 +
243 245 LIB3270_EXPORT const char * v3270_get_luname(GtkWidget *widget);
244   - LIB3270_EXPORT GtkWidget * v3270_get_default_widget(void);
245 246  
246 247 LIB3270_EXPORT void v3270_set_session_host_type(GtkWidget *widget, LIB3270_HOST_TYPE);
247 248  
... ...
src/terminal/widget.c
... ... @@ -900,6 +900,12 @@ LIB3270_EXPORT void v3270_set_url(GtkWidget *widget, const gchar *uri)
900 900 lib3270_set_url(GTK_V3270(widget)->host,uri);
901 901 }
902 902  
  903 +LIB3270_EXPORT const gchar * v3270_get_url(GtkWidget *widget)
  904 +{
  905 + g_return_val_if_fail(GTK_IS_V3270(widget),NULL);
  906 + return lib3270_get_url(GTK_V3270(widget)->host);
  907 +}
  908 +
903 909 LIB3270_EXPORT const gchar * v3270_get_luname(GtkWidget *widget)
904 910 {
905 911 g_return_val_if_fail(GTK_IS_V3270(widget),"");
... ... @@ -969,6 +975,7 @@ LIB3270_EXPORT int v3270_set_host_charset(GtkWidget *widget, const gchar *name)
969 975 return lib3270_set_host_charset(GTK_V3270(widget)->host,name);
970 976 }
971 977  
  978 +/*
972 979 LIB3270_EXPORT GtkWidget * v3270_get_default_widget(void)
973 980 {
974 981 H3270 * hSession = lib3270_get_default_session_handle();
... ... @@ -989,6 +996,7 @@ LIB3270_EXPORT GtkWidget * v3270_get_default_widget(void)
989 996  
990 997 return GTK_WIDGET(widget);
991 998 }
  999 +*/
992 1000  
993 1001 void v3270_set_cursor(GtkWidget *widget, LIB3270_POINTER id)
994 1002 {
... ...