Commit a221488b71a5b54305eea84390e772eefe3229b5
1 parent
aacf6682
Exists in
master
and in
1 other branch
Adding group on property action (required for screen-model property
actions).
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
src/include/v3270/actions.h
... | ... | @@ -230,7 +230,7 @@ |
230 | 230 | LIB3270_EXPORT V3270SimpleAction * v3270_dialog_action_new(GtkWidget * (*factory)(V3270SimpleAction *, GtkWidget *)); |
231 | 231 | |
232 | 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 | 235 | /// @brief Create an action with the "enable" property binded with terminal property. |
236 | 236 | LIB3270_EXPORT V3270SimpleAction * v3270_conditional_action_new(GtkWidget *widget, const gchar *property_name); | ... | ... |
src/terminal/actions/property.c
... | ... | @@ -72,7 +72,6 @@ |
72 | 72 | static GVariant * get_state(GAction *action, GtkWidget *terminal); |
73 | 73 | static const GVariantType * get_state_type(GAction *object); |
74 | 74 | static const GVariantType * get_parameter_type(GAction *object); |
75 | - | |
76 | 75 | static void change_widget(GAction *object, GtkWidget *from, GtkWidget *to); |
77 | 76 | |
78 | 77 | G_DEFINE_TYPE(v3270PropertyAction, v3270PropertyAction, V3270_TYPE_SIMPLE_ACTION); |
... | ... | @@ -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 | 208 | GParamSpec *pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(widget), property_name); |
210 | 209 | |
... | ... | @@ -249,6 +248,7 @@ |
249 | 248 | |
250 | 249 | action->parent.parent.activate = activate; |
251 | 250 | action->pspec = pspec; |
251 | + action->parent.group.id = action_group; | |
252 | 252 | |
253 | 253 | v3270_action_set_terminal_widget(G_ACTION(action), widget); |
254 | 254 | ... | ... |