Commit 24e1c589218fb108404f50ae23aa7dd398e181d0
1 parent
913d1cda
Exists in
master
and in
5 other branches
Adding support for oversize.
Showing
4 changed files
with
16 additions
and
12 deletions
Show diff stats
Makefile.in
| @@ -210,8 +210,7 @@ $(POTDIR)/%.pot: \ | @@ -210,8 +210,7 @@ $(POTDIR)/%.pot: \ | ||
| 210 | #---[ Debug Targets ]-------------------------------------------------------------------- | 210 | #---[ Debug Targets ]-------------------------------------------------------------------- |
| 211 | 211 | ||
| 212 | Debug: \ | 212 | Debug: \ |
| 213 | - $(BINDBG)/$(PACKAGE_TARNAME)@EXEEXT@ \ | ||
| 214 | - $(BINDBG)/libpw3270cpp.a | 213 | + $(BINDBG)/$(PACKAGE_TARNAME)@EXEEXT@ |
| 215 | 214 | ||
| 216 | publish-debug: \ | 215 | publish-debug: \ |
| 217 | $(BINDBG)/$(PACKAGE_TARNAME)@EXEEXT@ | 216 | $(BINDBG)/$(PACKAGE_TARNAME)@EXEEXT@ |
src/include/pw3270.h
| @@ -68,6 +68,7 @@ | @@ -68,6 +68,7 @@ | ||
| 68 | 68 | ||
| 69 | LIB3270_EXPORT const gchar * pw3270_get_session_name(GtkWidget *widget); | 69 | LIB3270_EXPORT const gchar * pw3270_get_session_name(GtkWidget *widget); |
| 70 | LIB3270_EXPORT void pw3270_set_session_name(GtkWidget *widget, const gchar *name); | 70 | LIB3270_EXPORT void pw3270_set_session_name(GtkWidget *widget, const gchar *name); |
| 71 | + LIB3270_EXPORT void pw3270_set_oversize(GtkWidget *widget, const gchar *oversize); | ||
| 71 | LIB3270_EXPORT void pw3270_set_host_type(GtkWidget *widget, const gchar *name); | 72 | LIB3270_EXPORT void pw3270_set_host_type(GtkWidget *widget, const gchar *name); |
| 72 | LIB3270_EXPORT int pw3270_set_session_color_type(GtkWidget *widget, unsigned short color_type); | 73 | LIB3270_EXPORT int pw3270_set_session_color_type(GtkWidget *widget, unsigned short color_type); |
| 73 | 74 |
src/pw3270/main.c
| @@ -63,7 +63,7 @@ | @@ -63,7 +63,7 @@ | ||
| 63 | static const gchar * charset = NULL; | 63 | static const gchar * charset = NULL; |
| 64 | static const gchar * remap = NULL; | 64 | static const gchar * remap = NULL; |
| 65 | static const gchar * model = NULL; | 65 | static const gchar * model = NULL; |
| 66 | - | 66 | + static const gchar * oversize = NULL; |
| 67 | const gchar * tracefile = NULL; | 67 | const gchar * tracefile = NULL; |
| 68 | 68 | ||
| 69 | #ifdef HAVE_GTKMAC | 69 | #ifdef HAVE_GTKMAC |
| @@ -306,6 +306,7 @@ int main(int argc, char *argv[]) | @@ -306,6 +306,7 @@ int main(int argc, char *argv[]) | ||
| 306 | { "charset", 'C', 0, G_OPTION_ARG_STRING, &charset, N_( "Set host charset" ), NULL }, | 306 | { "charset", 'C', 0, G_OPTION_ARG_STRING, &charset, N_( "Set host charset" ), NULL }, |
| 307 | { "remap", 'm', 0, G_OPTION_ARG_FILENAME, &remap, N_( "Remap charset from xml file" ), NULL }, | 307 | { "remap", 'm', 0, G_OPTION_ARG_FILENAME, &remap, N_( "Remap charset from xml file" ), NULL }, |
| 308 | { "model", 'M', 0, G_OPTION_ARG_STRING, &model, N_( "The model of 3270 display to be emulated" ), NULL }, | 308 | { "model", 'M', 0, G_OPTION_ARG_STRING, &model, N_( "The model of 3270 display to be emulated" ), NULL }, |
| 309 | + { "oversize", 'O', 0, G_OPTION_ARG_STRING, &oversize, N_( "Makes the screen larger than the default for the chosen model number." ), NULL }, | ||
| 309 | { "autodisconnect", 'D', 0, G_OPTION_ARG_INT, &timer, N_( "Minutes for auto-disconnect" ), 0 }, | 310 | { "autodisconnect", 'D', 0, G_OPTION_ARG_INT, &timer, N_( "Minutes for auto-disconnect" ), 0 }, |
| 310 | { "pluginpath", 'P', 0, G_OPTION_ARG_STRING, &pluginpath, N_( "Path for plugin files" ), NULL }, | 311 | { "pluginpath", 'P', 0, G_OPTION_ARG_STRING, &pluginpath, N_( "Path for plugin files" ), NULL }, |
| 311 | 312 | ||
| @@ -375,15 +376,6 @@ int main(int argc, char *argv[]) | @@ -375,15 +376,6 @@ int main(int argc, char *argv[]) | ||
| 375 | 376 | ||
| 376 | g_log_set_default_handler(g_log_to_lib3270,NULL); | 377 | g_log_set_default_handler(g_log_to_lib3270,NULL); |
| 377 | 378 | ||
| 378 | -/* | ||
| 379 | -#if defined( HAVE_SYSLOG ) | ||
| 380 | - if(log_to_syslog) | ||
| 381 | - { | ||
| 382 | - openlog(g_get_prgname(), LOG_NDELAY, LOG_USER); | ||
| 383 | - } | ||
| 384 | -#endif // HAVE_SYSLOG | ||
| 385 | -*/ | ||
| 386 | - | ||
| 387 | 379 | ||
| 388 | #ifdef _WIN32 | 380 | #ifdef _WIN32 |
| 389 | { | 381 | { |
| @@ -454,6 +446,9 @@ int main(int argc, char *argv[]) | @@ -454,6 +446,9 @@ int main(int argc, char *argv[]) | ||
| 454 | toplevel = pw3270_new(host,systype,syscolors); | 446 | toplevel = pw3270_new(host,systype,syscolors); |
| 455 | pw3270_set_session_name(toplevel,session_name); | 447 | pw3270_set_session_name(toplevel,session_name); |
| 456 | 448 | ||
| 449 | + if(oversize) | ||
| 450 | + pw3270_set_oversize(toplevel,oversize); | ||
| 451 | + | ||
| 457 | #ifdef _WIN32 | 452 | #ifdef _WIN32 |
| 458 | pw3270_set_string(toplevel,"application","session",session_name); | 453 | pw3270_set_string(toplevel,"application","session",session_name); |
| 459 | #endif // _WIN32 | 454 | #endif // _WIN32 |
src/pw3270/window.c
| @@ -35,6 +35,7 @@ | @@ -35,6 +35,7 @@ | ||
| 35 | #include <lib3270/actions.h> | 35 | #include <lib3270/actions.h> |
| 36 | #include <lib3270/trace.h> | 36 | #include <lib3270/trace.h> |
| 37 | #include <lib3270/toggle.h> | 37 | #include <lib3270/toggle.h> |
| 38 | +#include <lib3270/properties.h> | ||
| 38 | #include <v3270/trace.h> | 39 | #include <v3270/trace.h> |
| 39 | 40 | ||
| 40 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ | 41 | /*--[ Widget definition ]----------------------------------------------------------------------------*/ |
| @@ -98,6 +99,8 @@ | @@ -98,6 +99,8 @@ | ||
| 98 | 99 | ||
| 99 | static GtkWidget * trace_window = NULL; | 100 | static GtkWidget * trace_window = NULL; |
| 100 | 101 | ||
| 102 | + const gchar * oversize = NULL; | ||
| 103 | + | ||
| 101 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 104 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
| 102 | 105 | ||
| 103 | #if GTK_CHECK_VERSION(3,0,0) | 106 | #if GTK_CHECK_VERSION(3,0,0) |
| @@ -379,6 +382,12 @@ static GtkWidget * trace_window = NULL; | @@ -379,6 +382,12 @@ static GtkWidget * trace_window = NULL; | ||
| 379 | v3270_set_session_name(GTK_PW3270(widget)->terminal,name); | 382 | v3270_set_session_name(GTK_PW3270(widget)->terminal,name); |
| 380 | } | 383 | } |
| 381 | 384 | ||
| 385 | + LIB3270_EXPORT void pw3270_set_oversize(GtkWidget *widget, const gchar *oversize) | ||
| 386 | + { | ||
| 387 | + g_return_if_fail(GTK_IS_PW3270(widget)); | ||
| 388 | + lib3270_set_oversize(pw3270_get_session(widget),oversize); | ||
| 389 | + } | ||
| 390 | + | ||
| 382 | LIB3270_EXPORT void pw3270_set_host_type(GtkWidget *widget, const gchar *name) | 391 | LIB3270_EXPORT void pw3270_set_host_type(GtkWidget *widget, const gchar *name) |
| 383 | { | 392 | { |
| 384 | size_t f; | 393 | size_t f; |