Andrew Borodin
5169a9dd95
Ticket #3714 : (dialog_change_screen_size): fix dialog resizing order.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 12:36:57 +03:00
Mooffie
607eb74cbb
Ticket #3721 : clean up radio widget's MSG_CURSOR.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-13 12:31:47 +03:00
Andrew Borodin
716479ba4f
Ticket #3700 : fix segfault after switch left panel to info mode.
...
(widget_replace): if new widget cannot take focus, move focus to other widget
before widget replacement.
In our case, the focused file panel is replaced by Info one. Info panel
a) isn't selectable (it never takes focus) and b) uses CWD of current
panel. Therefore focus must be moved to other file panel to make it
current and correctly set up it's CWD before first draw of Info panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-10-23 08:08:15 +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
36cc88b5f2
Reimplement widget focus/selection.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +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
35451978f6
Rename WDialog APIs:
...
dlg_one_up -> dlg_select_prev_widget
dlg_one_down -> dlg_select_next_widget
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
b19ae2b938
Refactoring of change of current widget.
...
Add new WDialog APIs:
* dlg_set_current_widget_next
* dlg_set_current_widget_prev
* dlg_get_widget_next_of
* dlg_get_widget_prev_of
and use them:
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
0df5ad5686
WInput: avoid double draw on resize.
...
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
91c72122a8
(widget_set_size): send MSG_DRAW after MSG_RESIZE.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
240350db95
Refactoring of widget drawing to avoid multiple widget redraw.
...
Send MSG_DRAW message immediately after MSG_FOCUS/MSG_UNFOCUS.
Thus, the MSG_DRAW message handler is the only place where widget
should be drawn. Widget should not draw itself in other message
handlers.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:30:20 +03:00
Andrew Borodin
e1a2e8f8ec
WButton: remove WButton::selected. Use WST_FOCUSED instead.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
ad166313a4
WListbox: remove WListbox::focused. Use WST_FOCUSED instead.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
c37f9b770a
WST_FOCUSED: add new state and handle it.
...
Notify widget's owner that widget gets or loses focus.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +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
41144d619c
(widget_set_state): return cb_ret_t instead of gboolean.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
c90b806728
Don't focus widget that doesn't have the WOP_SELECTABLE option.
...
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
5ac1c5a3e0
Ticket #2919 : refactoring of focus/unfocus of widgets.
...
Initial step: add WOP_SELECTABLE option and set it up explicitly for
widgets that can be selected.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:26:00 +03:00
Andrew Borodin
adc6bd83d6
(dlg_adjust_position): refactoring.
2016-09-11 11:11:01 +03:00
Andrew Borodin
fb4f4674c7
Ticket #3641 : code cleanup before 4.8.18 release.
...
(dlg_adjust_position): don't change origin of non-centered dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:11:01 +03:00
Andreas Mohr
b36cec44e3
Cleanup unused macros.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
e07408e8c7
(check_callback): clean unneeded type casting.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
b0e3552847
Refactoring of widget's position and size calculation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
86fd77155e
Refactoring of dialog's position and size calculation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
wwp
e629712197
Ticket #3562 : fix Glib-critical asserts in empty WListbox.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andreas Mohr
8710d2522f
(variable_completion_function): cleanup Wconditional-uninitialized warning.
...
input_complete.c:383:42: error: variable 'p' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
temp = g_string_new_len (*env_p, p - *env_p);
^
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
7c74fd90f0
Ticket #3661 : wrong handling of mouse clicks in long listing mode.
...
This occurs if the left panel is in long listing mode and the right
panel is in full listing mode:
When the left panel is active and you click on the right side of the
panel, the click event is directed to the (inactive) right panel instead
of the (active) left panel.
This occurs if the right panel is in long listing mode:
When the left panel is active and you click on the left panel, the click
event is always directed to the (inactive) right panel. It's impossible
to click anything on the left panel, if the right panel is in long
listing mode.
Thanks Seray Rosh <seray.rosh@web.de> for intial patch.
Initial commit: refactoring of widget selection.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-09 19:13:20 +03:00
Andrew Borodin
b4af91dfc0
Reorganize WDialog flags.
...
* DLG_FULLSCREEN: move and rename to WPOS_FULLSCREEN.
* DLG_CENTER: move and rename to WPOS_CENTER.
* DLG_TRYUP: move and rename to WPOS_TRYUP.
* WDialog::fullscreen: remove, use WPOS_FULLSCREEN instead.
* WDialog::compact: new field. Use instead of DLG_COMPACT.
* WDialog:🎏 remove.
* dlg_flags_t: remove.
* dlg_create: add new agruments: pos_flags, compact. Remove
argument: flags.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:41:00 +03:00
Andrew Borodin
0933b08964
(dlg_set_position): minor refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
163d9cd94a
Rename DLG_WANT_TAB to WOP_WANT_TAB and move it to widget_options_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +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
db0d01b9d6
Add WST_MODAL state.
...
* WDialog::modal: remove. Use WST_MODAL instead.
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
Andrew Borodin
4b72fb5f5e
Join widget_state_t and dlg_state_t.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
0a2877edef
Move WOP_WANT_IDLE option to widget_state_t flags
...
...and rename to WST_IDLE.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
b337287336
Move WOP_DISABLED option to widget_state_t flags
...
...and rename to WST_DISABLED.
* Widget::state: new field.
* (widget_set_state): new function.
* (widget_set_options): symplify.
* (input_set_options): remove.
* MSG_ENABLE, MSG_DISABLE: new messages.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
a9fcd6c4c6
widget_state_t: new type.
...
(widget_get_state): new widget API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
f5a1dfcef4
(widget_get_options): new widget API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
4a0cd948df
Change prefix of widget options: W_ -> WOP_.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
619480c68b
Ticket #3632 : refactoring of widget flags.
...
Initial commit: rename functions:
* widget_default_set_options_callback -> widget_default_set_options
* input_set_options_callback -> input_set_options
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
abbfde35b2
lib/widget/input_complete.c: apply coding guidelines.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
1bfe137d2a
(command_completion_function): cleanup cppcheck warning.
...
As other local functions use "text" as function parameter variable
to fix cppcheck warning:
[lib/widget/input_complete.c:569]: (error) Uninitialized variable: text
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
dcf2ac11c1
(dlg_set_top_or_bottom_widget): move to proper file section.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
bc14ff44c8
Remove min() and max() macros. Use MIN() and MAX() macros from GLib.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
0641e942e5
(input_is_empty): new WInput API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
eef076cef6
cppcheck: Cleanup Passing NULL after the last typed argument warning
...
Cleanup Passing NULL after the last typed argument warning.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
5a7d7d0087
(mouse_get_local): cleanup uninitialized warning.
...
Cleanup uninitialized warning with gcc compiler (gcc-4.4.7-4.el6).
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
284a19aff1
(find_widget_type): Make Solaris Studio happy
...
Make Solaris Studio 12.4 happy.
"dialog.c", line 1029: warning: argument #2 is incompatible with prototype:
prototype: pointer to const void
argument : pointer to function (...) returning enum (...)
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Yuri Khan
c1975a3a35
Do not duplicate alternate screen switching.
...
S-Lang already handles that in SLsmg_init_smg() and SLsmg_reset_smg().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Yuri Khan
abb4996589
Ticket #3640 : Subshell cursor position lost after window resizing.
...
Refactoring: rename functions:
do_enter_ca_mode -> tty_enter_ca_mode
do_exit_ca_mode -> tty_exit_ca_mode
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-05 10:01:13 +03:00
Andreas Mohr
ff9d37cb8f
lib/widget/input_complete.c: cleanup -Wcast-qual warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:44 +03:00
Andrew Borodin
ecfba8399c
lib/widget/input.c: cleanup -Wcast-qual warning.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:44 +03:00
Andreas Mohr
68d7f53039
lib/widget/dialog.c: cleanup -Wcast-qual warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:44 +03:00
Andreas Mohr
a5cd35d11e
lib/widget/buttonbar.c: cleanup -Wcast-qual warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:44 +03:00
Andreas Mohr
16f229114a
Ticket #3598 : cleanup some -Wcast-qual compiler warnings.
...
Introduce CONST_WIDGET helper and use it.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-16 10:23:43 +03:00
Mooffie
438e841226
Rename mouse.was_drag to mouse.last_msg.
...
Get rid of the 'click' variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
8490ca7be4
Drop old mouse API and use the new one.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Mooffie
781b810c13
Fix menu handling.
...
We now send mouse events to widgets in reverse Z-order, as done in common GUIs.
This makes it easy to implement "invisible" menubars correctly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
c9a437a9c2
Optimize menu activation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 15:29:55 +03:00
Andrew Borodin
fa4e69b3b4
WMenuBar: execute menu item after drag action.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Mooffie
cae293b4d7
WMenuBar: a few mouse handling fixes.
2016-04-01 14:16:08 +03:00
Andrew Borodin
d974021678
WMenuBar: use the new mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
e8c6608fa5
WRadio: use the new mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
ebac1745bc
WInput: use the new mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
30a56a9793
WCheck: use the new mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
23d5dbdf94
WButtonBar: use the new mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
1401f751cb
WListbox: optimize mouse event processing.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Mooffie
70184b8a2d
WListbox: use the new mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Mooffie
c678b58e23
WButton: use the new mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
192f01ebd2
Refactoring of high-level mouse API.
...
Decompose mouse event translation function: move mouse event handling
to separate function. This decomposition can be used for low-level
processing of high-level mouse events.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
b305deba64
Don't generate click event after drag action.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
cfd2c35241
(easy_mouse_translator): minor optimization.
2016-04-01 14:16:08 +03:00
Mooffie
03daa62e19
Ticket #3571 : high-level mouse API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-04-01 14:16:08 +03:00
Andrew Borodin
8c9f359e89
Clarify send of MSG_NOTIFY.
...
(check_callback): update widget itself, then send MSG_NOTIFY to owner.
(radio_callback): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-12 14:49:40 +03:00
Mooffie
4e62be3b7e
Split MSG_ACTION into MSG_ACTION and MSG_NOTIFY.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-12 14:49:40 +03:00
Mooffie
6b56cabf6f
Ticket #3566 : Split MSG_ACTION into MSG_ACTION and MSG_NOTIFY.
...
Start step: simplify buttonbar and menu handling.
We make WButtonBar send the command directly to the target widget. This
lets us simplify the MSG_ACTION case in dialog handlers. The menu handling
too is simplified here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-12 14:49:39 +03:00
Yury V. Zaytsev
a8f512c12c
Remove unneeded struct
keyword for typedef'd structs
...
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-04 09:23:38 +03:00
Andreas Mohr
ea10f33dbb
(widget_options_t): add W_DEFAULT value to cleanup -Wassign-enum warnings.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:37 +03:00
Andreas Mohr
a482f38581
Cleanup -Wfloat-conversion warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:37 +03:00
Andrew Borodin
829738baa7
(mc_error_message): make output format translatable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:37 +03:00
Andrew Borodin
4db17d31f9
lib/widget/input.c: (quote): change type to gboolean.
2016-03-04 09:23:37 +03:00
Andrew Borodin
c4258d453b
Clarify AM_CPPFLAGS.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andreas Mohr
842a723f9b
Ticket #3269 : only print meaningful error code.
...
Some error messages have no meaningful error code, don't display them.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:42:51 +03:00
Andreas Mohr
47590152fa
Ticket #3161 : WListbox: remember focus state.
...
When listbox is updated, e.g. new file match add MSG_DRAW event is triggered
but currently listbox re-draw has no knowledge about right focus state.
Fix it by remember current focus state.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-08 12:49:30 +03:00
Mooffie
aa693fb0c3
Ticket #3569 : various fixups in WListbox engine.
...
Ticket #3562 : Listbox should fire MSG_ACTION on mouse clicks too.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-08 11:40:42 +03:00
Andrew Borodin
471ea781ca
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andreas Mohr
697e406eb8
Robust sizeof() usage at function parameter and use memcpy destination sizeof...
...
...for more resilient to errors.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:09 +03:00
Andreas Mohr
5f076e9e05
Ticket #3567 : fix heap-use-after-free bug when accessing already freed widget object
...
Accessing widget object (at g_array_index loop) which was freed
already (item->quick_widget->u.input.label before at loop).
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:08 +03:00
Mooffie
b6500f1dcc
(listbox_key): remove redundant code.
...
This l->top calculation is already done in listbox_select_entry().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:08 +03:00
Andrew Borodin
a6f5767f3f
Use signed long instead of unsigned long for binded actions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:08 +03:00
Mooffie
106f80310d
Remove outdated comment about refresh.
...
This comment was explanining a call to mc_refresh(). That call was
removed in commit 1f0b05b18
. Keyboard events and mouse events are
nowadays the same: refresh is done after both.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:07 +03:00
Andreas Mohr
897eac252f
(WMenubar): fix -Wconversion warnings.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:07 +03:00
Andreas Mohr
a613de7183
(gauge_callback): fix -Wconversion warnings.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:07 +03:00
Mooffie
5fad7508c5
button_get_text() shouldn't return 'const'.
...
As it's a newly allocated string which the caller needs to free.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:06 +03:00
Andrew Borodin
99dd99172f
Listbox: don't wraparound on mouse scroll.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-18 21:24:53 +03:00
Mooffie
e86072497f
Ticket #3554 : Listbox: don't wraparound on mouse scroll.
...
Initial commit: Listbox code cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-18 21:24:46 +03:00
Andrew Borodin
70fa973f47
Fix typos.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:21 +03:00
Andrew Borodin
d9ad3d2e32
Clarify __attribute ((format (printf))) usage.
...
Thanks Andreas Mohr <and@gmx.li> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:20 +03:00
Andrew Borodin
a2fbfce123
(gauge_callback): fix draw of progress bar.
2015-11-05 14:32:53 +03:00
Egmont Koblinger
7e622158a2
Ticket #3530 : viewer: highlight Find File's result.
...
Initial commit: (WLEntry): add free_data member to free or keep the data
on entry's removal.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-10-18 18:19:26 +02:00
Andrew Borodin
21060c8ea7
(groupbox_callback): remove unused variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 20:16:56 +03:00
mooffie
ace07e4239
WGroupbox: respect dialog's colors.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 19:10:12 +03:00
Andreas Mohr
f023a83502
Ticket #3467 : add -Wunreachable-code option and fix relative warnings.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:19 +03:00
Andrew Borodin
040be28e1b
Ticket #3462 : (WHLine): fix memory leak.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-24 17:59:18 +03:00
Andrew Borodin
93d7856f85
(quick_dialog_skip): fix location of labeled input.
2015-05-24 17:51:39 +03:00
Andrew Borodin
17bbeb9791
Ticket #3456 : SFTP VFS: fix segfault.
...
(mc_error_message): return error code for possible following use."
(sftpfs_cb_open_connection): fix dereference of null pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-09 16:46:45 +03:00
Andrew Borodin
2789e6e390
Ticket #3431 : add missing default cases.
...
Introduce -Wswitch-default check.
Some minor cosmetics.
Thanks Andreas Mohr <and at gmx dot li> for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:50 +03:00
Andrew Borodin
b698b7e834
Ticket #3435 : clang compiler fixes/cleanups.
...
Since O_* macros are used in lib/global.h, include <fcntl.h> there.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andrew Borodin
c08c90cd1b
(input_execute_cmd): refactoring.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:20:53 +03:00
Andrew Borodin
42e7e39bd8
Add IS_PATH_SEP macro and use it.
...
Also massive use of PATH_SEP and PATH_SEP_STR macros.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:13:02 +03:00
Andrew Borodin
454479549c
Update copyright years.
2015-02-26 09:12:08 +03:00
Andrew Borodin
96699b7eba
Ticket #3390 : fix backward word delete in input fields.
...
How to reproduce:
Either on the command line, or in any other text entry field (e.g. copy
file to) enter a string where the last word consists of one single
letter only. E.g. "abc de f".
Press Alt+Backspace.
Expected behavior: Remove the last word, that is, the letter "f" only,
leaving "abc de ".
Actual behavior: Yet another word is removed, leaving "abc ".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-20 09:13:08 +03:00
Andrew Borodin
720f214482
(status_msg_init): repaint screen forced to remove previous finished dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:26 +04:00
Andrew Borodin
81201b3022
status_msg_t: reimplement delay usage.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:19:25 +04:00
Andrew Borodin
d6004701cc
Fix indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:57:56 +04:00
Andrew Borodin
6d82155270
Massive use of MC_PTR_FREE macro.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +04:00
Andrew Borodin
4c27f7900c
(input_event): fix handling of first mouse click.
2014-08-12 20:48:47 +04:00
Andrew Borodin
ddd336ad4d
Ticket #3225 : first Backspace/Delete ignored after mouse click in an input widget.
...
Initial commit: WInput: refactoring of text marking.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-08-03 14:54:16 +04:00
Andrew Borodin
a5488affc8
Indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:53:10 +04:00
Andrew Borodin
c672ed9b21
(label_set_textv): new WLabel API.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
9d4bafd889
(simple_status_msg_t): simple status message with label and 'Abort' button.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
55e604901f
Create status dialog window to interrupt long-time operations.
...
Such dialog allows:
* show status of operation;
* control operation using dialog buttons (Abort, Suspend, Resume, etc).
Status dialog is raised after specified delay after operation start.
If operation duration is less than delay, the status dialog is not raised.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
e786d8266e
(mouse_get_local): set Gpm_Event::modifiers only if libgpm is used.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:35:51 +04:00
Slava Zanko
512ad7d962
Make working with GError in more right way (like with exceptions).
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-07-22 13:12:07 +04:00
Andrew Borodin
f72cf464c9
(FileProgressStatus): change values to avoid overlapping with B_* values.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
478e58dfa2
(listbox_event): clarify check whether listbox is empty.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
76d61edc1e
(mouse_get_local): initialize local.modifiers.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:40 +04:00
Andrew Borodin
db951c0d7e
lib/widget/dialog-switch.c: fix the FSF name.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:40 +04:00
Egmont Koblinger
976c18557e
Ticket #3178 : fix update of command line colors on skin change.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-03-27 16:41:02 +04:00
Egmont Koblinger
5b243eb9ea
(dlg_set_size): clarify comment and hangling of DLG_TRYUP flag.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-03-24 16:20:41 +04:00
Andrew Borodin
be6b3889af
Ticket #3173 : fix location of popup windows upon screen resize.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-03-24 16:20:40 +04:00
Andrew Borodin
e5203cb023
Fix name of FSF in all *.c files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Gergely Szász
2b6e440597
Ticket #3172 : WListbox: fix of add item to the empty list.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-18 09:42:15 +04:00
Andrew Borodin
bf474e1241
Ticket #2165 : basic version of the user-friendly skin selector.
...
Thanks Egmont Koblinger and Vitaliy Filippov for original patches.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-11 15:13:09 +04:00
Andrew Borodin
30ca8efd7c
From ticket #3116 : attempt to fix segfault while passing messages to widgets.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Andrew Borodin
f0da49345a
Collapse list of copyright years to ranges. Add 2014 year.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Andrew Borodin
62e1606106
Fix segfault in directory hotlist.
...
(listbox_get_current): check parameter value before use it's member.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-01-22 13:59:54 +04:00
Andrew Borodin
7df67031a2
Refactoring of WListbox widget.
...
Use GQueue instead of GList to store listbox entries.
g_list_append() function is slow because it uses g_list_last()
internally to traverse from the beginning to the end of a list, so
forming a list of results has O(n*n) complexity instead of O(n).
GQueue contains pointers to head and tail of list and list length.
So in this case we don't need seach end of list every time when we
want append listbox entry to the listbox.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-01-14 14:13:38 +04:00
Andrew Borodin
29f6dd2a84
Use g_list_free_full().
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-25 13:47:40 +04:00
Slava Zanko
0ed4a91d7d
Reduce cppcheck warnings (style) in lib subdirectory.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
0d489acd58
cppcheck: reduce variable scope.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
bd69b8dd31
Suppress cppcheck errors
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Andrew Borodin
09f1818bed
Ticket #3018 : broken directory completion.
...
In the command line, the subdirectory completion in current directory
isn't performed if stub isn't starting with './'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 21:23:43 +04:00
Andrew Borodin
c7b7a299e3
Ticket #3084 : (dlg_init): fix order of messages sent to widgets during dialog initialization.
...
If checkbox is the first focusable widget in a dialog, it taken the MSG_DRAW
message after MSG_FOCUS one and therefore wasn't highlighted.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:59:26 +04:00
Andrew Borodin
5a61ac80d0
Refactoring of WInput history.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:53:53 +04:00