Commit Graph

57 Commits

Author SHA1 Message Date
Andrew Borodin
fb48d4a295 Small reorganization of MC and Editor menus.
The 'User Menu' entry is moved from 'File' submenu to 'Command' one.
The 'Edit editor menu file' and 'Edit syntax file' entries are moved
from main MC menu ('Command' submenu) to editor main menu ('Options'
submenu) and renamed.

src/cmd.c (check_for_default): moved to util.c and maken global.
(menu_edit_cmd): rewritten to handle MC menu files only and renamed
to edit_mc_menu_cmd.
Editor relevant routines are moved to editor code.

src/cmd.h: cleanup.

src/main.c: main menu reorganization.

src/user.h: moved editor macros to edit/edit.h.

src/util.c, src/util.h: check_for_default function from src/cmd.h.
Rewritten to use exist_file() function.

edit/editcmddef.h: added new commands:
CK_Load_Syntax_File and CK_Load_Menu_File.

edit/edit.h: editor file macros from src/user.h.
New type for file which is currently being edited.
Modified edit_load_cmd function to be more advanced.

edit/edit.c (edit_execute_cmd): handle new commands:
CK_Load_Syntax_File and CK_Load_Menu_File.

edit/editmenu.c: menu reorganization: moved two entries here from main
MC menu. Added requireq handle functions. Small optimization: removed
extra layer in menu entry handlers.

edit/editcmd.c: menu and syntax files edit is implemented.
Modified edit_load_cmd function to be more advanced.
2009-06-12 16:12:10 +04:00
Ilia Maslakov
e9fe86f149 fix hotkey menu entry "Toggle li&ne state" now highlighted "n" 2009-05-13 09:00:49 +00:00
Ilia Maslakov
c1413bb370 add call CK_Toggle_Line_State to edit menu 2009-05-13 07:34:32 +00:00
Slava Zanko
2ebdf91079 Merge branch 'm-utf-8'
* m-utf-8: (223 commits)
  Fix wildcard pattern in file select and file find dialogs
  Project builds with option --disable-charsets
  Deleted build-glib1.sh because glib1 don't work with utf-8
  fix building without --enable-charset
  Total replacement to mc_search stuff in all places
  Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
  src/view.c: Reworked search stuff to usage src/search
  refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
  Search engine: development of hex search complete
  Search engine: remove forgotten debug string and reindent file
  Search engine:
  configure.ac: if present glib-2.14 and higher, libpcre don't linked
  Search engine: now used regexp external engines:
  src/find.c: Fixed core dump if content search pattern no present
  edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
  Find files: checkbox 'Regular expression' for content search now default unchecked
  Find files: changes for usage of new search engine:
  Fix copy of current/opposite path to command line: remove charset info from path
  src/Makefile.am: add some header files to Make-tracking
  Fixed editor menu reloading.
2009-05-07 13:01:01 +03:00
Andrew Borodin
3c477cbdfd Fixed editor menu reloading.
edit/edit.h: moved N_menus 5 macro to editmenu.c. Renamed edit_init_menu()
to edit_create_menu().

edit/editmenu.c: added static variable EditMenuBar to store editor menus.
Reimplemented menu creation. Added new edit_create_menu() function.

edit/editwidget.c (edit_file): used edit_create_menu() instead of
edit_init_menu().
2009-05-01 21:10:52 +04:00
Mikhail S. Pobolovets
6a209bdb59 Simple doxygen description for files in edit directory.
Mostly \file and \brief tag added.
Some fixes for warnings with existing comments.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Patrick Winnertz
1c287d798d First bunch of mhl_mem_free removal patches
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:36:58 +01:00
Enrico Weigelt, metux IT service
15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Slava Zanko
4f00496233 patches by Rostislav Beneš: mc-12-menu
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.

