Commit Graph

63 Commits

Author SHA1 Message Date
Roland Illig
9be77996d6 Replaced the
editor_option_backup_ext_int hack with a string configuration
	variable, which allows the backup extension to have more than
	just four characters.
2005-09-07 08:54:11 +00:00
Roland Illig
073907ec5f * usermap.c: Allow user-defined keyboard bindings for mcedit.
* usermap.h: Likewise.
	* Makefile.am: Likewise.
	* editcmd.c: Define new editor commands which had been coded
	inline before.
	This change also affects some other files.
	* edit-widget.h: Invented a new type edit_key_map_type instead of
	using long for.
	* editkeys.c: Using that type.
2005-07-20 11:56:30 +00:00
Roland Illig
0ee0936513 * editwidget.c: Don't dereference WButtonBar. 2005-06-14 13:00:09 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
7758bb1b95 * editwidget.c: Removed casts on function pointer types. 2005-05-23 11:14:31 +00:00
Pavel Roskin
cd702593f6 * editwidget.c (edit_file): Move menu initialization ...
* editmenu.c (edit_init_menu): ... here.  Allocate menu
dynamically.
(edit_done_menu): Take Wmenu argument rather than Menu.  Free
menu.
(edit_reload_menu): New function, reload the menu.
(edit_options_dialog): Reload the menu if key emulation has
changed.
2005-05-20 21:19:40 +00:00
Pavel Roskin
b5b70bce10 * edit.h: Eliminate global EditMenuBar. Fix all dependencies. 2005-05-20 19:46:47 +00:00
Pavel Roskin
21ea3f6740 * *.c: Remove duplicate includes. 2005-05-10 20:57:11 +00:00
Roland Illig
ecc08f6c60 * edit.h: Removed unnecessary #include directives ...
* *.c: ... and added them here.
2005-02-22 17:00:36 +00:00
Roland Illig
e501886d58 * editdraw.c: Renamed redraw_labels to buttonbar_redraw.
* editwidget.c: Likewise. Renamed define_label_data to
	buttonbar_set_label_data.
2005-02-08 09:50:16 +00:00
Roland Illig
b49ac634f5 * editwidget.c: Don't use catstrs anymore. 2005-02-07 06:31:04 +00:00
Roland Illig
9c65d36bdd * edit.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* editcmd.c: Likewise.
	* editlock.c: Likewise.
	* editwidget.c: Likewise.
	* syntax.c: Likewise.
2004-09-24 14:57:57 +00:00
Roland Illig
3c6a792d4b * edit/edit.h: renamed edit() to edit_file() to avoid GCC shadow
warnings (many variables are also called edit).
	* edit/editwidget.c: likewise.
	* src/cmd.c: renamed edit() to edit_file() to avoid GCC shadow
	warnings (many variables are also called edit).
	* src/main.c: likewise.
2004-09-19 17:46:39 +00:00
Roland Illig
d5f70f2ab8 * editcmd.c (edit_replace_cmd): Added const qualifier.
* editwidget.c (edit_my_define): likewise.
2004-09-19 15:40:09 +00:00
Andrew V. Samoilov
0758929ef1 * editwidget.c (edit_adjust_size): Fix warnings.
(edit_dialog_callback): Likewise.
        edit.c (menu_save_mode_cmd): Likewise.
