Commit Graph

301 Commits

Author SHA1 Message Date
Pavel Roskin
98950838b4 * dlg.h: Merge with ...
* dialog.h: ... this.  Adjust all dependencies.
* dlg.c: Merge with ...
* dialog.c: ... this.
* Makefile.am (SRCS): Remove dlg.h and dlg.c.
2003-10-24 23:20:30 +00:00
Pavel Roskin
ad84a71c64 * edit-widget.h (struct WEdit): Add GTree *defines field.
* syntax.c: Use edit->defines instead of static defines.
2003-10-23 23:23:46 +00:00
Pavel Roskin
f426c570a6 * syntax.c (compare_word_to_right): More checks for braces and
brackets.
2003-10-16 20:31:06 +00:00
Pavel Roskin
7f8dfa977d * syntax.c (compare_word_to_right): Fix recent breakage - rules
ending with wildcard (e.g. "$+") won't match.
2003-10-16 20:16:38 +00:00
Pavel Roskin
e90a7540a2 * edit.h: Make static all functions and variables that don't
need to be global.  Remove unused functions.  Adjust all
dependencies.
2003-10-14 21:48:40 +00:00
Pavel Roskin
fce42c9316 * syntax.c: Give names to numeric tokens. 2003-09-22 23:04:48 +00:00
Pavel Roskin
daab7bd737 * syntax.c (compare_word_to_right): Add checks that we don't go
beyond text length for certain invalid rules.
Reported by Juan C. Olivares <juancri@TAGnet.org>
2003-09-22 22:30:48 +00:00
Pavel Roskin
6eda31f362 * menu.h: Return to keeping dialog id instead of a widget
pointer for previous widget.  The widget can be replaced in the
meantime.
* dlg.c (dlg_select_by_id): New function, essentially a cleaner
implementation of dlg_select_nth_widget().
2003-09-13 07:43:20 +00:00
Pavel Roskin
c0b34498dd * dlg.h: Merge Widget_Item into Widget. Massive adjustment. 2003-09-12 23:38:42 +00:00
Pavel Roskin
824a5256c1 * menu.h (WMenu): Save pointer to the previous widget, not its
number.  Adjust all dependencies.
* menu.c (menubar_finish): Restore focus on the saved widget.
* dlg.c (dlg_item_number): Remove, it's unused now.
(dlg_select_nth_widget): Likewise.
2003-09-12 22:45:51 +00:00
Pavel Roskin
e0f9b7ab83 * editcmd.c (edit_raw_key_query): Use straight widget order.
(edit_completion_dialog): Likewise.
* editwidget.c (edit): Likewise.
2003-09-12 21:30:29 +00:00
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
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
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
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
38265d418d * edit.h: Get rid of WIDGET_COMMAND, update all dependencies. 2003-09-07 19:08:07 +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
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
58545e65c2 * widget.h: Use exact type in the listbox callback. Adjust all
legitimate users, remove all unused callbacks.
2003-09-01 05:43:20 +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
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
d521073663 Add missing include. 2003-08-18 05:20:52 +00:00
Pavel Roskin
cf9acd036e * edit-widget.h: Resurrect "dir" field in WEdit to store
directory for relative filenames.

* edit.c (edit_clean): Release edit->dir.

