From a221488b71a5b54305eea84390e772eefe3229b5 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 14 Feb 2020 10:34:40 -0300 Subject: [PATCH] Adding group on property action (required for screen-model property actions). --- src/include/v3270/actions.h | 2 +- src/terminal/actions/property.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/v3270/actions.h b/src/include/v3270/actions.h index cfba739..7439ab3 100644 --- a/src/include/v3270/actions.h +++ b/src/include/v3270/actions.h @@ -230,7 +230,7 @@ LIB3270_EXPORT V3270SimpleAction * v3270_dialog_action_new(GtkWidget * (*factory)(V3270SimpleAction *, GtkWidget *)); /// @brief Create an action from property name. - LIB3270_EXPORT V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name); + LIB3270_EXPORT V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name, const LIB3270_ACTION_GROUP action_group); /// @brief Create an action with the "enable" property binded with terminal property. LIB3270_EXPORT V3270SimpleAction * v3270_conditional_action_new(GtkWidget *widget, const gchar *property_name); diff --git a/src/terminal/actions/property.c b/src/terminal/actions/property.c index 6784b5f..1e0fe68 100644 --- a/src/terminal/actions/property.c +++ b/src/terminal/actions/property.c @@ -72,7 +72,6 @@ static GVariant * get_state(GAction *action, GtkWidget *terminal); static const GVariantType * get_state_type(GAction *object); static const GVariantType * get_parameter_type(GAction *object); - static void change_widget(GAction *object, GtkWidget *from, GtkWidget *to); G_DEFINE_TYPE(v3270PropertyAction, v3270PropertyAction, V3270_TYPE_SIMPLE_ACTION); @@ -204,7 +203,7 @@ } - V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name) { + V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name, const LIB3270_ACTION_GROUP action_group) { GParamSpec *pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(widget), property_name); @@ -249,6 +248,7 @@ action->parent.parent.activate = activate; action->pspec = pspec; + action->parent.group.id = action_group; v3270_action_set_terminal_widget(G_ACTION(action), widget); -- libgit2 0.21.2