Commit 26cbd9c4db82b1955ad48e14667588f32da40c20
1 parent
8ea94de1
Exists in
master
and in
5 other branches
Revertendo uso de g_action; precisa de mais ajustes
Showing
3 changed files
with
8 additions
and
7 deletions
Show diff stats
src/plugins/rx3270/pluginmain.cc
... | ... | @@ -403,11 +403,7 @@ extern "C" |
403 | 403 | { |
404 | 404 | gchar *filename = (gchar *) g_object_get_data(G_OBJECT(action),"src"); |
405 | 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 | |
409 | 406 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p",gtk_action_get_name(action),widget); |
410 | -#endif // GTK_CHECK_VERSION | |
411 | 407 | |
412 | 408 | #if GTK_CHECK_VERSION(2,32,0) |
413 | 409 | if(!g_mutex_trylock(&mutex)) | ... | ... |
src/pw3270/actions.c
... | ... | @@ -47,7 +47,8 @@ |
47 | 47 | #define ERROR_DOMAIN g_quark_from_static_string(PACKAGE_NAME) |
48 | 48 | #define TOGGLE_GDKDEBUG LIB3270_TOGGLE_COUNT+1 |
49 | 49 | |
50 | - #ifdef X3270_TRACE | |
50 | + | |
51 | + #if defined(X3270_TRACE) | |
51 | 52 | #define trace_action(a,w) lib3270_trace_event(v3270_get_session(w),"Action %s activated on widget %p\n",gtk_action_get_name(a),w); |
52 | 53 | #else |
53 | 54 | #define trace_action(a,w) /* */ |
... | ... | @@ -371,13 +372,16 @@ static void connect_move_action(GtkAction *action, GtkWidget *widget, const gcha |
371 | 372 | static void action_pfkey(GtkAction *action, GtkWidget *widget) |
372 | 373 | { |
373 | 374 | int key = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"pfkey")); |
375 | + | |
374 | 376 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p key=%d\n",gtk_action_get_name(action),widget,key); |
377 | + | |
375 | 378 | lib3270_pfkey(v3270_get_session(widget),key); |
376 | 379 | } |
377 | 380 | |
378 | 381 | static void action_pakey(GtkAction *action, GtkWidget *widget) |
379 | 382 | { |
380 | 383 | int key = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"pakey")); |
384 | + | |
381 | 385 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p key=%d\n",gtk_action_get_name(action),widget,key); |
382 | 386 | lib3270_pakey(v3270_get_session(widget),key); |
383 | 387 | } |
... | ... | @@ -385,6 +389,7 @@ static void action_pakey(GtkAction *action, GtkWidget *widget) |
385 | 389 | static void action_set_toggle(GtkAction *action, GtkWidget *widget) |
386 | 390 | { |
387 | 391 | LIB3270_TOGGLE id = (LIB3270_TOGGLE) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(action),"toggle_id")); |
392 | + | |
388 | 393 | lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p toggle=%d\n",gtk_action_get_name(action),widget,id); |
389 | 394 | lib3270_set_toggle(v3270_get_session(widget),id,1); |
390 | 395 | } |
... | ... | @@ -398,7 +403,7 @@ static void action_reset_toggle(GtkAction *action, GtkWidget *widget) |
398 | 403 | |
399 | 404 | static void action_select_all(GtkAction *action, GtkWidget *widget) |
400 | 405 | { |
401 | - lib3270_trace_event(v3270_get_session(widget),"Action %s activated on widget %p\n",gtk_action_get_name(action),widget); | |
406 | + trace_action(action,widget); | |
402 | 407 | lib3270_select_all(v3270_get_session(widget)); |
403 | 408 | } |
404 | 409 | ... | ... |
src/pw3270/ft/ftdialog.c
... | ... | @@ -357,7 +357,7 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) |
357 | 357 | gtk_dialog_add_button(GTK_DIALOG(dialog),_( "_Cancel" ), GTK_RESPONSE_CANCEL); |
358 | 358 | |
359 | 359 | dialog->ready = gtk_dialog_add_button(GTK_DIALOG(dialog), |
360 | - (dialog->options & LIB3270_FT_OPTION_RECEIVE) != 0 ? _( "_Send") : _( "_Save" ), | |
360 | + (dialog->options & LIB3270_FT_OPTION_RECEIVE) != 0 ? _( "_Save") : _( "_Send" ), | |
361 | 361 | GTK_RESPONSE_ACCEPT); |
362 | 362 | |
363 | 363 | gtk_widget_set_sensitive(dialog->ready,FALSE); | ... | ... |