* editcmd.c (edit_save_file): Use absolute filename.
Temporarily disable safe save and backups on remote VFS because
it doesn't work - again.
2003-07-31 16:38:07 +00:00
Pavel Roskin
81d396da33 Remove useless initialization. 2003-07-31 16:32:30 +00:00
Pavel Roskin
58572c60da * edit.c (edit_execute_cmd): Enable user menu in mcedit. 2003-07-25 18:52:28 +00:00
Pavel Roskin
c72a1ea44c Get rid of all references to NATIVE_WIN32. 2003-07-23 03:22:32 +00:00
Pavel Roskin
dadbdd25e9 * editcmd.c (edit_quit_cmd): Rename to ...
(edit_ok_to_exit): ... this.  Don't stop dialog - this function
is called by the dialog code.
* editwidget.c (edit_dialog_callback): Process DLG_VALIDATE
event.  Don't exit it the user wants to continue editing.
* edit.c (edit_execute_cmd): Close the dialog - it will ask user
if necessary.
2003-07-21 03:54:47 +00:00
Pavel Roskin
7a5c9a3834 Kill another instance of using delete_file in a wrong place. 2003-07-20 23:34:29 +00:00
Pavel Roskin
9bc8df86ad * editcmd.c (edit_quit_cmd): Don't save this command in the undo
stack.  Don't force any refresh.  Don't delete unsaved files, do
it ...
* edit.c (edit_clean): ... here.  This ensures that unsaved
files from the mcedit command line are erased on Ctrl-n.
2003-07-20 23:24:25 +00:00
Pavel Roskin
0633d91f60 * editwidget.c (edit): Remove unused variable "framed". 2003-07-20 22:15:28 +00:00
Pavel Roskin
4b8f0b02b2 * edit.c (edit_clean): Remove stale lock if any. 2003-07-09 00:21:09 +00:00
Pavel Roskin
5ff5f8e9d1 * edit-widget.h: Add new field loading_done.
* edit.c (edit_init): Set loading_done.
(edit_insert): Don't call edit_modification() before the file is
completely loaded.
2003-07-09 00:18:11 +00:00
Pavel Roskin
59593d0e1b * edit-widget.h: Eliminate unused explicit_syntax field. 2003-07-08 23:58:36 +00:00
Pavel Roskin
729a855b29 * edit-widget.h: Stop misusing "unsigned char" for boolean.
Eliminate have_frame - it's unused.  Adjust all dependencies.
2003-07-08 23:46:01 +00:00
Pavel Roskin
6b63507463 * editkeys.c: Leave only distinct entries in cooledit_key_map
and emacs_key_map.  Move the rest to common_key_map.
2003-06-14 05:02:33 +00:00
Pavel Roskin
9dae056016 * editkeys.c (emacs_key_map): Move Atl-'>' and Alt-'<' ...
(common_key_map): ... here.
2003-06-10 00:35:55 +00:00
Pavel Roskin
4a398f0ee7 * editcmd.c (edit_ext_cmd): Fix memory leak. 2003-06-05 17:55:50 +00:00
Pavel Roskin
69a16471a9 edit_ext_cmd(): trivial simplification. 2003-06-05 04:06:37 +00:00
Pavel Roskin
f6e1d08562 Typo. 2003-06-02 19:25:15 +00:00
Pavel Roskin
3cd4571dc9 Typos and britainisms. 2003-06-02 18:39:44 +00:00
Pavel Roskin
a66e5f511f Add comment for edit_ext_cmd. 2003-05-30 21:14:07 +00:00
Pavel Roskin
bdc56f331b * editcmd.c: Implement pasting the output of any external
command.
* editmenu.c: Add menu entries for that.
* editcmddef.h: Add new command CK_ExtCmd.
2003-05-30 21:06:10 +00:00
Pavel Roskin
e95373535c * edit.c: Move edit_modification() before actions to provide
proper repainting if there are dialogs invoked by actions.
2003-04-05 01:43:58 +00:00
Pavel Roskin
66a823861f * editlock.c: Split lock into user@host and pid and report them
separately.
2003-04-05 01:29:15 +00:00
Pavel Roskin
ebf1bcfa33 * edit.c (edit_load_file): Use vfs_file_is_local(), not
vfs_current_is_local().
* editlock.c (edit_lock_file): Disable locking on VFS.
2003-04-02 22:25:00 +00:00
Pavel Roskin
d88b75838a * editlock.c, editlock.h: New files. Implement file locking in
Emacs style, as documented in JED editor sources.
* Makefile.am: Add those files to build tree.

* edit-widget.c (WEdit): New property 'locked', 0 on edit_init.
* edit.c (edit_modification): Lock buffer on modification.
* editcmd.c (edit_save_cmd, edit_save_as_cmd): Handle locking
during file save.
(edit_load_file_from_filename): Unlock.  Remove 2 duplicate
lines (handled by edit_init).
(edit_quit_cmd): Unlock.
2003-04-02 19:36:10 +00:00
Pavel Roskin
d4336795e6 * edit.h: Make it easier to tweak buffer size and maximal number
of buffers.
2003-03-12 07:07:27 +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