Commit 5c798d437ee03a923ff2bdb7d29263eb121b58b2

Authored by perry.werneck@gmail.com
1 parent 6cc87a97

Incluindo teste pelo novo gtk para remoção de warnings

src/classlib/session.cc
... ... @@ -463,6 +463,13 @@
463 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 42 #include <lib3270/config.h>
43 43 #include <lib3270.h>
44 44 #include <lib3270/popup.h>
  45 + #include <lib3270/filetransfer.h>
45 46  
46 47 #ifdef HAVE_ICONV
47 48 #include <iconv.h>
... ... @@ -188,6 +189,9 @@
188 189 virtual int popup_dialog(LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...);
189 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 195 // Charset translation
192 196 string * get_3270_text(string *str);
193 197 string * get_local_text(string *str);
... ...
src/plugins/rx3270/pluginmain.cc
... ... @@ -138,6 +138,8 @@
138 138 const char * asc2ebc(unsigned char *str, int sz = -1);
139 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 143 int quit(void);
142 144  
143 145 protected:
... ... @@ -401,7 +403,11 @@ extern &quot;C&quot;
401 403 {
402 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 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 412 #if GTK_CHECK_VERSION(2,32,0)
407 413 if(!g_mutex_trylock(&mutex))
... ... @@ -423,7 +429,12 @@ extern &quot;C&quot;
423 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 435 gtk_action_set_sensitive(action,FALSE);
  436 +#endif // GTK(3,10)
  437 +
427 438  
428 439 if(filename)
429 440 {
... ... @@ -466,7 +477,12 @@ extern &quot;C&quot;
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 483 gtk_action_set_sensitive(action,TRUE);
  484 +#endif // GTK(3,10)
  485 +
470 486 #if GTK_CHECK_VERSION(2,32,0)
471 487 g_mutex_unlock(&mutex);
472 488 #else
... ... @@ -771,3 +787,7 @@ const char * plugin::ebc2asc(unsigned char *str, int sz)
771 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 +}
... ...