Commit 2c58e1c9a29e1294512ce6b6027480563b4efa97
1 parent
577ee1d8
Exists in
master
and in
5 other branches
Disabling unused code.
Showing
3 changed files
with
31 additions
and
20 deletions
Show diff stats
src/pw3270/ft/filetransfer.c
| @@ -223,6 +223,7 @@ static void ft_update(H3270 *hSession, unsigned long current, unsigned long leng | @@ -223,6 +223,7 @@ static void ft_update(H3270 *hSession, unsigned long current, unsigned long leng | ||
| 223 | v3270_ft_progress_update(GTK_WIDGET(widget), current, length, kbytes_sec); | 223 | v3270_ft_progress_update(GTK_WIDGET(widget), current, length, kbytes_sec); |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | +/* | ||
| 226 | gint pw3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft) | 227 | gint pw3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft) |
| 227 | { | 228 | { |
| 228 | g_return_val_if_fail(GTK_IS_V3270(widget),0); | 229 | g_return_val_if_fail(GTK_IS_V3270(widget),0); |
| @@ -282,6 +283,7 @@ gint pw3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gc | @@ -282,6 +283,7 @@ gint pw3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gc | ||
| 282 | return rc; | 283 | return rc; |
| 283 | 284 | ||
| 284 | } | 285 | } |
| 286 | +*/ | ||
| 285 | 287 | ||
| 286 | void download_action(GtkAction *action, GtkWidget *widget) | 288 | void download_action(GtkAction *action, GtkWidget *widget) |
| 287 | { | 289 | { |
| @@ -313,15 +315,18 @@ void download_action(GtkAction *action, GtkWidget *widget) | @@ -313,15 +315,18 @@ void download_action(GtkAction *action, GtkWidget *widget) | ||
| 313 | ft_dialog_save(dialog,name); | 315 | ft_dialog_save(dialog,name); |
| 314 | gtk_widget_hide(dialog); | 316 | gtk_widget_hide(dialog); |
| 315 | 317 | ||
| 316 | - pw3270_transfer_file( widget, | ||
| 317 | - v3270_ft_dialog_get_options(dialog), | ||
| 318 | - v3270_ft_dialog_get_local_filename(dialog), | ||
| 319 | - v3270_ft_dialog_get_host_filename(dialog), | ||
| 320 | - v3270_ft_dialog_get_record_length(dialog), | ||
| 321 | - v3270_ft_dialog_get_block_size(dialog), | ||
| 322 | - v3270_ft_dialog_get_primary_space(dialog), | ||
| 323 | - v3270_ft_dialog_get_secondary_space(dialog), | ||
| 324 | - v3270_ft_dialog_get_dft_buffer_size(dialog)); | 318 | + v3270_transfer_file( |
| 319 | + widget, | ||
| 320 | + v3270_ft_dialog_get_options(dialog), | ||
| 321 | + v3270_ft_dialog_get_local_filename(dialog), | ||
| 322 | + v3270_ft_dialog_get_host_filename(dialog), | ||
| 323 | + v3270_ft_dialog_get_record_length(dialog), | ||
| 324 | + v3270_ft_dialog_get_block_size(dialog), | ||
| 325 | + v3270_ft_dialog_get_primary_space(dialog), | ||
| 326 | + v3270_ft_dialog_get_secondary_space(dialog), | ||
| 327 | + v3270_ft_dialog_get_dft_buffer_size(dialog) | ||
| 328 | + ); | ||
| 329 | + | ||
| 325 | } | 330 | } |
| 326 | 331 | ||
| 327 | gtk_widget_destroy(dialog); | 332 | gtk_widget_destroy(dialog); |
| @@ -347,7 +352,7 @@ void upload_action(GtkAction *action, GtkWidget *widget) | @@ -347,7 +352,7 @@ void upload_action(GtkAction *action, GtkWidget *widget) | ||
| 347 | return; | 352 | return; |
| 348 | } | 353 | } |
| 349 | 354 | ||
| 350 | - GtkWidget *dialog = v3270_ft_dialog_new(widget,LIB3270_FT_OPTION_SEND|get_options_from_config(name)); | 355 | + GtkWidget *dialog = v3270_ft_dialog_new(widget,LIB3270_FT_OPTION_SEND|get_options_from_config(name)); |
| 351 | 356 | ||
| 352 | v3270_ft_dialog_set_tso(dialog,lib3270_is_tso(v3270_get_session(widget))); | 357 | v3270_ft_dialog_set_tso(dialog,lib3270_is_tso(v3270_get_session(widget))); |
| 353 | ft_dialog_load(dialog,name); | 358 | ft_dialog_load(dialog,name); |
| @@ -357,15 +362,17 @@ void upload_action(GtkAction *action, GtkWidget *widget) | @@ -357,15 +362,17 @@ void upload_action(GtkAction *action, GtkWidget *widget) | ||
| 357 | ft_dialog_save(dialog,name); | 362 | ft_dialog_save(dialog,name); |
| 358 | gtk_widget_hide(dialog); | 363 | gtk_widget_hide(dialog); |
| 359 | 364 | ||
| 360 | - pw3270_transfer_file( widget, | ||
| 361 | - v3270_ft_dialog_get_options(dialog), | ||
| 362 | - v3270_ft_dialog_get_local_filename(dialog), | ||
| 363 | - v3270_ft_dialog_get_host_filename(dialog), | ||
| 364 | - v3270_ft_dialog_get_record_length(dialog), | ||
| 365 | - v3270_ft_dialog_get_block_size(dialog), | ||
| 366 | - v3270_ft_dialog_get_primary_space(dialog), | ||
| 367 | - v3270_ft_dialog_get_secondary_space(dialog), | ||
| 368 | - v3270_ft_dialog_get_dft_buffer_size(dialog)); | 365 | + v3270_transfer_file( |
| 366 | + widget, | ||
| 367 | + v3270_ft_dialog_get_options(dialog), | ||
| 368 | + v3270_ft_dialog_get_local_filename(dialog), | ||
| 369 | + v3270_ft_dialog_get_host_filename(dialog), | ||
| 370 | + v3270_ft_dialog_get_record_length(dialog), | ||
| 371 | + v3270_ft_dialog_get_block_size(dialog), | ||
| 372 | + v3270_ft_dialog_get_primary_space(dialog), | ||
| 373 | + v3270_ft_dialog_get_secondary_space(dialog), | ||
| 374 | + v3270_ft_dialog_get_dft_buffer_size(dialog) | ||
| 375 | + ); | ||
| 369 | } | 376 | } |
| 370 | 377 | ||
| 371 | gtk_widget_destroy(dialog); | 378 | gtk_widget_destroy(dialog); |
src/pw3270/ft/ftprogress.c
| @@ -79,6 +79,7 @@ | @@ -79,6 +79,7 @@ | ||
| 79 | 79 | ||
| 80 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 80 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
| 81 | 81 | ||
| 82 | +/* | ||
| 82 | static void v3270FTProgress_class_init(v3270FTProgressClass *klass) | 83 | static void v3270FTProgress_class_init(v3270FTProgressClass *klass) |
| 83 | { | 84 | { |
| 84 | #if GTK_CHECK_VERSION(3,0,0) | 85 | #if GTK_CHECK_VERSION(3,0,0) |
| @@ -325,3 +326,4 @@ void v3270_ft_progress_set_filenames(GtkWidget *widget, const gchar *from, const | @@ -325,3 +326,4 @@ void v3270_ft_progress_set_filenames(GtkWidget *widget, const gchar *from, const | ||
| 325 | gtk_label_set_text(GTK_V3270FTProcess(widget)->text[TEXT_FROM],from); | 326 | gtk_label_set_text(GTK_V3270FTProcess(widget)->text[TEXT_FROM],from); |
| 326 | gtk_label_set_text(GTK_V3270FTProcess(widget)->text[TEXT_TO],to); | 327 | gtk_label_set_text(GTK_V3270FTProcess(widget)->text[TEXT_TO],to); |
| 327 | } | 328 | } |
| 329 | +*/ |
src/pw3270/ft/v3270ft.h
| @@ -91,14 +91,16 @@ | @@ -91,14 +91,16 @@ | ||
| 91 | LIB3270_EXPORT gint v3270_ft_dialog_get_primary_space(GtkWidget *widget); | 91 | LIB3270_EXPORT gint v3270_ft_dialog_get_primary_space(GtkWidget *widget); |
| 92 | LIB3270_EXPORT gint v3270_ft_dialog_get_secondary_space(GtkWidget *widget); | 92 | LIB3270_EXPORT gint v3270_ft_dialog_get_secondary_space(GtkWidget *widget); |
| 93 | 93 | ||
| 94 | + /* | ||
| 94 | LIB3270_EXPORT GtkWidget * v3270_ft_progress_new(void); | 95 | LIB3270_EXPORT GtkWidget * v3270_ft_progress_new(void); |
| 95 | LIB3270_EXPORT void v3270_ft_progress_update(GtkWidget *widget, unsigned long current, unsigned long total, double kbytes_sec); | 96 | LIB3270_EXPORT void v3270_ft_progress_update(GtkWidget *widget, unsigned long current, unsigned long total, double kbytes_sec); |
| 96 | LIB3270_EXPORT void v3270_ft_progress_set_message(GtkWidget *widget, const gchar *msg); | 97 | LIB3270_EXPORT void v3270_ft_progress_set_message(GtkWidget *widget, const gchar *msg); |
| 97 | LIB3270_EXPORT void v3270_ft_progress_set_filenames(GtkWidget *widget, const gchar *from, const gchar *to); | 98 | LIB3270_EXPORT void v3270_ft_progress_set_filenames(GtkWidget *widget, const gchar *from, const gchar *to); |
| 98 | LIB3270_EXPORT void v3270_ft_progress_complete(GtkWidget *widget,unsigned long length,double kbytes_sec); | 99 | LIB3270_EXPORT void v3270_ft_progress_complete(GtkWidget *widget,unsigned long length,double kbytes_sec); |
| 100 | + */ | ||
| 99 | 101 | ||
| 100 | // File transfer | 102 | // File transfer |
| 101 | - LIB3270_EXPORT gint pw3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft); | 103 | + // LIB3270_EXPORT gint pw3270_transfer_file(GtkWidget *widget, LIB3270_FT_OPTION options, const gchar *local, const gchar *remote, int lrecl, int blksize, int primspace, int secspace, int dft); |
| 102 | 104 | ||
| 103 | 105 | ||
| 104 | G_END_DECLS | 106 | G_END_DECLS |