now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 11:47:41 +02:00
Pavel Tsekov
2f3df3af4e * edit/bookmark.c: Update copyright notice.
* edit/edit.c: Likewise.
* edit/editcmd.c: Likewise.
* edit/editdraw.c: Likewise.
* edit/editkeys.c: Likewise.
* edit/editlock.c: Likewise.
* edit/editmenu.c: Likewise.
* edit/editoptions.c: Likewise.
* edit/editwidget.c: Likewise.
* edit/syntax.c: Likewise.
* src/background.c: Likewise.
* src/boxes.c: Likewise.
* src/complete.c: Likewise.
* src/execute.c: Likewise.
* src/ext.c: Likewise.
* src/file.c: Likewise.
* src/filegui.c: Likewise.
* src/fileopctx.c: Likewise.
* src/find.c: Likewise.
* src/hotlist.c: Likewise.
* src/key.c: Likewise.
* src/keyxdef.c: Likewise.
* src/layout.c: Likewise.
* src/learn.c: Likewise.
* src/listmode.c: Likewise.
* src/main.c: Likewise.
* src/panelize.c: Likewise.
* src/slint.c: Likewise.
* src/textconf.c: Likewise.
* src/tree.c: Likewise.
* src/treestore.c: Likewise.
* src/tty.c: Likewise.
* src/util.c: Likewise.
* src/utilunix.c: Likewise.
* src/view.c: Likewise.
* src/widget.c: Likewise.
* src/wtools.c: Likewise.
* src/x11conn.c: Likewise.
* vfs/cpio.c: Likewise.
* vfs/extfs.c: Likewise.
* vfs/fish.c: Likewise.
* vfs/ftpfs.c: Likewise.
* vfs/gc.c: Likewise.
* vfs/mcfs.c: Likewise.
* vfs/mcserv.c: Likewise.
* vfs/smbfs.c: Likewise.
* vfs/tar.c: Likewise.
2007-09-25 15:33:35 +00:00
Pavel Tsekov
23361694b6 * src/background.c: Use the correct form of FSF's name in the copyright
notice.
* src/boxes.c: Ditto.
* src/complete.c: Ditto.
* src/execute.c: Ditto.
* src/ext.c: Ditto.
* src/file.c: Ditto.
* src/filegui.c: Ditto.
* src/fileopctx.c: Ditto.
* src/fileopctx.h: Ditto.
* src/find.c: Ditto.
* src/hotlist.c: Ditto.
* src/key.c: Ditto.
* src/keyxdef.c: Ditto.
* src/layout.c: Ditto.
* src/learn.c: Ditto.
* src/listmode.c: Ditto.
* src/main.c: Ditto.
* src/panelize.c: Ditto.
* src/slint.c: Ditto.
* src/textconf.c: Ditto.
* src/tree.c: Ditto.
* src/treestore.c: Ditto.
* src/tty.c: Ditto.
* src/util.c: Ditto.
* src/utilunix.c: Ditto.
* src/view.c: Ditto.
* src/widget.c: Ditto.
* src/wtools.c: Ditto.
* src/x11conn.c: Ditto.
* vfs/cpio.c: Ditto.
* vfs/extfs.c: Ditto.
* vfs/fish.c: Ditto.
* vfs/ftpfs.c: Ditto.
* vfs/gc.c: Ditto.
* vfs/mcfs.c: Ditto.
* vfs/mcserv.c: Ditto.
* vfs/smbfs.c: Ditto.
* vfs/tar.c: Ditto.
* vfs/undelfs.c: Ditto.
* vfs/utilvfs.c: Ditto.
* vfs/vfs.c: Ditto.
* edit/bookmark.c: Ditto.
* edit/edit.c: Ditto.
* edit/edit.h: Ditto.
* edit/editcmd.c: Ditto.
* edit/editdraw.c: Ditto.
* edit/editkeys.c: Ditto.
* edit/editlock.c: Ditto.
* edit/editmenu.c: Ditto.
* edit/editoptions.c: Ditto.
* edit/editwidget.c: Ditto.
* edit/syntax.c: Ditto.
2007-09-24 09:28:32 +00:00
Pavel Roskin
0e653491c1 * choosesyntax.c: Make undeclared functions static.
* editmenu.c: Likewise.
* usermap.c: Likewise.
2005-11-11 02:26:04 +00:00
Roland Illig
34d39bfd0b * editmenu.c: Added a "Save setup..." entry. There had not been
the possibility of saving editor options except calling the
	"Save setup..." function from within the file manager.
