Andrew Borodin
e7dc599e42
Use "'" instead of "`" for messages and comments quoting.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:03 +03:00
Andrew Borodin
6b90a1468a
(button_set_text): update value of WButton::hotpos.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
6d31d85f0d
Use tty_draw_box instead of draw_box() to draw frames.
...
* (draw_box): remove.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
f23f0613ec
Ticket #2991 : fix redraw of WLabel after text change.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-04-08 15:46:39 +04:00
Andrew Borodin
30959e0b7d
Clarify widget redraw in runtime.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
9b0b017201
(input_update): minor optimization: don't call str_term_width2() twice.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
e29d98336b
Ticket #2971 : mouse click below non-droppeddown menubar activates menu box.
...
How to reproduce:
1. Switch the "Drop down menus" option off.
2. Press F9 to activate menubar. Menu is not dropped.
3. Click somewhere below menubar, on one of the files in the directory
listing.
Buggy behavior: the corresponding "Left" or "File" etc. dropdown is
opened, and the mouse button is released, menu item under the mouse
cursor is activated.
Correct behavior: clicking with the mouse somewhere other than the
active menubar doesn't open dropdown menu, instead removes the focus from
menubar and acts on the actual item under the mouse pointer (such
as a filename in the panel).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-05 16:51:52 +04:00
Andrew Borodin
b66a1e0592
Code indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:42:27 +04:00
Andrew Borodin
d8340c30da
Ticket #2626 : special chars are not escaped in autocompletion of filenames.
...
Test case:
1. Create a file with name that contains some special chars:
touch attachment.cgi?id=564208
2. Press F6.
3. Press a. Now only the 'a' letter is in input line.
4. Press Esc Tab Enter.
5a. Input line is filled by 'attachment.cgi?id=564208'...
5b. but 'attachment.cgi\?id=564208' is expected.
6. Add 'patch_' before file name:
'patch_attachment.cgi?id=564208'.
7. Press Enter.
8a. Result: 'patch_attachment.cgiattachment.cgi?id=564208id=564208'.
8b. Expected result: 'patch_attachment.cgi?id=564208'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:30:38 +04:00
Andrew Borodin
0608af276e
lib/widget/input_complete.c: minor refactoring and optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-04 15:48:21 +03:00
Slava Zanko
f7109ab46b
Fix for input completions with spaces in names.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:48:21 +03:00
Andrew Borodin
c308d5ed21
lib/widget/input_complete.c: refactoring:
...
* (filename_completion_function): use GString to ret rid of hand-made
low-level memory allocation.
* (variable_completion_function): likewise.
* (hostname_completion_function): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-04 15:48:21 +03:00
Slava Zanko
f866709186
Concretize the usage of autocompliting in different input fields.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:48:21 +03:00
Slava Zanko
2d58735deb
Extend QUICK_INPUT and QUICK_LABELED_INPUT macros for getting completion flags via parameters instead of using hardcoded value
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:29:15 +03:00
Slava Zanko
9935acea33
Ticket #55 : savannah: tab completion vs. spaces and escaping
...
* Split big functions.
* Add unit tests
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:29:15 +03:00
Andrew Borodin
33cac494c0
WHLine: allow draw text over horizontal line.
...
* (hline_set_text): new function.
* (file_progress_show_total): use hline_set_text to show processed
files counter.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Andrew Borodin
2176e5f283
Ticket #2076 : make copy/move/delete progress dialog wider.
...
Initial step: get rid of hardcoded width of progress bar.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Andrew Borodin
161a5af516
Ticket #2111 : allow pause in copy/move/delete file operation.
...
Initial step: if button callback retuns zero, don't close the dialog after
button press.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 13:37:39 +04:00
Andrew Borodin
30dbb79655
(del_widget): fix memory leak.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
3fc490ea12
(add_widget_autopos): don't access to NULL widget.
...
(del_widget): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
7b184ddea4
PCRE_CFLAGS are CPPFLAGS, actually.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Andrew Borodin
281209c79d
lib/widget/*.[ch]: fix indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-20 13:27:10 +04:00
Andrew Borodin
4e90c1a229
Internal menu structures are opaque now.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:14 +04:00
Andrew Borodin
2ec122bc05
Add useful macros for widget type cast.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:14 +04:00
Andrew Borodin
665d238ffa
Unify widget and dialog message handling.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:14 +04:00
Andrew Borodin
497b69c106
Remove DLG_WANT_IDLE. Use W_WANT_IDLE instead.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:13 +04:00
Andrew Borodin
843dcd104e
Rename Dlg_head to WDialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
0078874613
Rename default callbacks of widget and dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
cab525049f
(query_dialog): center label horizontally.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
bafc778ee7
Horizontal centering of multi-line label: center each line independently.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
96795565f5
(query_dialog): add horizontal line.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
f14cee4e18
Remove DLG_REVERSE flag.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
03829a7e6e
Don't apply DLG_REVERSE flag to the listbox window
...
...since this dialog contains single widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
612c32349d
(quick_widget_t): add pos_flags member.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
322bf132d7
(QUICK_BUTTONS_OK_CANCEL): new macro for often-used dialog buttons.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
298201d305
Drop old QuickWidget engine.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
581cb4b38e
(fg_input_dialog_help): use new quick dialog engine.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
e97ac7507a
New QuickDialog engine.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-11-19 21:42:45 +04:00
Andrew Borodin
706c966af8
(groupbox_set_title): new function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
8623039fe8
(groupbox_new): ignore empty string as title.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
e009cd9ea9
(create_dlg): ignore empty string as title.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
d4b95ea14d
(button_set_text): don't forced redraw the entire dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
c59a14d438
Associate label with input line and enable/disable them as pair.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
e6f467c875
Add flags to place widgets with horizontal and vertical centering in dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
1206d156bf
(widget_set_options): new function to set/reset widget options.
...
Adjust enable/disable widgets.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
8b9fc35b95
WHLine: adjust initialization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
dc5c49a395
WInput: handle WIDGET_RESIZED.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
c6ddd28366
Unification of widget and dialog callback functions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:44 +04:00
Andrew Borodin
05d7f3c84e
Aggressive use WIDGET macro.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:44 +04:00
Andrew Borodin
2a95cb2ffd
Ticket #2919 : widget system improvements and unifications.
...
First step: derive dialog from widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:44 +04:00
Andrew Borodin
2940b7455d
Fix of DOXYGEN docs: @return instead of @returns
...
...and other minor corrections.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
82bb9c39da
Define winch_flag as volatile sig_atomic_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
794145090d
Fixups of SIGWINCH handling.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
b2f97443e2
Refactoring of subshell support.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:47 +04:00
Andrew Borodin
ea2c57dbd6
Optimization of SIGWINCH handling.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:06 +04:00
Andrew Borodin
d82757d233
Ticket #2917 : Makefile.ams cleanup: remove unused AM_CPPFLAGS.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:24:30 +04:00
Andrew Borodin
f3cc7de694
Ticket #2898 : fix broken path completion on paths starting with ~/.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-27 14:25:18 +04:00
Ilia Maslakov
55c8f041da
fixed doxygen documentation
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-10 14:29:53 +03:00
Andrew Borodin
8b382756bf
Use g_strndup() instead of g_strdup()
...
...to ret rid of extra calculation of string length.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-10 14:29:53 +03:00
Andrew Borodin
908e747861
Optimization of ini files load.
...
Some ini files (keymaps, skins) are loaded in read-only mode. For those
files, we don't need load and keep comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
b37af47023
Makefile.ams cleanup.
...
Set defines via CPPFLAGS variable not via CFLAGS one.
Use AM_CPPFLAGS and AM_CFLAGS variables instead of per-target ones.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Slava Zanko
94bd4b1f78
Code indentation.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-17 17:04:05 +04:00
Andrew Borodin
23c95d36ac
Code cleanup: removed unused variables amd removed unnedeed code.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
14a4eefc43
Fix typos.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
1f45b0822e
Menubar: ignore GPM_UP event.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 16:46:35 +04:00
Andrew Borodin
39d128e659
Accuracy use of arguments of dlg_move and widget_move macros.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 16:05:12 +04:00
Andrew Borodin
8b4f020abd
Ticket #2833 : url with port was stored wrong in history.
...
"sh://admin@192.168.1.119:55522" was stored as
"sh://admin@192.168.1.119@192.168.1.119".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 15:56:56 +04:00
Andrew Borodin
c813d1baad
Handle history of input line.
...
Added pointer to the current history item and use to walk in history.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-11 15:02:19 +04:00
Andrew Borodin
83e3945c24
Ticket #2817 : add mouse handler to the dialog.
...
Currently, dialog itself doesn't handle mouse events. It just
resends mouse event to each its widget. If we can several overlapped
widgets (especially, menu bar), there is some problem to decide which
widget must get event at first.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-05-30 13:23:12 +04:00
Andrew Borodin
393d90f207
(input_history_strip_password): actually url is not the pointer to constant.
2012-04-22 11:25:11 +03:00
Slava Zanko
4184555b82
Ticket #2760 : The password for session ftp remains in input history
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-12 22:31:20 +03:00
Andrew Borodin
08f2593ae9
Ticket #2608 : mc hangs while switching to opened screen.
...
The bug was introduced in 6ad4b2466b
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-09 21:16:23 +04:00
Andrew Borodin
4cc0aefb16
Ticket #2756 : fixed menu alignment.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-25 10:35:57 +04:00
Andrew Borodin
21d0ff05f2
Disable resizable menu.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 16:21:09 +03:00
Andrew Borodin
dea3aa9023
Reorder fields in mc_global struct and change type for some of them.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:06:00 +03:00
Andrew Borodin
c7bde637f9
Tweak background operations support.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
fc371ba8f8
Make menu always resizable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
19a4eb1ca6
Added D_CENTER flag to query dialog flags
...
...to forced place a query dialog in the center of the screen.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
62fc80f5f7
Allow draw a part of line if some coordinares are out of screen boundaries.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
7e6ff9caf9
Allow override standard dialog actions in some dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
dc3d161e71
Don't get dialog hotkey from disabled widget.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
65d9697d69
Fixed widget redraw order in dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
8bbad1dbfb
Menu hack to keep overlapped widgets order
...
...required in multi-window editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
fe34f89a19
Added dlg_set_top_widget() function
...
...to move widget to the top of widget list and make it current.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
6ad4b2466b
Allow add and remove widgets in runtime.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
33d25a0c8f
Put global mouse coordinates to widgets.
...
Now each widget gets absolute coordinates of mouse pointer and decides
itself how to handle them.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
7956b64e54
Fix mouse handling in dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
c3f359c82b
Ticket #2608 : widget enhancements.
...
New method of widget ID assignment:
now widget ID is a value of unsigned long type. Dlg_head structure now has
new filed widget_id that contains a ID of the next added widget. When new
widget is added into dialog, widget_id is set as ID of it and then
incremented.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Slava Zanko
2b5c28b316
Changes to handle vfs_path_t object:
...
* removed strip_password () function;
* Added new vfs_path flag: VPF_HIDE_CHARSET;
* added vfs_path_add_element() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
8562a215be
Code refactoring: removed concat_dir_and_file() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
034252a71a
Changed interface of function mc_opendir()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:24 +03:00
Slava Zanko
eeaad790ab
Changed interface of mc_stat() and mc_lstat() functions
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:24 +03:00
Andrew Borodin
bff2736906
Support of disable of shell variables substitution in autocompletion.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-02-24 09:39:04 +03:00
Andrew Borodin
d412b1ec8f
(history_put): unused. Removed.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Andrew Borodin
d99feea391
Ticket #2678 : fixup of filemanager layout after screen resize.
...
Initial state: forced suspend the previous screen when new screen has
been created. Forced resume the current screen when the previous screen
has been closed. Don't redraw suspended screens, just set sinch_pending
flag. Screen will be redrawn immediately after resume.
This commit allow ret rid of setup_panels() call if screen is resized
and filemanager is not active screen at that time.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-07 16:02:20 +03:00
Slava Zanko
6c32fa3b84
Added function mc_config_get_full_path() for search user's config files by short names.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Ilia Maslakov
e1231e3d8e
Ticket #2653 (fixed: input password)
...
Fixed: input field in password mode is fully masked with asterisks.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-11-03 16:46:31 +04:00
Slava Zanko
0138645541
Ticket 1551: Update GPL version from 2 to 3
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Andrew Borodin
cef8eb5cc4
(mc_refresh): moved from lib/widget/wtools.[ch] to lib/widget/dialog-switch.[ch]
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
8f4b9e32f1
Remove extra screen update after show help.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00