Commit Graph

98 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
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
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
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
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
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
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
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
c757bbeda1 * widget.h: Define type bcback for button callbacks. 2003-09-01 08:16:08 +00:00
Pavel Roskin
f8e00e7b6a * widget.c (listbox_new): Remove "action" argument. Listboxes
without callbacks default to closing the dialog.  Adjust all
users.  This fixes double click on completion listbox.
* widget.h: Use uppercase names for the return values of the
listbox callback.
2003-09-01 07:31:56 +00:00
Pavel Roskin
bd4a76ebb3 * widget.h: Eliminate listbox_cback. Call listbox callback
whenever it's defined.  Adjust all users.
2003-09-01 05:58:38 +00:00
Pavel Roskin
2b9b18150e * widget.h (button_new): Remove unused extra argument. Adjust
all dependencies.
2003-09-01 02:07:02 +00:00
Pavel Roskin
c27ebffa28 * option.c (check_options): Remove tk field.
* widget.c: Comment fix to get rid of references to Tk.
* wtools.c (real_input_dialog_help): Rename tk_name to histname.
Remove names from non-input widgets.
2003-09-01 01:34:17 +00:00
Pavel Roskin
fab6e8a493 * widget.h: Completely get rid of tkname. Rename it to histname
for the input widget.  Adjust all dependencies.
2003-09-01 00:18:37 +00:00
Pavel Roskin
10f65ac83d * dlg.h (struct Widget): Remove tkname field.
(init_widget): Remove tkname argument.
* widget.h (listbox_new): Likewise.
Adjust all dependencies.
2003-08-31 23:29:49 +00:00
Pavel Roskin
944d5c430b * key.c (mc_bindings): Remove. Esc-">" and Esc-"<" are not
always the same as Home and End, at least in mcedit.
(get_key_code): Never ignore Escape outside known sequences.
* screen.c (panel_keymap): Add Esc-">" and Esc-"<".
* tree.c (tree_keymap): Likewise.
* widget.c (input_map): Likewise.
(listbox_key): Likewise.
(check_movement_keys): Likewise.
Reported by Miguel de Icaza <miguel@ximian.com>
2003-06-14 05:19:19 +00:00
Pavel Roskin
99e1805194 * screen.c (panel_destroy): Rewind history to the beginning
before freeing it.
* widget.c (input_destroy): Likewise.
* util.c (list_append_unique): Free data when removing duplicate
list entries.
2003-06-05 23:51:15 +00:00
Pavel Roskin
341ad1d804 Fix typos and "britainisms". 2003-06-02 18:13:42 +00:00
Pavel Roskin
867704615b * key.c (correct_key_code): Convert unrecognized 0177, Ctrl-h
and Ctrl-d into Delete and Backspace.  Remove all references to
those keys in other files.
2003-03-10 20:27:54 +00:00
Pavel Roskin
a2ef2fe88b * widget.c (history_get): Set the history to the last item.
Reported by Adam Byrtek <alpha@debian.org>
2003-02-18 21:43:46 +00:00
Pavel Roskin
bd19828876 * widget.c (history_get): Use list_append_unique() for backward
compatibility.
2003-02-18 06:29:43 +00:00
Pavel Roskin
738e33006b * util.c (list_append_unique): New function - add text to GList
and remove duplicates.
* main.c (directory_history_add): Use list_append_unique().
* widget.c (push_history): Likewise.
2003-02-18 06:12:57 +00:00
Pavel Roskin
89e5cc319e * panel.h: Convert directory history to GList.
* widget.h: Convert input history to GList.
Adjust all dependencies.
2003-02-18 05:25:45 +00:00
Pavel Roskin
9393a182b5 * widget.c (input_callback): Insert Enter with a modifier as
literal Enter.  Useful when pasting multiline text.
2002-12-25 23:15:48 +00:00
Pavel Roskin
0d0009e263 * key.c (get_modifier): Make static. Return the mc internal
representation, not the Linux console code.
(correct_key_code): Add the modifier, not strip it.
(ctrl_pressed): Remove.  Adjust all dependencies.
2002-12-21 08:43:15 +00:00
Pavel Roskin
1343933d07 Comment change. 2002-12-15 19:42:04 +00:00
Pavel Roskin
66f451aac7 * dlg.c (send_message_to): Remove, use send_message() instead.
(send_message): Make inline, remove Dlg_head argument.  Change
all callers.
2002-11-13 02:56:40 +00:00
Pavel Roskin
31f491b01e * dlg.h: Remove Dlg_head argument from callback_fn - it's
excessive and can be trivially derived from the widget.
(default_proc): Remove Dlg_head argument.  Change all callers.
* widget.c (listbox_draw): Remove Dlg_head argument.
2002-11-13 02:27:00 +00:00
Pavel Roskin
eb53b3e975 * dlg.c (widget_redraw): Remove.
* widget.c (find_buttonbar): Use find_widget_type().  Make
global.
(define_label): Remove paneletc argument.  Change all callers.
(define_label_data): Likewise.
(redraw_labels): Likewise.  Use find_buttonbar().
* view.c (view_adjust_size): Use find_buttonbar().
2002-11-12 23:33:15 +00:00
Pavel Roskin
e0194b11a0 * dlg.h: Move movefn definition ...
* win.h: ... where it's used.  Remove unused definitions.
* win.c: Remove unused code.
* key.h: Include mouse.h, don't rely on others doing it.
* widget.h: Include dlg.h.  Remove Tk-only fields.
* widget.c: Remove Tk-only fields.
2002-11-11 07:12:03 +00:00
Pavel Roskin
c785d4195b * global.h: Move fcntl.h inclusion here. Define O_BINARY.
* mountlist.c: Remove more includes already handled in global.h.
2002-09-23 06:43:22 +00:00
Pavel Roskin
774b97e94c * mouse.h: Put return codes from the mouse callback to an enum.
Remove MOU_ENDLOOP and MOU_LOCK - they are interpreted like
MOU_NORMAL.  Adjust all dependencies.
* dlg.c: Use MOU_NORMAL instead of 0 for mouse_status.
2002-09-22 05:49:17 +00:00
Pavel Roskin
f6f02a0295 * command.c: Make `command' a standard WInput widget, just
change its callback.  Eliminate input_w().  Adjust all
dependencies.
* widget.c (input_callback): Remove static attribute.
2002-09-20 19:36:55 +00:00
Pavel Roskin
6c2eb32b70 * dlg.c (x_set_dialog_title): Completely eliminate. Adjust all
dependencies.
2002-09-03 07:42:36 +00:00
Pavel Roskin
e000c69683 * wtools.c (common_dialog_callback): Fold into ...
* dlg.c (default_dlg_callback): ... this.  Don't redraw dialogs
that don't have colors.  Adjust all dependencies.
(std_callback): Elimitate.
2002-09-02 16:31:33 +00:00
Pavel Roskin
0df513bcc2 * widget.c (history_callback): Eliminate in favor of
common_dialog_callback().
(show_hist): Set dialog title and flag DLG_COMPACT.
2002-09-02 08:01:35 +00:00
Pavel Roskin
f871fca140 * widget.c (buttonbar_callback): Fix a bug that prevented the
last byte from being redrawn.
Reported by David Martin <dmartina@excite.com>
2002-08-21 22:52:29 +00:00
Pavel Roskin
2f9416892a * widget.c: Make more functions static. 2002-08-21 21:47:29 +00:00
Pavel Roskin
6bdeafba4d * dlg.c: Eliminate all useless x_* functions.
* dlg.h: Likewise.
* panel.h: Likewise.
* textconf.h: Likewise.
* view.c: Likewise.
* view.h: Likewise.
* widget.c: Likewise.
* main.c: Remove panel_update_marks(). Move try_to_select() ...
* screen.c: ... here.  Eliminate x_* functions.
* main.h: Remove panel_update_marks().
2002-07-19 22:16:24 +00:00
Pavel Roskin
8e085b98fd * widget.h: Use type "buttonbarfn" more consistently.
* widget.c: Likewise.
2001-10-01 06:31:40 +00:00
Pavel Roskin
9b00e32f64 * view.c: Cleanup of preprocessor directives.
* view.h: Likewise.
* widget.c: Likewise.
* widget.h: Likewise.
2001-09-16 01:22:12 +00:00
Pavel Roskin
f2e38b2c3a * textconf.h: Get rid of all PORT_HAS_*. Adjust all users.
Continued eliminating GNOME code.
2001-09-16 01:10:09 +00:00
Pavel Roskin
e840cff0dc * widget.c (label_new): Don't calculate dimensions of multiline
labels, since they cannot be changed and msglen() is already
used when the dialog is created.
2001-09-03 15:17:27 +00:00
Pavel Roskin
a8ef641beb * x.h: Remove. Adjust all users. Make sure that global.h is
included instead.  Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Pavel Roskin
fc6efa62f9 * widget.c (label_new): Set initial width of the widget based on
the initial text.
2001-09-03 01:15:07 +00:00
Andrew V. Samoilov
8611daeb0c * widget.[ch] (label_new): Make text parameter const. 2001-07-31 11:04:21 +00:00
Pavel Roskin
d866874b24 * widget.c (input_callback) [HAVE_X]: Disable Ctrl-q - it
doesn't work.
2001-07-20 16:34:05 +00:00
Pavel Roskin
c83fdc336c * key.c (ctrl_pressed): Don't limit functionality to Linux.
* screen.c (prev_page_key): Don't require console_flag to be set
to use ctrl_pressed(), only require that HAVE_X is undefined.
(next_page_key): Likewise.
* widget.c (key_left): Don't limit functionality to Linux.
(key_right): Likewise.
2001-06-26 03:20:22 +00:00