Commit 5c798d437ee03a923ff2bdb7d29263eb121b58b2
1 parent
6cc87a97
Exists in
master
and in
5 other branches
Incluindo teste pelo novo gtk para remoção de warnings
Showing
3 changed files
with
31 additions
and
0 deletions
Show diff stats
src/classlib/session.cc
| @@ -463,6 +463,13 @@ | @@ -463,6 +463,13 @@ | ||
| 463 | return string(ebc2asc(buffer,sz)); | 463 | return string(ebc2asc(buffer,sz)); |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | + int session::file_transfer(LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft) | ||
| 467 | + { | ||
| 468 | + log("Can't transfer %s: File transfer is unavailable", local ? local : "file"); | ||
| 469 | + return EINVAL; | ||
| 470 | + } | ||
| 471 | + | ||
| 472 | + | ||
| 466 | } | 473 | } |
| 467 | 474 | ||
| 468 | 475 |
src/include/pw3270/class.h
| @@ -42,6 +42,7 @@ | @@ -42,6 +42,7 @@ | ||
| 42 | #include <lib3270/config.h> | 42 | #include <lib3270/config.h> |
| 43 | #include <lib3270.h> | 43 | #include <lib3270.h> |
| 44 | #include <lib3270/popup.h> | 44 | #include <lib3270/popup.h> |
| 45 | + #include <lib3270/filetransfer.h> | ||
| 45 | 46 | ||
| 46 | #ifdef HAVE_ICONV | 47 | #ifdef HAVE_ICONV |
| 47 | #include <iconv.h> | 48 | #include <iconv.h> |
| @@ -188,6 +189,9 @@ | @@ -188,6 +189,9 @@ | ||
| 188 | virtual int popup_dialog(LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...); | 189 | virtual int popup_dialog(LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...); |
| 189 | virtual string * file_chooser_dialog(GtkFileChooserAction action, const char *title, const char *extension, const char *filename); | 190 | virtual string * file_chooser_dialog(GtkFileChooserAction action, const char *title, const char *extension, const char *filename); |
| 190 | 191 | ||
| 192 | + // File transfer | ||
| 193 | + virtual int file_transfer(LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl = 0, int blksize = 0, int primspace = 0, int secspace = 0, int dft = 4096); | ||
| 194 | + | ||
| 191 | // Charset translation | 195 | // Charset translation |
| 192 | string * get_3270_text(string *str); | 196 | string * get_3270_text(string *str); |
| 193 | string * get_local_text(string *str); | 197 | string * get_local_text(string *str); |
src/plugins/rx3270/pluginmain.cc
| @@ -138,6 +138,8 @@ | @@ -138,6 +138,8 @@ | ||
| 138 | const char * asc2ebc(unsigned char *str, int sz = -1); | 138 | const char * asc2ebc(unsigned char *str, int sz = -1); |
| 139 | const char * ebc2asc(unsigned char *str, int sz = -1); | 139 | const char * ebc2asc(unsigned char *str, int sz = -1); |
| 140 | 140 | ||
| 141 | + int file_transfer(LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl = 0, int blksize = 0, int primspace = 0, int secspace = 0, int dft = 4096); | ||
| 142 | + | ||
| 141 | int quit(void); | 143 | int quit(void); |
| 142 | 144 | ||
| 143 | protected: | 145 | protected: |
| @@ -401,7 +403,11 @@ extern "C" | @@ -401,7 +403,11 @@ extern "C" | ||
| 401 | { | 403 | { |
| 402 | gchar *filename = (gchar *) g_object_get_data(G_OBJECT(action),"src"); | 404 | gchar *filename = (gchar *) g_object_get_data(G_OBJECT(action),"src"); |
| 403 | 405 | ||
| 406 | +#if GTK_CHECK_VERSION(3,10,0) | ||
| 407 | + lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p",g_action_get_name(G_ACTION(action)),widget); | ||
| 408 | +#else | ||
| 404 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p",gtk_action_get_name(action),widget); | 409 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p",gtk_action_get_name(action),widget); |
| 410 | +#endif // GTK_CHECK_VERSION | ||
| 405 | 411 | ||
| 406 | #if GTK_CHECK_VERSION(2,32,0) | 412 | #if GTK_CHECK_VERSION(2,32,0) |
| 407 | if(!g_mutex_trylock(&mutex)) | 413 | if(!g_mutex_trylock(&mutex)) |
| @@ -423,7 +429,12 @@ extern "C" | @@ -423,7 +429,12 @@ extern "C" | ||
| 423 | return; | 429 | return; |
| 424 | } | 430 | } |
| 425 | 431 | ||
| 432 | +#if GTK_CHECK_VERSION(3,10,0) | ||
| 433 | + g_simple_action_set_enabled(G_SIMPLE_ACTION(action),FALSE); | ||
| 434 | +#else | ||
| 426 | gtk_action_set_sensitive(action,FALSE); | 435 | gtk_action_set_sensitive(action,FALSE); |
| 436 | +#endif // GTK(3,10) | ||
| 437 | + | ||
| 427 | 438 | ||
| 428 | if(filename) | 439 | if(filename) |
| 429 | { | 440 | { |
| @@ -466,7 +477,12 @@ extern "C" | @@ -466,7 +477,12 @@ extern "C" | ||
| 466 | 477 | ||
| 467 | } | 478 | } |
| 468 | 479 | ||
| 480 | +#if GTK_CHECK_VERSION(3,10,0) | ||
| 481 | + g_simple_action_set_enabled(G_SIMPLE_ACTION(action),TRUE); | ||
| 482 | +#else | ||
| 469 | gtk_action_set_sensitive(action,TRUE); | 483 | gtk_action_set_sensitive(action,TRUE); |
| 484 | +#endif // GTK(3,10) | ||
| 485 | + | ||
| 470 | #if GTK_CHECK_VERSION(2,32,0) | 486 | #if GTK_CHECK_VERSION(2,32,0) |
| 471 | g_mutex_unlock(&mutex); | 487 | g_mutex_unlock(&mutex); |
| 472 | #else | 488 | #else |
| @@ -771,3 +787,7 @@ const char * plugin::ebc2asc(unsigned char *str, int sz) | @@ -771,3 +787,7 @@ const char * plugin::ebc2asc(unsigned char *str, int sz) | ||
| 771 | return lib3270_ebc2asc(hSession,str,sz); | 787 | return lib3270_ebc2asc(hSession,str,sz); |
| 772 | } | 788 | } |
| 773 | 789 | ||
| 790 | +int plugin::file_transfer(LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft) | ||
| 791 | +{ | ||
| 792 | + return v3270_transfer_file(v3270_get_default_widget(),options,local,remote,lrecl,blksize,primspace,secspace,dft); | ||
| 793 | +} |