Commit a0bb779d2b2b81be039403f891420f6f87289ad1

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

Reimplementing action group.

src/terminal/actions/action.c
@@ -323,14 +323,8 @@ @@ -323,14 +323,8 @@
323 return FALSE; 323 return FALSE;
324 324
325 LIB3270_ACTION_GROUP group = v3270_action_get_group(object); 325 LIB3270_ACTION_GROUP group = v3270_action_get_group(object);
326 -  
327 - debug("**************** %s(%d %d)",g_action_get_name(object),(int) group, (int) LIB3270_ACTION_GROUP_NONE);  
328 -  
329 if(group != LIB3270_ACTION_GROUP_NONE) { 326 if(group != LIB3270_ACTION_GROUP_NONE) {
330 -  
331 - debug("**************** %s",g_action_get_name(object));  
332 -  
333 - return FALSE; 327 + return lib3270_action_group_get_activatable(v3270_get_session(terminal),group) ? TRUE : FALSE;
334 } 328 }
335 329
336 return TRUE; 330 return TRUE;
src/terminal/actions/table.c
@@ -389,13 +389,18 @@ @@ -389,13 +389,18 @@
389 389
390 } 390 }
391 391
  392 + static LIB3270_ACTION_GROUP get_action_group(GAction *action) {
  393 + return GET_DESCRIPTOR(action)->group;
  394 + }
  395 +
392 static void V270InternalAction_class_init(V270InternalActionClass *klass) { 396 static void V270InternalAction_class_init(V270InternalActionClass *klass) {
393 397
394 - klass->parent_class.get_name = get_name;  
395 - klass->parent_class.get_icon_name = get_icon_name;  
396 - klass->parent_class.get_label = get_label;  
397 - klass->parent_class.get_tooltip = get_tooltip;  
398 - klass->parent_class.activate = activate; 398 + klass->parent_class.get_name = get_name;
  399 + klass->parent_class.get_icon_name = get_icon_name;
  400 + klass->parent_class.get_label = get_label;
  401 + klass->parent_class.get_tooltip = get_tooltip;
  402 + klass->parent_class.activate = activate;
  403 + klass->parent_class.get_action_group = get_action_group;
399 404
400 } 405 }
401 406