Commit d171fe56d965b49c76ab394d8d94e24714cc0eb9

Authored by Perry Werneck
1 parent 4ed6b219

Fixing bug on cursor movement reported by user

src/plugins/dbus3270/gobject.c
@@ -526,7 +526,7 @@ void pw3270_dbus_set_script(PW3270Dbus *object, const gchar *text, int mode, DBu @@ -526,7 +526,7 @@ void pw3270_dbus_set_script(PW3270Dbus *object, const gchar *text, int mode, DBu
526 return; 526 return;
527 } 527 }
528 528
529 - dbus_g_method_return(context,v3270_set_script(widget,*text,mode != 0)); 529 + dbus_g_method_return(context,v3270_set_script(widget,mode == 0 ? 0 : 'S'));
530 } 530 }
531 531
532 void pw3270_dbus_show_popup(PW3270Dbus *object, int id, const gchar *title, const gchar *msg, const gchar *text, DBusGMethodInvocation *context) 532 void pw3270_dbus_show_popup(PW3270Dbus *object, int id, const gchar *title, const gchar *msg, const gchar *text, DBusGMethodInvocation *context)
src/pw3270/actions.c
@@ -255,29 +255,6 @@ G_GNUC_INTERNAL void transfer_action(GtkAction *action, GtkWidget *widget) @@ -255,29 +255,6 @@ 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 - /*  
259 - #undef DECLARE_LIB3270_ACTION  
260 - #undef DECLARE_LIB3270_CLEAR_SELECTION_ACTION  
261 - #undef DECLARE_LIB3270_KEY_ACTION  
262 - #undef DECLARE_LIB3270_CURSOR_ACTION  
263 - #undef DECLARE_LIB3270_FKEY_ACTION  
264 -  
265 - #define DECLARE_LIB3270_ACTION( name ) { #name, lib3270_ ## name },  
266 - #define DECLARE_LIB3270_CLEAR_SELECTION_ACTION( name ) { #name, lib3270_ ## name },  
267 - #define DECLARE_LIB3270_KEY_ACTION( name ) { #name, lib3270_ ## name },  
268 - #define DECLARE_LIB3270_CURSOR_ACTION( name ) { #name, lib3270_cursor_ ## name },  
269 - #define DECLARE_LIB3270_FKEY_ACTION( name ) // name  
270 -  
271 - static const struct _lib3270_action  
272 - {  
273 - const gchar * name;  
274 - int (*call)(H3270 *h);  
275 - } lib3270_entry[] =  
276 - {  
277 - #include <lib3270/action_table.h>  
278 - };  
279 - */  
280 -  
281 static const struct _gtk_action 258 static const struct _gtk_action
282 { 259 {
283 const gchar * name; 260 const gchar * name;
src/pw3270/main.c
@@ -62,7 +62,6 @@ @@ -62,7 +62,6 @@
62 static const gchar * charset = NULL; 62 static const gchar * charset = NULL;
63 static const gchar * remap = NULL; 63 static const gchar * remap = NULL;
64 static const gchar * model = NULL; 64 static const gchar * model = NULL;
65 - static const gchar * pluginpath = NULL;  
66 65
67 const gchar * tracefile = NULL; 66 const gchar * tracefile = NULL;
68 67
@@ -279,9 +278,10 @@ static gboolean startup(GtkWidget *toplevel) @@ -279,9 +278,10 @@ static gboolean startup(GtkWidget *toplevel)
279 278
280 int main(int argc, char *argv[]) 279 int main(int argc, char *argv[])
281 { 280 {
282 - static const gchar * session_name = NULL;  
283 - static const gchar * host = NULL;  
284 - int rc = 0; 281 + const gchar * pluginpath = NULL;
  282 + const gchar * session_name = NULL;
  283 + const gchar * host = lib3270_get_default_host(NULL);
  284 + int rc = 0;
285 285
286 trace("%s",__FUNCTION__); 286 trace("%s",__FUNCTION__);
287 287
@@ -299,31 +299,31 @@ int main(int argc, char *argv[]) @@ -299,31 +299,31 @@ int main(int argc, char *argv[])
299 299
300 // Process command-line options 300 // Process command-line options
301 { 301 {
302 - static const GOptionEntry app_options[] = 302 + const GOptionEntry app_options[] =
303 { 303 {
304 #if ! defined( WIN32 ) 304 #if ! defined( WIN32 )
305 - { "appname", 'a', 0, G_OPTION_ARG_CALLBACK, appname, N_( "Application name" ), PACKAGE_NAME }, 305 + { "appname", 'a', 0, G_OPTION_ARG_CALLBACK, appname, N_( "Application name" ), PACKAGE_NAME },
306 #else 306 #else
307 - { "appname", 'a', 0, G_OPTION_ARG_STRING, &appname, N_( "Application name" ), PACKAGE_NAME },  
308 - { "datadir", 'd', 0, G_OPTION_ARG_CALLBACK, datadir, N_( "Path to application data files" ), NULL }, 307 + { "appname", 'a', 0, G_OPTION_ARG_STRING, &appname, N_( "Application name" ), PACKAGE_NAME },
  308 + { "datadir", 'd', 0, G_OPTION_ARG_CALLBACK, datadir, N_( "Path to application data files" ), NULL },
309 #endif // WIN32 309 #endif // WIN32
310 - { "session", 's', 0, G_OPTION_ARG_STRING, &session_name, N_( "Session name" ), NULL },  
311 - { "host", 'h', 0, G_OPTION_ARG_STRING, &host, N_( "Host to connect"), NULL },  
312 - { "colors", 'c', 0, G_OPTION_ARG_CALLBACK, optcolors, N_( "Set reported colors (8/16)" ), "16" },  
313 - { "systype", 't', 0, G_OPTION_ARG_STRING, &systype, N_( "Host system type" ), "S390" },  
314 - { "toggleset", 'S', 0, G_OPTION_ARG_STRING, &toggleset, N_( "Set toggles ON" ), NULL },  
315 - { "togglereset", 'R', 0, G_OPTION_ARG_STRING, &togglereset, N_( "Set toggles OFF" ), NULL },  
316 - { "charset", 'C', 0, G_OPTION_ARG_STRING, &charset, N_( "Set host charset" ), NULL },  
317 - { "remap", 'm', 0, G_OPTION_ARG_FILENAME, &remap, N_( "Remap charset from xml file" ), NULL },  
318 - { "model", 'M', 0, G_OPTION_ARG_STRING, &model, N_( "The model of 3270 display to be emulated" ), NULL },  
319 - { "autodisconnect", 'D', 0, G_OPTION_ARG_INT, &timer, N_( "Minutes for auto-disconnect" ), 0 },  
320 - { "pluginpath", 'P', 0, G_OPTION_ARG_STRING, &pluginpath, N_( "Path for plugin files" ), NULL }, 310 + { "session", 's', 0, G_OPTION_ARG_STRING, &session_name, N_( "Session name" ), NULL },
  311 + { "host", 'h', 0, G_OPTION_ARG_STRING, &host, N_( "Host to connect"), host },
  312 + { "colors", 'c', 0, G_OPTION_ARG_CALLBACK, optcolors, N_( "Set reported colors (8/16)" ), "16" },
  313 + { "systype", 't', 0, G_OPTION_ARG_STRING, &systype, N_( "Host system type" ), "S390" },
  314 + { "toggleset", 'S', 0, G_OPTION_ARG_STRING, &toggleset, N_( "Set toggles ON" ), NULL },
  315 + { "togglereset", 'R', 0, G_OPTION_ARG_STRING, &togglereset, N_( "Set toggles OFF" ), NULL },
  316 + { "charset", 'C', 0, G_OPTION_ARG_STRING, &charset, N_( "Set host charset" ), NULL },
  317 + { "remap", 'm', 0, G_OPTION_ARG_FILENAME, &remap, N_( "Remap charset from xml file" ), NULL },
  318 + { "model", 'M', 0, G_OPTION_ARG_STRING, &model, N_( "The model of 3270 display to be emulated" ), NULL },
  319 + { "autodisconnect", 'D', 0, G_OPTION_ARG_INT, &timer, N_( "Minutes for auto-disconnect" ), 0 },
  320 + { "pluginpath", 'P', 0, G_OPTION_ARG_STRING, &pluginpath, N_( "Path for plugin files" ), NULL },
321 321
322 #if defined( HAVE_SYSLOG ) 322 #if defined( HAVE_SYSLOG )
323 - { "syslog", 'l', 0, G_OPTION_ARG_NONE, &log_to_syslog, N_( "Send messages to syslog" ), NULL }, 323 + { "syslog", 'l', 0, G_OPTION_ARG_NONE, &log_to_syslog, N_( "Send messages to syslog" ), NULL },
324 #endif 324 #endif
325 - { "tracefile", 'T', 0, G_OPTION_ARG_FILENAME, &tracefile, N_( "Set trace filename" ), NULL },  
326 - { "log", 'L', 0, G_OPTION_ARG_FILENAME, &logfile, N_( "Log to file" ), NULL }, 325 + { "tracefile", 'T', 0, G_OPTION_ARG_FILENAME, &tracefile, N_( "Set trace filename" ), NULL },
  326 + { "log", 'L', 0, G_OPTION_ARG_FILENAME, &logfile, N_( "Log to file" ), NULL },
327 327
328 { NULL } 328 { NULL }
329 }; 329 };