2004-09-02 20:36:17 +00:00
Pavel Roskin
8bc40b44f0 Fix includes not to rely on $(top_srcdir) being in the include path. 2003-10-29 08:54:22 +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
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
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
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
0633d91f60 * editwidget.c (edit): Remove unused variable "framed". 2003-07-20 22:15:28 +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
812bac9a33 * editkeys.c: Move key maps to the file scope. Put common keys
to a separate table common_key_map.
(edit_translate_key): Remove unused argument x_keycode.
2002-12-25 22:53:07 +00:00
Pavel Roskin
361ec45373 Fix includes. 2002-12-23 10:12:40 +00:00
Pavel Roskin
d6947e39cf * edit.c (edit_translate_key): Remove x_state argument, it's now
a part of x_keycode.
* editwidget.c (get_key_state): Remove.
2002-12-21 08:46:50 +00:00
Pavel Roskin
8148b4973c * edit.c (edit_reload): Don't initialize edit->macro_i, because
edit_init() takes care of it.
* editwidget.c (edit): Likewise.
2002-12-16 01:27:44 +00:00
Pavel Roskin
aaf569bd48 * edit.h: Don't inclide malloc.h. Use g_malloc() and g_free()
instead.  Adjust all dependencies.
2002-12-15 18:55:53 +00:00
Pavel Roskin
581cf41929 * edit.c (edit_open_file): Remove "text" and "text_size"
arguments.  Adjust all callers.
2002-12-08 09:10:38 +00:00
Pavel Roskin
c935eaa6c2 * edit.c: Commit the rest of the position saving code.
(edit_load_position): New function, load position.
(edit_save_position): New function, save position.
(edit_init): Take new argument "line".  If it's 0, load position
from .mc/filepos.
(edit_clean): Save file position to .mc/filepos even if the file
is not being saved.
* editwidget.c (edit): Don't set the initial line, pass it to
edit_init().
2002-12-08 07:47:59 +00:00
Pavel Roskin
dd7f5798fa * edit.h: Remove "dir" field in WEdit - it's always an empty
string.  Adjust all dependencies.
2002-11-30 19:50:51 +00:00
Pavel Roskin
18de4488e3 * edit-widget.h: Move typedef WEdit and file names ...
* edit.h: ... here.  Don't include edit-widget.h.  Adjust all
dependencies.
2002-11-29 03:01:06 +00:00
Pavel Roskin
7969f851bb * edit.h: Decentralize includes. 2002-11-14 19:38:26 +00:00
Pavel Roskin
e741be7a5d * *.c: Fix all global functions without declarations - declare,
make static or remove.
2002-11-13 04:32:00 +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
bc70c8cc1e * 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.
2002-11-13 02:27:35 +00:00
Pavel Roskin
0106eebda6 * editwidget.c (edit_adjust_size): Use find_buttonbar(). 2002-11-12 23:35:25 +00:00
Pavel Roskin
b0481b41bf * menu.h: Remove "*" from the definition of the type "Menu"
for consistency with other types.  Change all dependencies.
(menubar_event): Make static.
2002-11-12 21:01:50 +00:00
Pavel Roskin
e7e6552a03 * editwidget.c (edit): Make edit_dlg local variable. 2002-09-24 15:10:47 +00:00
Pavel Roskin
996a847666 * editwidget.c (edit): Install handler for DLG_RESIZE. 2002-09-24 03:57:36 +00:00
Pavel Roskin
2571416650 * editwidget.c (edit): Set edit_dlg to NULL after it's
destroyed.
2002-09-23 23:42:44 +00:00
Pavel Roskin
fb418291eb * editwidget.c (edit_event): Add support for mouse wheel events.
* edit.h: Add missing declarations for edit_move_up() and
edit_move_down().
2002-09-21 00:16:04 +00:00
Pavel Roskin
31e34e93b8 * editcmd.c: Recheck and fix all calls to create_dlg().
* editwidget.c: Likewise.
2002-09-03 19:37:40 +00:00
Pavel Roskin
d02a8d6473 * editwidget.c (edit): Avoid passing an uninitialized color
array to create_dlg() - pass NULL instead.
2002-08-31 04:33:40 +00:00
Pavel Roskin
6071fea76d * editwidget.c: Use new dialog flags.
* editcmd.c: Likewise.
(edit_completion_dialog): Set DLG_COMPACT for the dialog.
2002-08-22 15:38:27 +00:00
Pavel Roskin
231f67342e * editwidget.c (edit): Make edit_bar a local variable. 2002-08-21 22:54:27 +00:00