2005-09-07 08:49:30 +00:00
Leonard den Ottolander
f21564b9e6 * edit/choosesyntax.c: Create file. Menu option to override syntax
highlighting.
* edit/Makefile.am: Add choosesyntax.c.
* edit/edit.c (edit_init): Set option_auto_syntax to 1 on every invokation
of the editor.
* edit/edit.h: Pass char*** to edit_load_syntax(). Add parameters for
syntax dialog and override.
* edit/editmenu.c (menu_options): Add menu option to override syntax
hightlighting.
* edit/editoptions.c (edit_options_dialog): Pass option_syntax_type to
edit_load_syntax().
* edit/syntax.c (edit_read_syntax_file): Dynamically allocate and fill
syntax list pnames.
* edit/syntax.c (edit_load_syntax): Use char*** for syntax list.
* src/wtools.h: #include "widget.h" and remove redundant declarations
of Dlg_head and WListbox.
2005-07-24 13:37:58 +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
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +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
9260860bbf * dialog.c (dlg_select_widget): Remove first argument, it's
redundant.  Adjust all callers.
(dlg_replace_widget): Likewise.
2005-05-20 20:22:06 +00:00
Pavel Roskin
b5b70bce10 * edit.h: Eliminate global EditMenuBar. Fix all dependencies. 2005-05-20 19:46:47 +00:00
Pavel Roskin
7511729690 * edit.h: Eliminate edit_message_dialog macro - it's used
inconsistently.  Fix all callers to use query_dialog().
2005-05-20 19:27:45 +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
05d2881a71 * *.c: Removed trailing whitespace. 2005-02-07 07:31:19 +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
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
38265d418d * edit.h: Get rid of WIDGET_COMMAND, update all dependencies. 2003-09-07 19:08:07 +00:00
Pavel Roskin
c72a1ea44c Get rid of all references to NATIVE_WIN32. 2003-07-23 03:22:32 +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
Andrew V. Samoilov
ebc8d1690a * editmenu.c (OptMenuEmacs): Define as OptMenu.
(SearReplMenuEmacs): Define as SearReplMenu.
(EditMenuEmacs): Define as EditMenu.
2003-02-21 23:32:06 +00:00
Pavel Roskin
0da0c44f87 * (OptMenu): Add "Learn Keys".
(OptMenuEmacs): Likewise.
2003-01-28 17:56:53 +00:00
Pavel Roskin
2548ea0e7c Use normal capitalization in English text in the editor menu. 2002-12-01 06:33:58 +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
9e1f47ddb7 Remove disabled entries - they give a bad example of
using pseudo-English (a.k.a. Engrish) in the menu.
2002-11-14 22:51:37 +00:00
Pavel Roskin
7969f851bb * edit.h: Decentralize includes. 2002-11-14 19:38:26 +00:00
Pavel Roskin
389ed511de * editmenu.c (edit_user_menu_cmd): Move to ../src/cmd.c. 2002-11-14 06:25:46 +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
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
a84b0fc9cd Fix some of the most ugly abuses of mixed caps in English texts,
especially in button captions.
2002-10-21 22:26:39 +00:00
Pavel Roskin
da7e82d253 Global removal of RCS Id: flags. 2002-09-26 23:13:45 +00:00
Pavel Roskin
91f4a75562 * editmenu.c (edit_drop_menu_cmd): Don't use edit_dlg variable. 2002-09-24 15:04:22 +00:00
Pavel Roskin
37318c2b78 * editmenu.c: Use new create_menu() interface. 2002-08-20 21:31:23 +00:00
Pavel Roskin
3a93326ce7 * editoptions.c: Make some variables static.
* edit.h: Take extern declaratrions from all C files.
2002-08-19 01:23:24 +00:00
Pavel Roskin
eb28e580d9 * editmenu.c (CmdMenuEmacs): Add mail command without shortcut.
Users of emacs keys should be able to send mail too.
2002-01-21 08:26:23 +00:00
Andrew V. Samoilov
d9a88088d1 * editmenu.c (edit_wrap_cmd): Use g_free() on the result
of input_dialog().
2001-11-27 12:38:30 +00:00
Pavel Roskin
afee09a276 * edit.c: Eliminate all code disabled for the text edition.
* editcmddef.h: Likewise.
* editmenu.c: Likewise.
* editwidget.c: Likewise.
* syntax.c: Likewise.
* wordproc.c: Likewise.
2001-09-07 20:10:45 +00:00
Pavel Roskin
b44a4e19c6 Copy all necessary files from gtkedit.
* Makefile.in (EDITLINKS): Merge with EDITSRC, remove all
references.
2001-08-24 18:23:17 +00:00
Paul Sheer
2d93c2e0ff removeing these files. Makefile will create symlinks 1998-09-15 21:20:29 +00:00