Commit Graph

390 Commits

Author SHA1 Message Date
Andrew Borodin d034500fd6 (button_set_text): do nothing if new and current texts are equal.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 13:02:31 +03:00
Andrew Borodin b031b44823 (check_set_text): new WCheck API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 13:02:31 +03:00
Andrew Borodin 432af88b06 (hotkey_draw): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 13:02:31 +03:00
Andrew Borodin 53314c58b5 (hotkey_get_text): new hotkey API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 13:02:31 +03:00
Andrew Borodin 851d2022a9 (hotkey_equal): new hotkey API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 13:02:31 +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 65e12d1a9f (dlg_redraw): rename to dlg_draw.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-15 12:53:20 +03:00
Andrew Borodin 60fe701b76 (widget_redraw): rename to widget_draw.
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 baca4ba045 Widget and WDialog API changes:
* (widget_destroy): new API to destroy widget.
  * (del_widget): don't destroy widget after remove it from dialog.

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
Andrew Borodin 21376ec1e9 (history_show): fix order of history items.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 15:11:53 +03:00
Andrew Borodin 3c4fe21108 Ticket #4019: fix SIGWINCH handling,
Fix regression introduced in 37ffc02422.

(tty_got_winch): don't read FIFO, just check whether it os empty or not.
It can be called many times without lost of info about SIGWINCH raises.
(tty_flush_winch): read from FIFO to make it empty.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-29 11:21:14 +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 297391fd60 (dlg_adjust_position): rename to widget_adjust_position and make public.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +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 29110e5681 Move history operation routines from lib/widget/history.c to lib/mcconfig/history.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:41:12 +03:00
Andrew Borodin 37ffc02422 Ticket #117: refactoring of SIGWINCH hangling.
Use pipe to collect consecutive raised SIGWINCH events.
Then handle multiple events at a time treating them
as a single one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-01 19:22:21 +03:00
Andrew Borodin c4668b56f7 history: refactoring.
Prepare to support CK_Delete in editor and viewer history.
The filepos file contains file positions and bookmarks. We must keep
them.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin 883e7b17b5 (listbox_get_length): new WListbox API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin 0f02d49b0d (history_show): port to WListbox keybindings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin a4e36d079d WListbox: add Edit, View and Enter keynindings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin b81e4aac55 (history_show): rename variable.
(history_dlg_data): rename member.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin 644d72fed2 (history_show): constify argument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-10 09:45:27 +03:00
Andrew Borodin 2fce07a7e1 (listbox_set_list): change argument type. 2019-08-10 09:45:27 +03:00
Ilia Maslakov 87428aa8ea added new keybindings (F3, F4) in history list.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2019-08-10 09:45:27 +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 3b997974ec Refactor dialog command execution. 2019-04-27 19:29:24 +03:00
Andrew Borodin 433ae45bdd Clarify checks of dialog and widget existence.
Widget list in the dialog cannot contain empty elements.
Dialog list cannot contain empty elements too.
Therefore simplify some checks.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-03 13:10:00 +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 669a8e3e17 (dlg_run_done): fix possible NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin b9194d8c8a (dlg_init): fix possible NULL dereference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-09 19:10:43 +03:00
Andrew Borodin a38c7f19e9 Ticket #3453: Find file: show pattern and content in the results dialog title.
Initial step:
    * (dlg_set_title): new API.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-09-04 10:26:35 +03:00
Andrew Borodin 2a973f7a46 Use str_move() where possible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:23 +03:00
Andrew Borodin ddd645526a Update copyright years. 2018-02-04 11:30:22 +03:00
Andrew Borodin 73979369d1 Support __attribute__((fallthrough)) if possible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-02-04 11:30:22 +03:00
Andrew Borodin 48d85a42b4 achown: add callback for permission buttons
...to change behaviour of WButton objects.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-12-10 09:19:15 +03:00
Andrew Borodin 6310e07745 (button_callback): clean up unneeded type casting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 16:01:30 +03:00
Andrew V. Samoilov bf5abff937 (buttonbar_call): fix possible NULL dereference.
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
2017-11-17 16:01:29 +03:00
Andrew Borodin 7772f00aab Ticket #3780: code clean up before 4.8.20 release.
Direct include <limits.h> for MB_LEN_MAX.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-11-17 15:59:44 +03:00
Maksim Dzabraev 16b569986e Ticket #3870: fix INPUT_COMPLETE_CD in quick widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-10-28 19:18:23 +03:00
Mooffie ac23a4807c Pressing <right> and <left> in hotlist dialog doesn't refresh it.
Signed-off-by: Mooffie <mooffie@gmail.com>
2017-02-26 12:38:39 +02:00
Mooffie 5ea5c5deb6 Ticket #3760: Fix aborts of MSG_MOUSE_DOWN.
This patch was supposed to get committed as part of #3571 but this never
happened. We commit it now as we depend on its functionality for the next
commit.

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-02-19 00:04:38 +02:00
Andrew Borodin e83409b6d7 Ticket #3766: add_widget_autopos() doesn't remove focus from the previously focused widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-02-09 17:49:34 +02:00
Mooffie bc46978036 (dialog_switch_list): simplify the listbox selector.
We use the new run_listbox_with_data().

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-29 23:32:13 +02:00