* cmd.c (edit_cmd) [HAVE_GNOME]: Use gmc_edit(). Don't use

regex_command().
(ext_cmd) [HAVE_GNOME]: Don't compile for GNOME.
* ext.c (regex_command) [HAVE_GNOME]: Likewise.
* ext.h [HAVE_GNOME]: Don't define MC_USER_EXT and MC_LIB_EXT.
This commit is contained in:
Pavel Roskin 2001-02-26 21:21:18 +00:00
parent a5dde470ec
commit 82d916924d
4 changed files with 15 additions and 4 deletions

View File

@ -1,5 +1,11 @@
2001-02-26 Pavel Roskin <proski@gnu.org>
* cmd.c (edit_cmd) [HAVE_GNOME]: Use gmc_edit(). Don't use
regex_command().
(ext_cmd) [HAVE_GNOME]: Don't compile for GNOME.
* ext.c (regex_command) [HAVE_GNOME]: Likewise.
* ext.h [HAVE_GNOME]: Don't define MC_USER_EXT and MC_LIB_EXT.
* main.c (main): Don't call edit_init_file() - the editor should
care about its files itself.

View File

@ -342,9 +342,13 @@ do_edit (const char *what)
void edit_cmd (WPanel *panel)
{
#ifndef HAVE_GNOME
panel = get_a_panel(panel);
if (!regex_command (selection (panel)->fname, "Edit", NULL, 0))
do_edit (selection (panel)->fname);
#else
gmc_edit (selection (panel)->fname);
#endif
}
void edit_cmd_new (WPanel *panel)
@ -629,6 +633,7 @@ static int check_for_default(char *default_file, char *file)
return 0;
}
#ifndef HAVE_GNOME
void ext_cmd (void)
{
char *buffer;
@ -654,6 +659,7 @@ void ext_cmd (void)
g_free (extdir);
flush_extension_file ();
}
#endif /* !HAVE_GNOME */
/* where = 0 - do edit a file menu for mc */
/* where = 1 - do edit a file menu for cool edit */

View File

@ -351,6 +351,7 @@ exec_extension (const char *filename, const char *data, char **drops, int *move_
* If action == "View" then a parameter is checked in the form of "View:%d",
* if the value for %d exists, then the viewer is started up at that line number.
*/
#ifndef HAVE_GNOME
char *regex_command_title = NULL;
char *regex_command (char *filename, char *action, char **drops, int *move_dir)
{
@ -692,3 +693,4 @@ match_file_output:
easy_patterns = old_patterns;
return to_return;
}
#endif /* !HAVE_GNOME */

View File

@ -13,10 +13,7 @@ void flush_extension_file (void);
# define MC_USER_EXT "mc.ext"
# define MC_LIB_EXT "mc.ext"
#else
# ifdef HAVE_GNOME
# define MC_USER_EXT ".mc/gnome.ext"
# define MC_LIB_EXT "mc-gnome.ext"
# else
# ifndef HAVE_GNOME
# define MC_USER_EXT ".mc/bindings"
# define MC_LIB_EXT "mc.ext"
# endif