Commit 216bea793a47ea1b36afb93004ddb46984652619
1 parent
436f38c7
Exists in
master
and in
3 other branches
Fixing problem with the select/unselect notifications.
Showing
4 changed files
with
6 additions
and
6 deletions
Show diff stats
src/core/actions/table.c
| ... | ... | @@ -232,7 +232,7 @@ |
| 232 | 232 | .summary = N_( "Save selected area." ), |
| 233 | 233 | .activate = save_selected, |
| 234 | 234 | |
| 235 | - .group = LIB3270_ACTION_GROUP_SELECTED, | |
| 235 | + .group = LIB3270_ACTION_GROUP_SELECTION, | |
| 236 | 236 | .activatable = lib3270_has_selection |
| 237 | 237 | }, |
| 238 | 238 | |
| ... | ... | @@ -673,7 +673,7 @@ |
| 673 | 673 | .summary = N_( "Print selected area." ), |
| 674 | 674 | .activate = lib3270_print_selected, |
| 675 | 675 | |
| 676 | - .group = LIB3270_ACTION_GROUP_SELECTED, | |
| 676 | + .group = LIB3270_ACTION_GROUP_SELECTION, | |
| 677 | 677 | .activatable = lib3270_has_selection |
| 678 | 678 | }, |
| 679 | 679 | ... | ... |
src/include/lib3270/actions.h
| ... | ... | @@ -38,8 +38,7 @@ |
| 38 | 38 | LIB3270_ACTION_GROUP_NONE, ///< @brief Simple action, no signals os special treatment. |
| 39 | 39 | LIB3270_ACTION_GROUP_ONLINE, ///< @brief Action requires online state. |
| 40 | 40 | LIB3270_ACTION_GROUP_OFFLINE, ///< @brief Action requires offline state. |
| 41 | - LIB3270_ACTION_GROUP_SELECTED, ///< @brief Action requires an active selection. | |
| 42 | - LIB3270_ACTION_GROUP_UNSELECTED, ///< @brief Action fails if there has a selection. | |
| 41 | + LIB3270_ACTION_GROUP_SELECTION, ///< @brief Action depends on selection. | |
| 43 | 42 | |
| 44 | 43 | LIB3270_ACTION_GROUP_CUSTOM ///< @brief Custom group/Number of groups. |
| 45 | 44 | } LIB3270_ACTION_GROUP; | ... | ... |
src/selection/actions.c
| ... | ... | @@ -63,7 +63,8 @@ LIB3270_EXPORT int lib3270_unselect(H3270 *hSession) |
| 63 | 63 | |
| 64 | 64 | hSession->cbk.set_selection(hSession,0); |
| 65 | 65 | hSession->cbk.update_selection(hSession,-1,-1); |
| 66 | - lib3270_notify_actions(hSession,LIB3270_ACTION_GROUP_UNSELECTED); | |
| 66 | + | |
| 67 | + lib3270_notify_actions(hSession,LIB3270_ACTION_GROUP_SELECTION); | |
| 67 | 68 | |
| 68 | 69 | } |
| 69 | 70 | ... | ... |
src/selection/selection.c
| ... | ... | @@ -193,10 +193,10 @@ void do_select(H3270 *hSession, unsigned int start, unsigned int end, unsigned i |
| 193 | 193 | { |
| 194 | 194 | hSession->selected = 1; |
| 195 | 195 | hSession->cbk.set_selection(hSession,1); |
| 196 | - lib3270_notify_actions(hSession,LIB3270_ACTION_GROUP_SELECTED); | |
| 197 | 196 | } |
| 198 | 197 | |
| 199 | 198 | hSession->cbk.update_selection(hSession,start,end); |
| 199 | + lib3270_notify_actions(hSession,LIB3270_ACTION_GROUP_SELECTION); | |
| 200 | 200 | |
| 201 | 201 | } |
| 202 | 202 | ... | ... |