Commit a221488b71a5b54305eea84390e772eefe3229b5

Authored by Perry Werneck
1 parent aacf6682
Exists in master and in 1 other branch develop

Adding group on property action (required for screen-model property

actions).
src/include/v3270/actions.h
@@ -230,7 +230,7 @@ @@ -230,7 +230,7 @@
230 LIB3270_EXPORT V3270SimpleAction * v3270_dialog_action_new(GtkWidget * (*factory)(V3270SimpleAction *, GtkWidget *)); 230 LIB3270_EXPORT V3270SimpleAction * v3270_dialog_action_new(GtkWidget * (*factory)(V3270SimpleAction *, GtkWidget *));
231 231
232 /// @brief Create an action from property name. 232 /// @brief Create an action from property name.
233 - LIB3270_EXPORT V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name); 233 + LIB3270_EXPORT V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name, const LIB3270_ACTION_GROUP action_group);
234 234
235 /// @brief Create an action with the "enable" property binded with terminal property. 235 /// @brief Create an action with the "enable" property binded with terminal property.
236 LIB3270_EXPORT V3270SimpleAction * v3270_conditional_action_new(GtkWidget *widget, const gchar *property_name); 236 LIB3270_EXPORT V3270SimpleAction * v3270_conditional_action_new(GtkWidget *widget, const gchar *property_name);
src/terminal/actions/property.c
@@ -72,7 +72,6 @@ @@ -72,7 +72,6 @@
72 static GVariant * get_state(GAction *action, GtkWidget *terminal); 72 static GVariant * get_state(GAction *action, GtkWidget *terminal);
73 static const GVariantType * get_state_type(GAction *object); 73 static const GVariantType * get_state_type(GAction *object);
74 static const GVariantType * get_parameter_type(GAction *object); 74 static const GVariantType * get_parameter_type(GAction *object);
75 -  
76 static void change_widget(GAction *object, GtkWidget *from, GtkWidget *to); 75 static void change_widget(GAction *object, GtkWidget *from, GtkWidget *to);
77 76
78 G_DEFINE_TYPE(v3270PropertyAction, v3270PropertyAction, V3270_TYPE_SIMPLE_ACTION); 77 G_DEFINE_TYPE(v3270PropertyAction, v3270PropertyAction, V3270_TYPE_SIMPLE_ACTION);
@@ -204,7 +203,7 @@ @@ -204,7 +203,7 @@
204 203
205 } 204 }
206 205
207 - V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name) { 206 + V3270SimpleAction * v3270_property_action_new(GtkWidget *widget, const gchar *property_name, const LIB3270_ACTION_GROUP action_group) {
208 207
209 GParamSpec *pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(widget), property_name); 208 GParamSpec *pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(widget), property_name);
210 209
@@ -249,6 +248,7 @@ @@ -249,6 +248,7 @@
249 248
250 action->parent.parent.activate = activate; 249 action->parent.parent.activate = activate;
251 action->pspec = pspec; 250 action->pspec = pspec;
  251 + action->parent.group.id = action_group;
252 252
253 v3270_action_set_terminal_widget(G_ACTION(action), widget); 253 v3270_action_set_terminal_widget(G_ACTION(action), widget);
254 254