Commit d03a33524fffd0008389039dbf125ab3d3a5fe20
1 parent
a0bb779d
Exists in
master
and in
1 other branch
Fixing actions.
Showing
3 changed files
with
11 additions
and
8 deletions
Show diff stats
src/terminal/actions/action.c
@@ -246,7 +246,7 @@ | @@ -246,7 +246,7 @@ | ||
246 | } | 246 | } |
247 | 247 | ||
248 | static gboolean bg_notify_enabled(GObject *action) { | 248 | static gboolean bg_notify_enabled(GObject *action) { |
249 | - debug("%s(%s,%s)",__FUNCTION__,g_action_get_name(G_ACTION(action)),(g_action_get_enabled(G_ACTION(action)) ? "enabled" : "disabled")); | 249 | + debug("%s(%s,%s,%d)",__FUNCTION__,g_action_get_name(G_ACTION(action)),(g_action_get_enabled(G_ACTION(action)) ? "enabled" : "disabled"),(int) v3270_action_get_group(G_ACTION(action))); |
250 | g_object_notify(action, "enabled"); | 250 | g_object_notify(action, "enabled"); |
251 | return FALSE; | 251 | return FALSE; |
252 | } | 252 | } |
src/terminal/actions/property.c
@@ -75,7 +75,6 @@ | @@ -75,7 +75,6 @@ | ||
75 | static void change_widget(GAction *object, GtkWidget *from, GtkWidget *to); | 75 | static void change_widget(GAction *object, GtkWidget *from, GtkWidget *to); |
76 | static void activate(GAction *object, GVariant *parameter, GtkWidget *terminal); | 76 | static void activate(GAction *object, GVariant *parameter, GtkWidget *terminal); |
77 | 77 | ||
78 | - | ||
79 | G_DEFINE_TYPE(v3270PropertyAction, v3270PropertyAction, V3270_TYPE_SIMPLE_ACTION); | 78 | G_DEFINE_TYPE(v3270PropertyAction, v3270PropertyAction, V3270_TYPE_SIMPLE_ACTION); |
80 | 79 | ||
81 | void v3270PropertyAction_class_init(v3270PropertyActionClass *klass) { | 80 | void v3270PropertyAction_class_init(v3270PropertyActionClass *klass) { |
@@ -243,7 +242,6 @@ | @@ -243,7 +242,6 @@ | ||
243 | if(lProperty) { | 242 | if(lProperty) { |
244 | action->parent.label = lib3270_property_get_label(lProperty); | 243 | action->parent.label = lib3270_property_get_label(lProperty); |
245 | action->parent.tooltip = lib3270_property_get_summary(lProperty); | 244 | action->parent.tooltip = lib3270_property_get_summary(lProperty); |
246 | -// action->group.id = lProperty->group; | ||
247 | } | 245 | } |
248 | 246 | ||
249 | if(!action->parent.tooltip) | 247 | if(!action->parent.tooltip) |
src/terminal/actions/simple.c
@@ -57,6 +57,10 @@ | @@ -57,6 +57,10 @@ | ||
57 | return V3270_SIMPLE_ACTION(action)->name; | 57 | return V3270_SIMPLE_ACTION(action)->name; |
58 | } | 58 | } |
59 | 59 | ||
60 | + static LIB3270_ACTION_GROUP get_action_group(GAction *action) { | ||
61 | + return V3270_SIMPLE_ACTION(action)->group.id; | ||
62 | + } | ||
63 | + | ||
60 | static void dispose(GObject *object) { | 64 | static void dispose(GObject *object) { |
61 | 65 | ||
62 | V3270SimpleAction *action = V3270_SIMPLE_ACTION(object); | 66 | V3270SimpleAction *action = V3270_SIMPLE_ACTION(object); |
@@ -75,11 +79,12 @@ | @@ -75,11 +79,12 @@ | ||
75 | 79 | ||
76 | static void V3270SimpleAction_class_init(V3270SimpleActionClass *klass) { | 80 | static void V3270SimpleAction_class_init(V3270SimpleActionClass *klass) { |
77 | 81 | ||
78 | - klass->parent_class.get_name = get_name; | ||
79 | - klass->parent_class.get_icon_name = get_icon_name; | ||
80 | - klass->parent_class.get_label = get_label; | ||
81 | - klass->parent_class.get_tooltip = get_tooltip; | ||
82 | - klass->parent_class.activate = klass_activate; | 82 | + klass->parent_class.get_name = get_name; |
83 | + klass->parent_class.get_icon_name = get_icon_name; | ||
84 | + klass->parent_class.get_label = get_label; | ||
85 | + klass->parent_class.get_tooltip = get_tooltip; | ||
86 | + klass->parent_class.activate = klass_activate; | ||
87 | + klass->parent_class.get_action_group = get_action_group; | ||
83 | 88 | ||
84 | G_OBJECT_CLASS(klass)->dispose = dispose; | 89 | G_OBJECT_CLASS(klass)->dispose = dispose; |
85 | 90 |