Andrew Borodin
6718b3ec26
Indentation using GNU indent-2.2.13.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-06-02 12:49:13 +03:00
Andrew Borodin
fe42478b97
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-01 09:46:17 +03:00
Andrew Borodin
94daff9071
(menubar_execute_cmd): move CK_Help handler to separate function menubar_help().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-12-31 19:28:44 +03:00
Andrew Borodin
f1cf92f435
Indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
Andrew Borodin
ea40129743
Menu: renames:
...
WMenuBar::selected -> WMenuBar::current
menu_t::selected -> menu_t::current
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Andrew Borodin
fd2d5b49ac
Menu: rename functions.
...
menu_entry_create -> menu_entry_new
menu_separator_create -> menu_separator_new
create_menu -> menu_new
destroy_menu -> menu_free
find_menubar -> menubar_find
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin
7257f794d2
Update template for .c files.
...
Add section for forward declarations of local functions. This section is
located before file scope variables because functions can be used in
strucutres (see find.c for example):
/*** forward declarations (file scope functions) *************************************************/
/* button callbacks */
static int start_stop (WButton * button, int action);
static int find_do_view_file (WButton * button, int action);
static int find_do_edit_file (WButton * button, int action);
/*** file scope variables ************************************************************************/
static struct
{
...
bcback_fn callback;
} fbuts[] =
{
...
{ B_STOP, NORMAL_BUTTON, N_("S&uspend"), 0, 0, NULL, start_stop },
...
{ B_VIEW, NORMAL_BUTTON, N_("&View - F3"), 0, 0, NULL, find_do_view_file },
{ B_VIEW, NORMAL_BUTTON, N_("&Edit - F4"), 0, 0, NULL, find_do_edit_file }
};
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-03-19 20:34:24 +03:00
Andrew Borodin
57c61b7681
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-01-28 21:38:05 +03:00
Andrew Borodin
fbfb4f565c
(menubar_new): do not reset WOP_SELECTABLE options
...
...because widget is not selectable by default.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-01-28 21:38:04 +03:00
Andrew Borodin
ccdc909105
(widget_init): change argument for coordinates.
...
Use WRect instead of four values.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-06-05 11:55:03 +03:00
Andrew Borodin
5fae2313f3
Widget: use WRect to hold position and size.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-06-05 11:49:20 +03:00
Andrew Borodin
2c205c5928
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:26 +03:00
Andreas Mohr
b71f66dbbd
Fix const/unconst casts.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-06-20 15:14:55 +03:00
Andrew Borodin
53d073758f
WMenubar: remove unneeded action.
...
(menubar_activate): do not focus explicitly. Focus is made in
widget_select().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-04-11 17:10:14 +03:00
Andrew Borodin
0e75e85598
Menubar: use WST_VISIBLE state
...
...instead of WMenuBar::is_visible member.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-04-11 17:09:53 +03:00
Andrew Borodin
9ee52e77c3
Ticket #4179 : code clean up before 4.8.27 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-14 19:30:42 +03:00
Andrew Borodin
8b4386df83
Ticket #4120 : draw shadows for dialog boxes and menus.
...
Thanks Aleš Janda <ales.janda@kyblsoft.cz> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-08-02 16:13:26 +03:00
Andrew Borodin
2f22ce9434
menu: CK_* constants are signed.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-05-17 18:48:18 +03:00
Andrew Borodin
2e734e5618
Make keybind map a member of Widget.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:17:32 +03:00
Andrew Borodin
d1f9e698ac
WDialog: use WBackground in frameless dialogs (screens).
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:17:32 +03:00
Andrew Borodin
04f04ba130
Send new widget size as parameter of MSG_RESIZE message.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:15:37 +03:00
Andrew Borodin
95b4a86d44
(dlg_get_current_widget_id): rename to group_get_current_widget_id.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:13:35 +03:00
Andrew Borodin
e9d23e90f0
Find widget API: support groups.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:13:33 +03:00
Andrew Borodin
6eedbce076
Move widget selection API from WDialog to WGroup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:11:39 +03:00
Andrew Borodin
e4e0070db5
Ticket #2919 : implement WGroup widget.
...
WGroup is the base widget for complex objects such as windows, dialog
windows, etc.
Initial steps:
* move widget list of dialog into WGroup class;
* inherit WGroup from Widget;
* inherit WDialog from WGroup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-03-08 20:09:12 +03:00
Andrew Borodin
31b37a1f79
Ticket #4050 : code cleanup before 4.8.25 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-29 19:10:17 +03:00
Andrew Borodin
32a4b1ac85
Rename hotkey API:
...
* parse_hotkey to hotkey_new;
* release_hotkey to hotkey_free.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 13:02:31 +03:00
Andrew Borodin
57c303eeaf
Use g_clear_slist() and g_clear_list().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
f85c1c898e
lib/widget/menu.c: constify some function arguments.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
35f14be028
(widget_move): rename to widget_gotoyx.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin
093571938a
Ticket #4035 : fix compile failure on OS X 10.9.
...
Fix duplication of menu_map definition.
Move menu_map definition to lib/widget/menu.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-23 17:41:58 +03:00
Egmont Koblinger
6a5d4243ce
Ticket #4013 : menubar: fix mouse click coordinate.
...
In the menu bar, click on the space character immediately before the
"File" label.
Actual: The "Left" menu opens.
Expected: The "File" menu should open, since when clicking on "File",
this space character on its left is also highlighted.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-08 11:41:25 +03:00
Andrew Borodin
2b55c54efc
Menubar is always on top line of screen.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin
7eaa51c79b
Fix broken hotkeys in menu.
...
Regression was introduced in f5f78ea658
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-18 09:34:00 +03:00
Andrew Borodin
ff7d1728e2
Menubar: support Home and End actions for Menubar.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-09 12:06:10 +03:00
Ilia Maslakov
4e5488d5b2
Menu: implement drop/execute menu by hotkey.
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-09 12:06:10 +03:00
Ilia Maslakov
f5f78ea658
Ticket #212 : implement keybinding for menu.
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-09 12:06:10 +03:00
Andrew Borodin
1dd8a47987
Ticket #3955 : code cleanup before 4.8.23 release.
...
Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 12:44:40 +03:00
Andrew Borodin
ddd645526a
Update copyright years.
2018-02-04 11:30:22 +03:00
Andrew Borodin
e9fd11bfcd
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Andrew Borodin
0cc22928af
lib/widget/menu.c: indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:52:07 +03:00
Andrew Borodin
599361b3fc
(dlg_set_bottom_widget): rename to widget_set_bottom.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
d200893347
(dlg_select_widget): rename to widget_select.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
47f9b77194
WMenuBar: remove WMenuBar::is_active. Use WST_FOCUSED instead.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
fd7c6c1c5d
Menu: avoid double draw on resize.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
3debdac657
(menubar_callback): refactoring of menu draw after get focus and resize.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
a64a7ba2fa
Use WOP_SELECTABLE option in menu.
...
If menu is not active, it is not selectable also in order to disallow
select and focus the inactive menu.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
2dab74fddd
By default, WOP_WANT_HOTKEY option is off.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
d44220c75f
If widget wants cursor, define that explicitly.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
fd4e56bf39
WOP_TOP_SELECT: new widget option
...
...to place widget on top of other widgets in dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00