Commit c8b681f00b1d5c7edb66dd536f01d287fae6f9d7

Authored by Perry Werneck
1 parent 21e0261e

Cleaning up unused code.

updating v3270 calls.
src/pw3270/actions.c
... ... @@ -56,10 +56,6 @@
56 56 #define GDK_NUMLOCK_MASK GDK_MOD2_MASK
57 57 #endif
58 58  
59   - #ifdef DEBUG
60   - #include <lib3270/html.h>
61   - #endif
62   -
63 59 #define ERROR_DOMAIN g_quark_from_static_string(PACKAGE_NAME)
64 60 #define TOGGLE_GDKDEBUG LIB3270_TOGGLE_COUNT+1
65 61  
... ... @@ -281,26 +277,6 @@ static void kp_add_action(GtkAction *action, GtkWidget *widget)
281 277  
282 278 }
283 279  
284   -#ifdef DEBUG
285   -static void copy_as_html_action(GtkAction *action, GtkWidget *widget)
286   -{
287   - char * text;
288   - gchar * utf;
289   - H3270 * session = v3270_get_session(widget);
290   - GtkClipboard * clipboard = gtk_widget_get_clipboard(widget,GDK_SELECTION_CLIPBOARD);
291   -
292   - trace_action(action,widget);
293   -
294   - text = lib3270_get_as_html(session,LIB3270_HTML_OPTION_ALL|LIB3270_HTML_OPTION_FORM);
295   - utf = g_convert(text, -1, "UTF-8", lib3270_get_display_charset(session), NULL, NULL, NULL);
296   - lib3270_free(text);
297   -
298   - gtk_clipboard_set_text(clipboard,utf,-1);
299   - g_free(utf);
300   -
301   -}
302   -#endif // DEBUG
303   -
304 280 G_GNUC_INTERNAL void transfer_action(GtkAction *action, GtkWidget *widget)
305 281 {
306 282 GtkWidget * dialog = v3270ft_new(gtk_widget_get_toplevel(widget));
... ... @@ -352,12 +328,7 @@ static void connect_standard_action(GtkAction *action, GtkWidget *widget, const
352 328 { "about", about_dialog_action },
353 329 { "kpsubtract", kp_subtract_action },
354 330 { "kpadd", kp_add_action },
355   -// { "download", transfer_action },
356   -// { "upload", transfer_action },
357 331 { "transfer", transfer_action },
358   -#ifdef DEBUG
359   - { "copyashtml", copy_as_html_action },
360   -#endif // DEBUG
361 332 };
362 333  
363 334 int f;
... ...
src/pw3270/dialog.c
... ... @@ -404,7 +404,7 @@
404 404  
405 405 if(text)
406 406 {
407   - v3270_paste_text(widget,text,encoding);
  407 + v3270_input_text(widget,text,encoding);
408 408 g_free(text);
409 409 }
410 410  
... ...
src/pw3270/main.c
... ... @@ -519,7 +519,6 @@ int main(int argc, char *argv[])
519 519 gtk_settings_set_string_property(settings,"gtk-menu-bar-accel","Menu","");
520 520 }
521 521  
522   - pw3270_load_plugins(pluginpath);
523 522 toplevel = pw3270_new(host,systype,syscolors);
524 523 pw3270_set_session_name(toplevel,session_name);
525 524  
... ... @@ -527,6 +526,8 @@ int main(int argc, char *argv[])
527 526 pw3270_set_string(toplevel,"application","session",session_name);
528 527 #endif // _WIN32
529 528  
  529 + pw3270_load_plugins(pluginpath);
  530 +
530 531 if(toggleset)
531 532 {
532 533 gchar **str = g_strsplit(toggleset,",",-1);
... ...
src/pw3270/window.c
... ... @@ -375,6 +375,9 @@ static GtkWidget * trace_window = NULL;
375 375 LIB3270_EXPORT void pw3270_set_session_name(GtkWidget *widget, const gchar *name)
376 376 {
377 377 g_return_if_fail(GTK_IS_PW3270(widget));
  378 +
  379 + g_message("************** %s",name);
  380 +
378 381 v3270_set_session_name(GTK_PW3270(widget)->terminal,name);
379 382 }
380 383  
... ...