diff --git a/src/include/v3270/actions.h b/src/include/v3270/actions.h index 5405c60..52e76ff 100644 --- a/src/include/v3270/actions.h +++ b/src/include/v3270/actions.h @@ -52,7 +52,7 @@ guint key; GdkModifierType mods; - int (*activate)(GtkWidget *widget, const struct _v3270_action *action); + int (*activate)(const struct _v3270_action *action, GtkWidget *widget); } V3270_ACTION; diff --git a/src/terminal/actions/clipboard.c b/src/terminal/actions/clipboard.c index 20a0d6d..9b4c273 100644 --- a/src/terminal/actions/clipboard.c +++ b/src/terminal/actions/clipboard.c @@ -34,7 +34,7 @@ /*--[ Implement ]------------------------------------------------------------------------------------*/ - int fire_copy_accelerator(GtkWidget *widget, const V3270_ACTION * action) { + int fire_copy_accelerator(const V3270_ACTION * action, GtkWidget *widget) { debug("%s",__FUNCTION__); @@ -47,7 +47,7 @@ return EINVAL; } - int fire_paste_accelerator(GtkWidget *widget, const V3270_ACTION * action) { + int fire_paste_accelerator(const V3270_ACTION * action, GtkWidget *widget) { switch((int) action->flags) diff --git a/src/terminal/actions/private.h b/src/terminal/actions/private.h index c1ee62e..59abdd6 100644 --- a/src/terminal/actions/private.h +++ b/src/terminal/actions/private.h @@ -32,8 +32,8 @@ #include #include - G_GNUC_INTERNAL int fire_copy_accelerator(GtkWidget *widget, const struct _v3270_action * action); - G_GNUC_INTERNAL int fire_paste_accelerator(GtkWidget *widget, const struct _v3270_action * action); - G_GNUC_INTERNAL int fire_zoom_action(GtkWidget *widget, const struct _v3270_action * action); - G_GNUC_INTERNAL int fire_keypad_action(GtkWidget *widget, const struct _v3270_action * action); + G_GNUC_INTERNAL int fire_copy_accelerator(const V3270_ACTION *action, GtkWidget *widget); + G_GNUC_INTERNAL int fire_paste_accelerator(const V3270_ACTION *action, GtkWidget *widget); + G_GNUC_INTERNAL int fire_zoom_action(const V3270_ACTION *action, GtkWidget *widget); + G_GNUC_INTERNAL int fire_keypad_action(const V3270_ACTION *action, GtkWidget *widget); diff --git a/src/terminal/actions/zoom.c b/src/terminal/actions/zoom.c index fa578f4..8cba2b5 100644 --- a/src/terminal/actions/zoom.c +++ b/src/terminal/actions/zoom.c @@ -34,11 +34,11 @@ /*--[ Implement ]------------------------------------------------------------------------------------*/ - int fire_zoom_action(GtkWidget *widget, const V3270_ACTION * action) { + int fire_zoom_action(const V3270_ACTION *action, GtkWidget *widget) { debug("%s",__FUNCTION__); - switch(action->flags) + switch( ((int) action->flags) ) { case 0: // Zoom in v3270_zoom_in(widget); diff --git a/src/terminal/keyboard/accelerator.c b/src/terminal/keyboard/accelerator.c index 4dd496a..10fc154 100644 --- a/src/terminal/keyboard/accelerator.c +++ b/src/terminal/keyboard/accelerator.c @@ -71,7 +71,7 @@ void v3270_accelerator_activate(const V3270Accelerator * acel, GtkWidget *terminal) { - int rc = ((int (*)(GtkWidget *, const void *)) acel->activate)(terminal,acel->arg); + int rc = ((int (*)(gconstpointer, GtkWidget *)) acel->activate)(acel->arg,terminal); if(rc) gdk_display_beep(gdk_display_get_default()); diff --git a/src/terminal/keyboard/init.c b/src/terminal/keyboard/init.c index 0ce16b7..8ff5530 100644 --- a/src/terminal/keyboard/init.c +++ b/src/terminal/keyboard/init.c @@ -46,7 +46,7 @@ /*--[ Implement ]------------------------------------------------------------------------------------*/ - static int fire_lib3270_action(GtkWidget *widget, const LIB3270_ACTION * action) + static int fire_lib3270_action(const LIB3270_ACTION * action, GtkWidget *widget) { int rc = EPERM; @@ -62,13 +62,13 @@ } - static int fire_lib3270_toggle(GtkWidget *widget, const LIB3270_TOGGLE * action) + static int fire_lib3270_toggle(const LIB3270_TOGGLE * action, GtkWidget *widget) { debug("%s(%s)",__FUNCTION__,action->name); return lib3270_toggle(v3270_get_session(widget),action->id); } - int fire_keypad_action(GtkWidget *widget, const struct _v3270_action * action) + int fire_keypad_action(const struct _v3270_action * action, GtkWidget *widget) { int rc = 0; debug("%s",__FUNCTION__); diff --git a/src/testprogram/testprogram.c b/src/testprogram/testprogram.c index 5b83955..6206e10 100644 --- a/src/testprogram/testprogram.c +++ b/src/testprogram/testprogram.c @@ -120,14 +120,6 @@ #endif // _WIN32 - static void accel_copy(GtkWidget *widget, GtkWidget *window) { - debug("%s",__FUNCTION__); - } - - static void accel_paste(GtkWidget *widget, GtkWidget *window) { - debug("%s",__FUNCTION__); - } - static void activate(GtkApplication* app, G_GNUC_UNUSED gpointer user_data) { GtkWidget * window = gtk_application_window_new(app); @@ -173,10 +165,6 @@ } - // Set accelerators - // v3270_accelerator_map_add_entry(terminal, "copy", 'c', GDK_CONTROL_MASK, G_CALLBACK(accel_copy), window); - // v3270_accelerator_map_add_entry(terminal, "paste", 'v', GDK_CONTROL_MASK, G_CALLBACK(accel_paste), window); - // Create trace window v3270_set_trace(terminal,TRUE); diff --git a/v3270.cbp b/v3270.cbp index 9d15871..eaef725 100644 --- a/v3270.cbp +++ b/v3270.cbp @@ -222,10 +222,16 @@ + + + + @@ -275,9 +281,6 @@ - - @@ -285,9 +288,6 @@ - - -- libgit2 0.21.2