Commit 16dca8a3b67635c3908a5b0da14e6efca99f5b68
1 parent
361db896
Exists in
master
and in
5 other branches
+ Updating LIB3270 API.
Showing
4 changed files
with
19 additions
and
7 deletions
Show diff stats
modules/lib3270
modules/libv3270
src/plugins/dbus3270/gobject.c
| @@ -118,12 +118,8 @@ void pw3270_dbus_set_ur_l(PW3270Dbus *object, const gchar *uri, DBusGMethodInvoc | @@ -118,12 +118,8 @@ void pw3270_dbus_set_ur_l(PW3270Dbus *object, const gchar *uri, DBusGMethodInvoc | ||
| 118 | 118 | ||
| 119 | void pw3270_dbus_get_ur_l(PW3270Dbus *object, DBusGMethodInvocation *context) | 119 | void pw3270_dbus_get_ur_l(PW3270Dbus *object, DBusGMethodInvocation *context) |
| 120 | { | 120 | { |
| 121 | - char buffer[1024]; | ||
| 122 | - | ||
| 123 | trace("%s object=%p context=%p",__FUNCTION__,object,context); | 121 | trace("%s object=%p context=%p",__FUNCTION__,object,context); |
| 124 | - | ||
| 125 | - lib3270_get_url(pw3270_dbus_get_session_handle(PW3270_DBUS(object)),buffer,sizeof(buffer)); | ||
| 126 | - dbus_g_method_return(context,buffer); | 122 | + dbus_g_method_return(context,lib3270_get_url(pw3270_dbus_get_session_handle(PW3270_DBUS(object)))); |
| 127 | } | 123 | } |
| 128 | 124 | ||
| 129 | 125 |
src/pw3270/actions.c
| @@ -255,6 +255,7 @@ G_GNUC_INTERNAL void transfer_action(GtkAction *action, GtkWidget *widget) | @@ -255,6 +255,7 @@ G_GNUC_INTERNAL void transfer_action(GtkAction *action, GtkWidget *widget) | ||
| 255 | 255 | ||
| 256 | static void connect_standard_action(GtkAction *action, GtkWidget *widget, const gchar *name) | 256 | static void connect_standard_action(GtkAction *action, GtkWidget *widget, const gchar *name) |
| 257 | { | 257 | { |
| 258 | + /* | ||
| 258 | #undef DECLARE_LIB3270_ACTION | 259 | #undef DECLARE_LIB3270_ACTION |
| 259 | #undef DECLARE_LIB3270_CLEAR_SELECTION_ACTION | 260 | #undef DECLARE_LIB3270_CLEAR_SELECTION_ACTION |
| 260 | #undef DECLARE_LIB3270_KEY_ACTION | 261 | #undef DECLARE_LIB3270_KEY_ACTION |
| @@ -275,6 +276,7 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const | @@ -275,6 +276,7 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const | ||
| 275 | { | 276 | { |
| 276 | #include <lib3270/action_table.h> | 277 | #include <lib3270/action_table.h> |
| 277 | }; | 278 | }; |
| 279 | + */ | ||
| 278 | 280 | ||
| 279 | static const struct _gtk_action | 281 | static const struct _gtk_action |
| 280 | { | 282 | { |
| @@ -304,6 +306,19 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const | @@ -304,6 +306,19 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const | ||
| 304 | int f; | 306 | int f; |
| 305 | 307 | ||
| 306 | // Search for lib3270 predefined actions | 308 | // Search for lib3270 predefined actions |
| 309 | + const LIB3270_ACTION_ENTRY * lib3270_actions = lib3270_get_action_table(); | ||
| 310 | + | ||
| 311 | + for(f=0; lib3270_actions[f].name; f++) | ||
| 312 | + { | ||
| 313 | + if(!g_ascii_strcasecmp(name,lib3270_actions[f].name)) | ||
| 314 | + { | ||
| 315 | + g_object_set_data(G_OBJECT(action),"lib3270_call",lib3270_actions[f].call); | ||
| 316 | + g_signal_connect(action,"activate",G_CALLBACK(do_lib3270_action),widget); | ||
| 317 | + return; | ||
| 318 | + } | ||
| 319 | + } | ||
| 320 | + | ||
| 321 | + /* | ||
| 307 | for(f=0;f<G_N_ELEMENTS(lib3270_entry);f++) | 322 | for(f=0;f<G_N_ELEMENTS(lib3270_entry);f++) |
| 308 | { | 323 | { |
| 309 | if(!g_ascii_strcasecmp(name,lib3270_entry[f].name)) | 324 | if(!g_ascii_strcasecmp(name,lib3270_entry[f].name)) |
| @@ -313,6 +328,7 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const | @@ -313,6 +328,7 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const | ||
| 313 | return; | 328 | return; |
| 314 | } | 329 | } |
| 315 | } | 330 | } |
| 331 | + */ | ||
| 316 | 332 | ||
| 317 | // Search for application actions | 333 | // Search for application actions |
| 318 | for(f=0;f<G_N_ELEMENTS(gtk_action);f++) | 334 | for(f=0;f<G_N_ELEMENTS(gtk_action);f++) |