1
1

* complete.c [HAVE_GNOME]: Likewise.

* main.c [HAVE_GNOME]: Likewise.
Этот коммит содержится в:
Pavel Roskin 2001-05-14 22:17:06 +00:00
родитель 1bb43b9c1a
Коммит 532c80d929
3 изменённых файлов: 26 добавлений и 9 удалений

Просмотреть файл

@ -2,6 +2,8 @@
* boxes.c [HAVE_GNOME]: Disable unused code. * boxes.c [HAVE_GNOME]: Disable unused code.
* find.c [HAVE_GNOME]: Likewise. * find.c [HAVE_GNOME]: Likewise.
* complete.c [HAVE_GNOME]: Likewise.
* main.c [HAVE_GNOME]: Likewise.
* screen.c (adjust_top_file): Enable only if it's used, i.e. * screen.c (adjust_top_file): Enable only if it's used, i.e.
when PORT_HAS_PAINT_FRAME in undefined. when PORT_HAS_PAINT_FRAME in undefined.

Просмотреть файл

@ -827,9 +827,12 @@ void free_completions (WInput *in)
in->completions = NULL; in->completions = NULL;
} }
#ifndef HAVE_GNOME
static int query_height, query_width; static int query_height, query_width;
static WInput *input; static WInput *input;
static int start, end, min_end; static int min_end;
#endif /* !HAVE_GNOME */
static int start, end;
static int insert_text (WInput *in, char *text, int len) static int insert_text (WInput *in, char *text, int len)
{ {
@ -861,15 +864,14 @@ static int insert_text (WInput *in, char *text, int len)
return len != 0; return len != 0;
} }
#ifndef HAVE_GNOME
static int query_callback (Dlg_head * h, int Par, int Msg) static int query_callback (Dlg_head * h, int Par, int Msg)
{ {
switch (Msg) { switch (Msg) {
case DLG_DRAW: case DLG_DRAW:
#ifndef HAVE_X
attrset (COLOR_NORMAL); attrset (COLOR_NORMAL);
dlg_erase (h); dlg_erase (h);
draw_box (h, 0, 0, query_height, query_width); draw_box (h, 0, 0, query_height, query_width);
#endif
break; break;
case DLG_KEY: case DLG_KEY:
@ -966,6 +968,7 @@ static int querylist_callback (void *data)
{ {
return 1; return 1;
} }
#endif /* !HAVE_GNOME */
#define DO_INSERTION 1 #define DO_INSERTION 1
#define DO_QUERY 2 #define DO_QUERY 2

Просмотреть файл

@ -381,9 +381,10 @@ int display_linksdir = 0;
char *get_mc_lib_dir (); char *get_mc_lib_dir ();
int panel_event (Gpm_Event *event, WPanel *panel); int panel_event (Gpm_Event *event, WPanel *panel);
int menu_bar_event (Gpm_Event *event, void *); int menu_bar_event (Gpm_Event *event, void *);
static void menu_cmd (void);
#ifndef HAVE_GNOME #ifndef HAVE_GNOME
static void menu_cmd (void);
WPanel * WPanel *
get_current_panel () get_current_panel ()
{ {
@ -1424,6 +1425,7 @@ done_menu (void)
} }
#endif #endif
#ifndef HAVE_GNOME
static void static void
menu_last_selected_cmd (void) menu_last_selected_cmd (void)
{ {
@ -1445,6 +1447,7 @@ menu_cmd (void)
the_menubar->selected = 4; the_menubar->selected = 4;
menu_last_selected_cmd (); menu_last_selected_cmd ();
} }
#endif /* !HAVE_GNOME */
/* Flag toggling functions */ /* Flag toggling functions */
void void
@ -1507,6 +1510,7 @@ toggle_align_extensions (void)
* Just a hack for allowing url-like pathnames to be accepted from the * Just a hack for allowing url-like pathnames to be accepted from the
* command line. * command line.
*/ */
#ifndef PORT_HAS_CREATE_PANELS
static void static void
translated_mc_chdir (char *dir) translated_mc_chdir (char *dir)
{ {
@ -1517,7 +1521,6 @@ translated_mc_chdir (char *dir)
g_free (newdir); g_free (newdir);
} }
#ifndef PORT_HAS_CREATE_PANELS
void void
create_panels (void) create_panels (void)
{ {
@ -1587,6 +1590,7 @@ create_panels (void)
} }
#endif #endif
#ifndef HAVE_GNOME
static void copy_current_pathname (void) static void copy_current_pathname (void)
{ {
if (!command_prompt) if (!command_prompt)
@ -1609,6 +1613,7 @@ static void copy_other_pathname (void)
if (cpanel->cwd [strlen (opanel->cwd) - 1] != PATH_SEP) if (cpanel->cwd [strlen (opanel->cwd) - 1] != PATH_SEP)
stuff (input_w (cmdline), PATH_SEP_STR, 0); stuff (input_w (cmdline), PATH_SEP_STR, 0);
} }
#endif /* !HAVE_GNOME */
static void copy_readlink (WPanel *panel) static void copy_readlink (WPanel *panel)
{ {
@ -1657,6 +1662,7 @@ void copy_prog_name (void)
g_free (tmp); g_free (tmp);
} }
#ifndef HAVE_GNOME
static void copy_tagged (WPanel *panel) static void copy_tagged (WPanel *panel)
{ {
int i; int i;
@ -1690,6 +1696,7 @@ static void copy_other_tagged (void)
return; return;
copy_tagged (opanel); copy_tagged (opanel);
} }
#endif /* !HAVE_GNOME */
static void do_suspend_cmd (void) static void do_suspend_cmd (void)
{ {
@ -1729,6 +1736,7 @@ suspend_cmd (void)
do_refresh (); do_refresh ();
} }
#ifndef HAVE_GNOME
static void static void
init_labels (Widget *paneletc) init_labels (Widget *paneletc)
{ {
@ -1737,6 +1745,7 @@ init_labels (Widget *paneletc)
define_label (midnight_dlg, paneletc, 9, _("PullDn"), menu_cmd); define_label (midnight_dlg, paneletc, 9, _("PullDn"), menu_cmd);
define_label (midnight_dlg, paneletc, 10, _("Quit"), (voidfn) quit_cmd); define_label (midnight_dlg, paneletc, 10, _("Quit"), (voidfn) quit_cmd);
} }
#endif /* HAVE_GNOME */
static const key_map ctl_x_map [] = { static const key_map ctl_x_map [] = {
{ XCTRL('c'), (callfn) quit_cmd }, { XCTRL('c'), (callfn) quit_cmd },
@ -2159,15 +2168,14 @@ void load_hint ()
} }
#endif #endif
#ifndef HAVE_GNOME
static void static void
setup_panels_and_run_mc () setup_panels_and_run_mc ()
{ {
int first, second; int first, second;
xtoolkit_panel_setup (); xtoolkit_panel_setup ();
#ifndef HAVE_X
add_widget (midnight_dlg, the_hint); add_widget (midnight_dlg, the_hint);
#endif /* HAVE_X */
load_hint (); load_hint ();
add_widget (midnight_dlg, cmdline); add_widget (midnight_dlg, cmdline);
add_widget (midnight_dlg, the_prompt); add_widget (midnight_dlg, the_prompt);
@ -2190,6 +2198,7 @@ setup_panels_and_run_mc ()
/* Run the Midnight Commander if no file was specified in the command line */ /* Run the Midnight Commander if no file was specified in the command line */
run_dlg (midnight_dlg); run_dlg (midnight_dlg);
} }
#endif /* !HAVE_GNOME */
/* result must be free'd (I think this should go in util.c) */ /* result must be free'd (I think this should go in util.c) */
static char * static char *
@ -2819,9 +2828,12 @@ corba_create_window (char *startup_dir)
static void static void
handle_args (int argc, char *argv []) handle_args (int argc, char *argv [])
{ {
char *tmp, *option_arg, *base; char *tmp;
int c;
poptContext ctx; poptContext ctx;
#ifndef HAVE_GNOME
char *option_arg, *base;
int c;
#endif /* !HAVE_GNOME */
#ifdef HAVE_GNOME #ifdef HAVE_GNOME
/* special case, handle --desktop-linksdir without initing X */ /* special case, handle --desktop-linksdir without initing X */