Commit Graph

1638 Commits

Author SHA1 Message Date
Pavel Roskin
e14f56d71b * dlg.h: Replace DLG_BACKWARD to DLG_REVERSE with a better
defined meaning.  Make it default to populate dialogs from the
top.  Change all calls to create_dlg().
2003-09-12 21:22:01 +00:00
Pavel Roskin
997a8ddd8b * dlg.c: DLG_BACKWARD now affects how the dialog is populated by
widgets, not the runtime behavior.
(init_dlg): Don't change current widget.  This allows using
dlg_select_widget() before the dialog is run.
* dlg.h: Remove initfocus field.
* wtools.c (query_dialog): Use dlg_select_widget(), not
initfocus to set the initial widget.
2003-09-12 08:28:21 +00:00
Pavel Roskin
7c143915b4 * widget.c (input_callback): Don't handle Enter.
Requested by Ali Akcaagac <aliakc@web.de>
2003-09-12 07:50:08 +00:00
Pavel Roskin
9653eb538f * chmod.c (chmod_callback): Fix uninitialized variable. 2003-09-12 07:42:16 +00:00
Pavel Roskin
60dda91b9f * main.c (midnight_callback): Don't redraw dirty panels if the
menubar is active.
2003-09-12 03:14:44 +00:00
Pavel Roskin
0464c5e94d * dlg.c (add_widget): New, safer implementation. Don't rely on
the position of the first widget.  Disable insertion into
running dialogs - it's unused and cannot be tested.
2003-09-12 02:25:41 +00:00
Pavel Roskin
ab761c64a6 * boxes.c (symlink_dialog): Add "OK" and "Cancel" buttons.
Don't translate strings, it's done in quick_dialog().
Reported by Ali Akcaagac <aliakc@web.de>
2003-09-11 22:27:38 +00:00
Pavel Roskin
4d797a9f72 * dlg.h: Remove "last" field from Dlg_head, it's unneeded in a
circularly linked list.
2003-09-11 00:13:36 +00:00
Pavel Roskin
9ddc1c9cbc * screen.c (paint_dir): Don't make panel clean here.
(panel_update_contents): Do it here.
(panel_callback): Repaint the panel on focus.
(select_item): Don't paint anything here.
2003-09-11 00:01:16 +00:00
Pavel Roskin
c847c91d61 * dlg.h (send_message): Use cb_ret_t and widget_msg_t. 2003-09-10 23:58:37 +00:00
Pavel Roskin
738044481c * main.c (menu_cmd): If the current panel is inactive, use the
opposite side to start menu.
2003-09-10 23:37:27 +00:00
Pavel Roskin
e355e25b56 * dlg.h: Use cb_ret_t and widget_msg_t in widget callbacks.
Massive adjustment for the above.
2003-09-10 22:48:54 +00:00
Pavel Roskin
683c686159 * chmod.c (chmod_toggle_select): Get id as argument. 2003-09-10 21:35:34 +00:00
Pavel Roskin
0c794a4e95 Fix unsafe defines. 2003-09-10 21:33:12 +00:00
Pavel Roskin
24737eb1c1 * dlg.h: Remove restroy callback. Widgets should use
WIDGET_DESTROY.  Adjust all dependencies.
2003-09-10 18:21:40 +00:00
Pavel Roskin
e51f170ad9 * dlg.c: Don't supply ID of the current widget with any
callbacks.  It's mostly useless and can be found by the
callback.
* layout.c: Likewise.
* widget.c: Likewise.
* chmod.c (chmod_callback): Adjust for the above.
2003-09-10 16:16:34 +00:00
Pavel Roskin
f462c5a77d * layout.c (layout_change): Make static.
* screen.c (paint_panel): Likewise.
* cmd.c (dirsizes_cmd): Use dirty flag.
* tree.c (chdir_sel): Don't call paint_panel().
2003-09-10 06:15:53 +00:00
Pavel Roskin
33078ab195 * find.c: Remove useless calls to paint_panel().
* panelize.c: Likewise.
2003-09-10 05:38:38 +00:00
Pavel Roskin
109b933235 * screen.c (use_display_format): Set dirty flag. Remove calls
to paint_panel() where they become unneeded.
2003-09-10 05:26:04 +00:00
Pavel Roskin
9f461b6697 * screen.c (file_mark): Set dirty flag if the mark changes.
* cmd.c: Remove calls to paint_panel() due to file marks.
2003-09-10 05:12:45 +00:00
Pavel Roskin
bab1cfdc49 * screen.c (update_dirty_panels): New function - update panels
with the dirty flag.
(panel_update_contents): Make static, don't call directly.
* main.c: Don't call panel_update_contents(), use dirty flag.
(midnight_callback): Call update_dirty_panels().
2003-09-10 04:42:13 +00:00
Pavel Roskin
649f1c538e * find.c (find_parameters): Make "filename" entry focused on
startup - it's used more often than "start at".
2003-09-10 00:29:09 +00:00
Pavel Roskin
b965674fd7 * widget.c (button_callback): Don't let the default button steal
Enter from the current button.
2003-09-10 00:14:36 +00:00
Pavel Roskin
17e517ebbb Typo fixes. 2003-09-09 23:16:01 +00:00
Pavel Roskin
44e3da4bfb * widget.c (button_callback): Treat Enter as hotkey for the
default button.
* wtools.c (quick_callback): Remove, it's unneded now.
2003-09-09 23:12:06 +00:00
Pavel Roskin
001578a96f * wtools.c (quick_callback): Restore old obscure functionality -
DLG_KEY should not return MSG_HANDLED to allow the button
callback to override the dialog return value.
2003-09-09 20:48:38 +00:00
Pavel Roskin
7f99259757 * key.c (xterm_key_defines): Add keypad keys.
Reported by Vyacheslav Filyayev <vfilyayev@d2.khai.edu>
2003-09-09 16:30:14 +00:00
Pavel Roskin
3058921b75 * view.c (view_init): Constify "_command" argument.
(view): Likewise.
(do_view_init): Likewise.
(init_growing_view): Constify "name" and "filename" args.
* view.h: Fix declarations and comment.
2003-09-09 04:54:59 +00:00
Pavel Roskin
35931b119e * user.c (execute_menu_command: Fix rare segmentation violation
if last line in menu file contain space(s) only and no trailing
newline.
2003-09-09 04:52:15 +00:00
Pavel Roskin
25e8950d39 * listmode.c: Use groupboxes. 2003-09-07 23:06:27 +00:00
Pavel Roskin
16a2b83754 * layout.c (init_layout): Use groupboxes. 2003-09-07 22:54:36 +00:00
Pavel Roskin
cd3673936c Remove groupbox titles from the file scope. 2003-09-07 22:53:41 +00:00
Pavel Roskin
af893babbd * widget.c: Implement new widget - groupbox.
* option.c: Use it.
2003-09-07 22:42:22 +00:00
Pavel Roskin
86c2a91184 * layout.c: Fix remaining callback calls.
* widget.c: Likewise.
2003-09-07 21:30:36 +00:00
Pavel Roskin
13a02ef978 * dlg.h: Use new types for dialog callbacks.
(dlg_cb_fn): Swap msg and parm arguments for consistency with
widget callbacks.  Adjust all dependencies.
2003-09-07 21:24:01 +00:00
Pavel Roskin
1ec8dad250 * dlg.h: Remove WIDGET_USER. Define new types dlg_msg_t,
widget_msg_t and cb_ret_t.
2003-09-07 19:28:44 +00:00
Pavel Roskin
1e0850ab07 * dlg.c (find_widget_type): Take pointer to void to avoid casts
everywhere.  Adjust all callers.
2003-09-07 07:16:12 +00:00
Pavel Roskin
39968fa7af * main.c (midnight_callback): Fix for the last commit - repaint
the panel if the search mode is unset.
2003-09-07 06:15:44 +00:00
Pavel Roskin
9a7b4212c6 * dlg.h: Remove DLG_PRE_EVENT, it's unused now. 2003-09-07 06:03:51 +00:00
Pavel Roskin
485bbcef9b * main.c (make_panels_dirty): Remove, it's unneded now.
(midnight_callback): Don't call make_panels_dirty().  Mark
current panel dirty if the search mode is unset.  No need to set
attibutes before calling show_console_contents().
2003-09-07 05:58:55 +00:00
Pavel Roskin
2a60f651e3 * dlg.h: Convert send_idle_msg field to a publicly visible flag
DLG_WANT_IDLE.
* main.c (midnight_callback): Move auto_menu handling to the
handler for DLG_IDLE.
(do_nc): Request idle events.
2003-09-07 05:39:51 +00:00
Pavel Roskin
80f4f3f55d * dlg.c: Fix a bug when DLG_HOTKEY_HANDLED would not be
delivered if the current widget already has focus.
2003-09-07 02:46:06 +00:00
Pavel Roskin
6349237830 * user.c (execute_menu_command): Implement %view macro. 2003-09-04 17:02:21 +00:00
Pavel Roskin
9190dcbfa8 * wtools.c (create_listbox_window): Don't repaint the dialog
before it's run.
2003-09-03 05:19:08 +00:00
Pavel Roskin
058e91c2f5 * learn.c: Don't track button hotkeys.
(learn_check_key): Consume all alphanumeric keys, regardless of
button hotkeys.
2003-09-03 04:37:35 +00:00
Pavel Roskin
f0eeffd583 Trivial simplification from Andrew V. Samoilov <sav@bcs.zp.ua> 2003-09-02 22:38:15 +00:00
Pavel Roskin
ac1fd1d878 Remove unused variable stdout_fd. 2003-09-02 22:36:58 +00:00
Pavel Roskin
198e0035e4 * listmode.c: Create all buttons in one place. Remove unneeded
low-level drawing.
(listmode_edit): Return NULL on cancel.
* main.c (listmode_cmd): Actually use the result of
listmode_edit().
2003-09-01 09:03:30 +00:00
Pavel Roskin
3632b705de * listmode.c: Use callbacks for Add and Remove buttons. Don't
run dialog in the loop, it doesn't work this way.
2003-09-01 08:18:54 +00:00
Pavel Roskin
c757bbeda1 * widget.h: Define type bcback for button callbacks. 2003-09-01 08:16:08 +00:00