* cmd.c: Clean up unused GNOME code and some ifdef's.
* dlg.c: Likewise. * dlg.h: Likewise. * ext.c: Likewise. * setup.c: Likewise.
Этот коммит содержится в:
родитель
33b7085e68
Коммит
0a4aa53f65
@ -1,5 +1,11 @@
|
|||||||
2001-09-15 Pavel Roskin <proski@gnu.org>
|
2001-09-15 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* cmd.c: Clean up unused GNOME code and some ifdef's.
|
||||||
|
* dlg.c: Likewise.
|
||||||
|
* dlg.h: Likewise.
|
||||||
|
* ext.c: Likewise.
|
||||||
|
* setup.c: Likewise.
|
||||||
|
|
||||||
* cmd.c (guess_message_value): Remove the argument. Adjust all
|
* cmd.c (guess_message_value): Remove the argument. Adjust all
|
||||||
callers.
|
callers.
|
||||||
|
|
||||||
|
34
src/cmd.c
34
src/cmd.c
@ -151,9 +151,6 @@ int view_file_at_line (char *filename, int plain_view, int internal, int start_l
|
|||||||
return move_dir;
|
return move_dir;
|
||||||
}
|
}
|
||||||
if (internal){
|
if (internal){
|
||||||
#ifdef HAVE_X
|
|
||||||
gmc_view (filename, start_line);
|
|
||||||
#else
|
|
||||||
char view_entry [BUF_TINY];
|
char view_entry [BUF_TINY];
|
||||||
|
|
||||||
if (start_line != 0)
|
if (start_line != 0)
|
||||||
@ -165,7 +162,6 @@ int view_file_at_line (char *filename, int plain_view, int internal, int start_l
|
|||||||
view (0, filename, &move_dir, start_line);
|
view (0, filename, &move_dir, start_line);
|
||||||
repaint_screen ();
|
repaint_screen ();
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
} else {
|
} else {
|
||||||
char *localcopy;
|
char *localcopy;
|
||||||
|
|
||||||
@ -325,13 +321,9 @@ do_edit (const char *what)
|
|||||||
|
|
||||||
void edit_cmd (WPanel *panel)
|
void edit_cmd (WPanel *panel)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_X
|
|
||||||
panel = get_a_panel(panel);
|
panel = get_a_panel(panel);
|
||||||
if (!regex_command (selection (panel)->fname, "Edit", NULL, 0))
|
if (!regex_command (selection (panel)->fname, "Edit", NULL, 0))
|
||||||
do_edit (selection (panel)->fname);
|
do_edit (selection (panel)->fname);
|
||||||
#else
|
|
||||||
gmc_edit (selection (panel)->fname);
|
|
||||||
#endif /* !HAVE_X */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void edit_cmd_new (WPanel *panel)
|
void edit_cmd_new (WPanel *panel)
|
||||||
@ -422,12 +414,8 @@ set_panel_filter_to (WPanel *p, char *allocated_filter_string)
|
|||||||
else
|
else
|
||||||
g_free (allocated_filter_string);
|
g_free (allocated_filter_string);
|
||||||
reread_cmd ();
|
reread_cmd ();
|
||||||
#ifdef HAVE_X
|
|
||||||
x_filter_changed (p);
|
|
||||||
#endif /* HAVE_X */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
/* Set a given panel filter expression */
|
/* Set a given panel filter expression */
|
||||||
void set_panel_filter (WPanel *p)
|
void set_panel_filter (WPanel *p)
|
||||||
{
|
{
|
||||||
@ -455,7 +443,6 @@ void filter_cmd (void)
|
|||||||
p = MENU_PANEL;
|
p = MENU_PANEL;
|
||||||
set_panel_filter (p);
|
set_panel_filter (p);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_X */
|
|
||||||
|
|
||||||
void reread_cmd (void)
|
void reread_cmd (void)
|
||||||
{
|
{
|
||||||
@ -493,12 +480,10 @@ void reverse_selection_cmd_panel (WPanel *panel)
|
|||||||
paint_panel (panel);
|
paint_panel (panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
void reverse_selection_cmd (void)
|
void reverse_selection_cmd (void)
|
||||||
{
|
{
|
||||||
reverse_selection_cmd_panel (cpanel);
|
reverse_selection_cmd_panel (cpanel);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_X */
|
|
||||||
|
|
||||||
void select_cmd_panel (WPanel *panel)
|
void select_cmd_panel (WPanel *panel)
|
||||||
{
|
{
|
||||||
@ -547,12 +532,10 @@ void select_cmd_panel (WPanel *panel)
|
|||||||
g_free (reg_exp);
|
g_free (reg_exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
void select_cmd (void)
|
void select_cmd (void)
|
||||||
{
|
{
|
||||||
select_cmd_panel (cpanel);
|
select_cmd_panel (cpanel);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
void unselect_cmd_panel (WPanel *panel)
|
void unselect_cmd_panel (WPanel *panel)
|
||||||
{
|
{
|
||||||
@ -600,7 +583,6 @@ void unselect_cmd_panel (WPanel *panel)
|
|||||||
g_free (reg_exp);
|
g_free (reg_exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
void unselect_cmd (void)
|
void unselect_cmd (void)
|
||||||
{
|
{
|
||||||
unselect_cmd_panel (cpanel);
|
unselect_cmd_panel (cpanel);
|
||||||
@ -939,7 +921,7 @@ view_other_cmd (void)
|
|||||||
*/
|
*/
|
||||||
reset_shell_mode ();
|
reset_shell_mode ();
|
||||||
noecho ();
|
noecho ();
|
||||||
#endif /* HAVE_SLANG */
|
#endif /* !HAVE_SLANG */
|
||||||
keypad(stdscr, FALSE);
|
keypad(stdscr, FALSE);
|
||||||
endwin ();
|
endwin ();
|
||||||
do_exit_ca_mode ();
|
do_exit_ca_mode ();
|
||||||
@ -994,7 +976,6 @@ view_other_cmd (void)
|
|||||||
repaint_screen ();
|
repaint_screen ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
#ifndef OS2_NT
|
#ifndef OS2_NT
|
||||||
static void
|
static void
|
||||||
@ -1077,10 +1058,7 @@ void symlink_cmd (void)
|
|||||||
|
|
||||||
void edit_symlink_cmd (void)
|
void edit_symlink_cmd (void)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_X
|
|
||||||
/* GNOME already checks this, and selection(cpanel) does bbad things */
|
|
||||||
if (S_ISLNK (selection (cpanel)->buf.st_mode)) {
|
if (S_ISLNK (selection (cpanel)->buf.st_mode)) {
|
||||||
#endif /* !HAVE_X */
|
|
||||||
char buffer [MC_MAXPATHLEN];
|
char buffer [MC_MAXPATHLEN];
|
||||||
char *p = NULL;
|
char *p = NULL;
|
||||||
int i;
|
int i;
|
||||||
@ -1121,12 +1099,10 @@ void edit_symlink_cmd (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_free (q);
|
g_free (q);
|
||||||
#ifndef HAVE_X
|
|
||||||
} else {
|
} else {
|
||||||
message (1, MSG_ERROR, _("`%s' is not a symbolic link"),
|
message (1, MSG_ERROR, _("`%s' is not a symbolic link"),
|
||||||
selection (cpanel)->fname);
|
selection (cpanel)->fname);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void other_symlink_cmd (void)
|
void other_symlink_cmd (void)
|
||||||
@ -1207,8 +1183,6 @@ char *guess_message_value (void)
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
gchar *retval;
|
|
||||||
|
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
char *locale = NULL;
|
char *locale = NULL;
|
||||||
|
|
||||||
@ -1279,7 +1253,6 @@ char *get_random_hint (void)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
#ifdef USE_NETCODE
|
#ifdef USE_NETCODE
|
||||||
|
|
||||||
static char *machine_str = N_(" Enter machine name (F1 for details): ");
|
static char *machine_str = N_(" Enter machine name (F1 for details): ");
|
||||||
@ -1378,7 +1351,6 @@ void quick_cd_cmd (void)
|
|||||||
if (p)
|
if (p)
|
||||||
g_free (p);
|
g_free (p);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dirsizes_cmd (void)
|
dirsizes_cmd (void)
|
||||||
@ -1403,7 +1375,6 @@ dirsizes_cmd (void)
|
|||||||
paint_panel (panel);
|
paint_panel (panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
void
|
void
|
||||||
save_setup_cmd (void)
|
save_setup_cmd (void)
|
||||||
{
|
{
|
||||||
@ -1514,9 +1485,7 @@ set_basic_panel_listing_to (int panel_index, int listing_mode)
|
|||||||
{
|
{
|
||||||
WPanel *p = (WPanel *) get_panel_widget (panel_index);
|
WPanel *p = (WPanel *) get_panel_widget (panel_index);
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
switch_to_listing (panel_index);
|
switch_to_listing (panel_index);
|
||||||
#endif /* !HAVE_X */
|
|
||||||
p->list_type = listing_mode;
|
p->list_type = listing_mode;
|
||||||
if (set_panel_formats (p))
|
if (set_panel_formats (p))
|
||||||
return 0;
|
return 0;
|
||||||
@ -1549,5 +1518,4 @@ toggle_listing_cmd (void)
|
|||||||
return;
|
return;
|
||||||
set_basic_panel_listing_to (current, list_full);
|
set_basic_panel_listing_to (current, list_full);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
|
74
src/dlg.c
74
src/dlg.c
@ -47,20 +47,6 @@ Dlg_head *current_dlg = 0;
|
|||||||
/* A hook list for idle events */
|
/* A hook list for idle events */
|
||||||
Hook *idle_hook = 0;
|
Hook *idle_hook = 0;
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
# define x_set_idle(d,x)
|
|
||||||
# define x_dialog_stop(d)
|
|
||||||
#endif /* HAVE_X */
|
|
||||||
|
|
||||||
#ifdef HAVE_X
|
|
||||||
void widget_erase (Widget *w)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void dlg_erase (Dlg_head *h)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
static void slow_box (Dlg_head *h, int y, int x, int ys, int xs)
|
static void slow_box (Dlg_head *h, int y, int x, int ys, int xs)
|
||||||
{
|
{
|
||||||
move (h->y+y, h->x+x);
|
move (h->y+y, h->x+x);
|
||||||
@ -97,7 +83,7 @@ void draw_box (Dlg_head *h, int y, int x, int ys, int xs)
|
|||||||
vline (ACS_VLINE, ys - 2);
|
vline (ACS_VLINE, ys - 2);
|
||||||
#else
|
#else
|
||||||
SLsmg_draw_box (h->y+y, h->x+x, ys, xs);
|
SLsmg_draw_box (h->y+y, h->x+x, ys, xs);
|
||||||
#endif
|
#endif /* HAVE_SLANG */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* draw box in window */
|
/* draw box in window */
|
||||||
@ -107,7 +93,7 @@ void draw_double_box (Dlg_head *h, int y, int x, int ys, int xs)
|
|||||||
draw_box (h, y, x, ys, xs);
|
draw_box (h, y, x, ys, xs);
|
||||||
#else
|
#else
|
||||||
SLsmg_draw_double_box (h->y+y, h->x+x, ys, xs);
|
SLsmg_draw_double_box (h->y+y, h->x+x, ys, xs);
|
||||||
#endif
|
#endif /* HAVE_SLANG */
|
||||||
}
|
}
|
||||||
|
|
||||||
void widget_erase (Widget *w)
|
void widget_erase (Widget *w)
|
||||||
@ -132,7 +118,6 @@ void dlg_erase (Dlg_head *h)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* HAVE_X */
|
|
||||||
|
|
||||||
void init_widget (Widget *w, int y, int x, int lines, int cols,
|
void init_widget (Widget *w, int y, int x, int lines, int cols,
|
||||||
int (*callback)(Dlg_head *, void *, int, int),
|
int (*callback)(Dlg_head *, void *, int, int),
|
||||||
@ -208,9 +193,6 @@ int default_dlg_callback (Dlg_head *h, int id, int msg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_X
|
|
||||||
int midnight_callback (struct Dlg_head *h, int id, int msg);
|
|
||||||
#endif
|
|
||||||
Dlg_head *create_dlg (int y1, int x1, int lines, int cols,
|
Dlg_head *create_dlg (int y1, int x1, int lines, int cols,
|
||||||
int *color_set,
|
int *color_set,
|
||||||
int (*callback) (struct Dlg_head *, int, int),
|
int (*callback) (struct Dlg_head *, int, int),
|
||||||
@ -219,12 +201,10 @@ Dlg_head *create_dlg (int y1, int x1, int lines, int cols,
|
|||||||
{
|
{
|
||||||
Dlg_head *new_d;
|
Dlg_head *new_d;
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
if (flags & DLG_CENTER){
|
if (flags & DLG_CENTER){
|
||||||
y1 = (LINES-lines)/2;
|
y1 = (LINES-lines)/2;
|
||||||
x1 = (COLS-cols)/2;
|
x1 = (COLS-cols)/2;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((flags & DLG_TRYUP) && (y1 > 3))
|
if ((flags & DLG_TRYUP) && (y1 > 3))
|
||||||
y1 -= 2;
|
y1 -= 2;
|
||||||
@ -239,19 +219,12 @@ Dlg_head *create_dlg (int y1, int x1, int lines, int cols,
|
|||||||
new_d->cols = cols;
|
new_d->cols = cols;
|
||||||
new_d->lines = lines;
|
new_d->lines = lines;
|
||||||
new_d->name = name;
|
new_d->name = name;
|
||||||
#ifdef HAVE_X
|
|
||||||
if (callback != midnight_callback)
|
|
||||||
new_d->wdata = xtoolkit_create_dialog (new_d, flags);
|
|
||||||
else
|
|
||||||
new_d->wdata = xtoolkit_get_main_dialog (new_d);
|
|
||||||
#endif
|
|
||||||
return (new_d);
|
return (new_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_idle_proc (Dlg_head *d, int state)
|
void set_idle_proc (Dlg_head *d, int state)
|
||||||
{
|
{
|
||||||
d->send_idle_msg = state;
|
d->send_idle_msg = state;
|
||||||
x_set_idle (d, state);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add component to dialog buffer */
|
/* add component to dialog buffer */
|
||||||
@ -314,9 +287,6 @@ int add_widget (Dlg_head *where, void *what)
|
|||||||
if (where->running){
|
if (where->running){
|
||||||
send_message (where, widget, WIDGET_INIT, 0);
|
send_message (where, widget, WIDGET_INIT, 0);
|
||||||
send_message (where, widget, WIDGET_DRAW, 0);
|
send_message (where, widget, WIDGET_DRAW, 0);
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
x_add_widget (where, where->current);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return (where->count - 1);
|
return (where->count - 1);
|
||||||
}
|
}
|
||||||
@ -371,9 +341,6 @@ int send_message (Dlg_head *h, Widget *w, int msg, int par)
|
|||||||
void dlg_broadcast_msg_to (Dlg_head *h, int message, int reverse, int flags)
|
void dlg_broadcast_msg_to (Dlg_head *h, int message, int reverse, int flags)
|
||||||
{
|
{
|
||||||
Widget_Item *p, *first, *wi;
|
Widget_Item *p, *first, *wi;
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
int was_panel;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!h->current)
|
if (!h->current)
|
||||||
return;
|
return;
|
||||||
@ -381,35 +348,16 @@ void dlg_broadcast_msg_to (Dlg_head *h, int message, int reverse, int flags)
|
|||||||
if (reverse)
|
if (reverse)
|
||||||
first = p = h->current->prev;
|
first = p = h->current->prev;
|
||||||
else
|
else
|
||||||
/* FIXME: On XView the layout for the widget->next widget is
|
|
||||||
invoked, and we should change the buttons order on query_dialog
|
|
||||||
in order to use the HAVE_X part of the statement */
|
|
||||||
#ifdef HAVE_X
|
|
||||||
first = p = h->current;
|
|
||||||
#else
|
|
||||||
first = p = h->current->next;
|
first = p = h->current->next;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
was_panel = FALSE;
|
|
||||||
#endif
|
|
||||||
do {
|
do {
|
||||||
wi = p;
|
wi = p;
|
||||||
if (reverse)
|
if (reverse)
|
||||||
p = p->prev;
|
p = p->prev;
|
||||||
else
|
else
|
||||||
p = p->next;
|
p = p->next;
|
||||||
/* if (p->widget->options & flags) */
|
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
if (is_a_panel (wi->widget))
|
|
||||||
was_panel |= TRUE;
|
|
||||||
#endif
|
|
||||||
send_message (h, wi->widget, message, 0);
|
send_message (h, wi->widget, message, 0);
|
||||||
} while (first != p);
|
} while (first != p);
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
if (was_panel && message == WIDGET_INIT)
|
|
||||||
h->current = h->current->prev;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* broadcast a message to all the widgets in a dialog */
|
/* broadcast a message to all the widgets in a dialog */
|
||||||
@ -611,7 +559,6 @@ void dlg_refresh (void *parameter)
|
|||||||
void dlg_stop (Dlg_head *h)
|
void dlg_stop (Dlg_head *h)
|
||||||
{
|
{
|
||||||
h->running = 0;
|
h->running = 0;
|
||||||
x_dialog_stop (h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void dialog_handle_key (Dlg_head *h, int d_key)
|
static INLINE void dialog_handle_key (Dlg_head *h, int d_key)
|
||||||
@ -632,7 +579,6 @@ static INLINE void dialog_handle_key (Dlg_head *h, int d_key)
|
|||||||
do_refresh ();
|
do_refresh ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
case XCTRL('z'):
|
case XCTRL('z'):
|
||||||
suspend_cmd ();
|
suspend_cmd ();
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
@ -647,14 +593,12 @@ static INLINE void dialog_handle_key (Dlg_head *h, int d_key)
|
|||||||
#endif /* HAVE_SLANG */
|
#endif /* HAVE_SLANG */
|
||||||
mc_refresh ();
|
mc_refresh ();
|
||||||
doupdate ();
|
doupdate ();
|
||||||
#endif /* !HAVE_X */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
case KEY_ENTER:
|
case KEY_ENTER:
|
||||||
h->ret_value = B_ENTER;
|
h->ret_value = B_ENTER;
|
||||||
h->running = 0;
|
h->running = 0;
|
||||||
x_dialog_stop (h);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ESC_CHAR:
|
case ESC_CHAR:
|
||||||
@ -818,15 +762,11 @@ void init_dlg (Dlg_head *h)
|
|||||||
(*h->callback) (h, 0, DLG_INIT);
|
(*h->callback) (h, 0, DLG_INIT);
|
||||||
dlg_broadcast_msg (h, WIDGET_INIT, 0);
|
dlg_broadcast_msg (h, WIDGET_INIT, 0);
|
||||||
|
|
||||||
#ifdef HAVE_X
|
|
||||||
refresh_mode = REFRESH_COVERS_PART;
|
|
||||||
#else
|
|
||||||
if (h->x == 0 && h->y == 0 && h->cols == COLS && h->lines == LINES)
|
if (h->x == 0 && h->y == 0 && h->cols == COLS && h->lines == LINES)
|
||||||
refresh_mode = REFRESH_COVERS_ALL;
|
refresh_mode = REFRESH_COVERS_ALL;
|
||||||
else
|
else
|
||||||
refresh_mode = REFRESH_COVERS_PART;
|
refresh_mode = REFRESH_COVERS_PART;
|
||||||
|
|
||||||
#endif
|
|
||||||
push_refresh (dlg_refresh, h, refresh_mode);
|
push_refresh (dlg_refresh, h, refresh_mode);
|
||||||
h->refresh_pushed = 1;
|
h->refresh_pushed = 1;
|
||||||
|
|
||||||
@ -887,7 +827,6 @@ void dlg_process_event (Dlg_head *h, int key, Gpm_Event *event)
|
|||||||
dlg_key_event (h, key);
|
dlg_key_event (h, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
static inline void
|
static inline void
|
||||||
frontend_run_dlg (Dlg_head *h)
|
frontend_run_dlg (Dlg_head *h)
|
||||||
{
|
{
|
||||||
@ -920,7 +859,6 @@ frontend_run_dlg (Dlg_head *h)
|
|||||||
dlg_process_event (h, d_key, &event);
|
dlg_process_event (h, d_key, &event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* HAVE_X */
|
|
||||||
|
|
||||||
/* Standard run dialog routine
|
/* Standard run dialog routine
|
||||||
* We have to keep this routine small so that we can duplicate it's
|
* We have to keep this routine small so that we can duplicate it's
|
||||||
@ -930,11 +868,7 @@ frontend_run_dlg (Dlg_head *h)
|
|||||||
void run_dlg (Dlg_head *h)
|
void run_dlg (Dlg_head *h)
|
||||||
{
|
{
|
||||||
init_dlg (h);
|
init_dlg (h);
|
||||||
#ifdef HAVE_X
|
|
||||||
gtkrundlg_event (h);
|
|
||||||
#else
|
|
||||||
frontend_run_dlg (h);
|
frontend_run_dlg (h);
|
||||||
#endif /* !HAVE_X */
|
|
||||||
dlg_run_done (h);
|
dlg_run_done (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -965,10 +899,8 @@ destroy_dlg (Dlg_head *h)
|
|||||||
x_destroy_dlg (h);
|
x_destroy_dlg (h);
|
||||||
g_free (h);
|
g_free (h);
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
if (refresh_list)
|
if (refresh_list)
|
||||||
do_refresh ();
|
do_refresh ();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int std_callback (Dlg_head *h, int Msg, int Par)
|
int std_callback (Dlg_head *h, int Msg, int Par)
|
||||||
@ -1062,11 +994,9 @@ int dlg_select_nth_widget (Dlg_head *h, int n)
|
|||||||
return dlg_select_widget (h, w->widget);
|
return dlg_select_widget (h, w->widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
void
|
void
|
||||||
x_set_dialog_title (Dlg_head *h, const char *title)
|
x_set_dialog_title (Dlg_head *h, const char *title)
|
||||||
{
|
{
|
||||||
h->title = g_strdup (title);
|
h->title = g_strdup (title);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
|
32
src/dlg.h
32
src/dlg.h
@ -2,13 +2,11 @@
|
|||||||
#define MC_DLG_H
|
#define MC_DLG_H
|
||||||
#include "mouse.h"
|
#include "mouse.h"
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
/* Color constants */
|
/* Color constants */
|
||||||
#define FOCUSC h->color[1]
|
#define FOCUSC h->color[1]
|
||||||
#define NORMALC h->color[0]
|
#define NORMALC h->color[0]
|
||||||
#define HOT_NORMALC h->color[2]
|
#define HOT_NORMALC h->color[2]
|
||||||
#define HOT_FOCUSC h->color[3]
|
#define HOT_FOCUSC h->color[3]
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
/* Possible directions */
|
/* Possible directions */
|
||||||
#define DIR_FORWARD 1
|
#define DIR_FORWARD 1
|
||||||
@ -108,9 +106,6 @@ typedef struct Dlg_head {
|
|||||||
|
|
||||||
widget_data wdata;
|
widget_data wdata;
|
||||||
int grided; /* Does it use the automatic layout? */
|
int grided; /* Does it use the automatic layout? */
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
int idle_fn_tag; /* Tag for the idle routine, -1 if none */
|
|
||||||
#endif
|
|
||||||
} Dlg_head;
|
} Dlg_head;
|
||||||
|
|
||||||
/* Every Widget must have this as it's first element */
|
/* Every Widget must have this as it's first element */
|
||||||
@ -210,16 +205,11 @@ int default_dlg_callback (Dlg_head *h, int id, int msg);
|
|||||||
int std_callback (Dlg_head *h, int Msg, int Par);
|
int std_callback (Dlg_head *h, int Msg, int Par);
|
||||||
int default_proc (Dlg_head *h, int Msg, int Par);
|
int default_proc (Dlg_head *h, int Msg, int Par);
|
||||||
|
|
||||||
#ifdef HAVE_X
|
|
||||||
#define widget_move(w,y,x)
|
|
||||||
#define dlg_move(h,y,x)
|
|
||||||
#else
|
|
||||||
#define real_widget_move(w, _y, _x) move((w)->y + _y, (w)->x + _x)
|
#define real_widget_move(w, _y, _x) move((w)->y + _y, (w)->x + _x)
|
||||||
#define dlg_move(h, _y, _x) move(((Dlg_head *) h)->y + _y, \
|
#define dlg_move(h, _y, _x) move(((Dlg_head *) h)->y + _y, \
|
||||||
((Dlg_head *) h)->x + _x)
|
((Dlg_head *) h)->x + _x)
|
||||||
|
|
||||||
#define widget_move(w,y,x) real_widget_move((Widget*)w,y,x)
|
#define widget_move(w,y,x) real_widget_move((Widget*)w,y,x)
|
||||||
#endif
|
|
||||||
|
|
||||||
extern Dlg_head *current_dlg;
|
extern Dlg_head *current_dlg;
|
||||||
|
|
||||||
@ -260,21 +250,11 @@ void x_set_dialog_title (Dlg_head *h, const char *title);
|
|||||||
int dlg_key_event (Dlg_head *h, int d_key);
|
int dlg_key_event (Dlg_head *h, int d_key);
|
||||||
void update_cursor (Dlg_head *h);
|
void update_cursor (Dlg_head *h);
|
||||||
|
|
||||||
#ifdef HAVE_X
|
/* FIXME: Remove those functions */
|
||||||
extern Dlg_head *midnight_dlg;
|
#define x_focus_widget(x) {}
|
||||||
void x_focus_widget (Widget_Item *p);
|
#define x_unfocus_widget(x) {}
|
||||||
void x_unfocus_widget (Widget_Item *p);
|
#define x_init_dlg(x) {}
|
||||||
void x_init_dlg (Dlg_head *h);
|
#define x_destroy_dlg(x) {}
|
||||||
void x_destroy_dlg (Dlg_head *h);
|
#define x_destroy_dlg_start(x) {}
|
||||||
void x_destroy_dlg_start (Dlg_head *h);
|
|
||||||
void x_set_idle (Dlg_head *h, int enable_idle);
|
|
||||||
void x_dialog_stop (Dlg_head *h);
|
|
||||||
#else
|
|
||||||
# define x_focus_widget(x) {}
|
|
||||||
# define x_unfocus_widget(x) {}
|
|
||||||
# define x_init_dlg(x) {}
|
|
||||||
# define x_destroy_dlg(x) {}
|
|
||||||
# define x_destroy_dlg_start(x) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* MC_DLG_H */
|
#endif /* MC_DLG_H */
|
||||||
|
15
src/ext.c
15
src/ext.c
@ -287,25 +287,16 @@ exec_extension (const char *filename, const char *data, char **drops, int *move_
|
|||||||
q[1] = 0;
|
q[1] = 0;
|
||||||
do_cd (p, cd_parse_command);
|
do_cd (p, cd_parse_command);
|
||||||
} else {
|
} else {
|
||||||
#ifdef HAVE_X
|
|
||||||
if (needs_term)
|
|
||||||
gnome_open_terminal_with_cmd (file_name);
|
|
||||||
else
|
|
||||||
shell_execute (file_name, EXECUTE_INTERNAL | EXECUTE_TEMPFILE);
|
shell_execute (file_name, EXECUTE_INTERNAL | EXECUTE_TEMPFILE);
|
||||||
#else
|
if (console_flag) {
|
||||||
shell_execute (file_name, EXECUTE_INTERNAL | EXECUTE_TEMPFILE);
|
|
||||||
if (console_flag)
|
|
||||||
{
|
|
||||||
handle_console (CONSOLE_SAVE);
|
handle_console (CONSOLE_SAVE);
|
||||||
if (output_lines && keybar_visible)
|
if (output_lines && keybar_visible) {
|
||||||
{
|
|
||||||
show_console_contents (output_start_y,
|
show_console_contents (output_start_y,
|
||||||
LINES-keybar_visible-output_lines-1,
|
LINES-keybar_visible-output_lines-1,
|
||||||
LINES-keybar_visible-1);
|
LINES-keybar_visible-1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
}
|
}
|
||||||
if (file_name) {
|
if (file_name) {
|
||||||
g_free (file_name);
|
g_free (file_name);
|
||||||
@ -342,7 +333,6 @@ 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 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.
|
* 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_title = NULL;
|
||||||
char *regex_command (char *filename, char *action, char **drops, int *move_dir)
|
char *regex_command (char *filename, char *action, char **drops, int *move_dir)
|
||||||
{
|
{
|
||||||
@ -684,4 +674,3 @@ match_file_output:
|
|||||||
easy_patterns = old_patterns;
|
easy_patterns = old_patterns;
|
||||||
return to_return;
|
return to_return;
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_GNOME */
|
|
||||||
|
110
src/setup.c
110
src/setup.c
@ -58,12 +58,6 @@
|
|||||||
# include "../vfs/ftpfs.h"
|
# include "../vfs/ftpfs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
extern int tree_panel_visible;
|
|
||||||
extern int we_can_afford_the_speed;
|
|
||||||
int use_magic = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* "$Id$" */
|
/* "$Id$" */
|
||||||
|
|
||||||
#ifdef USE_VFS
|
#ifdef USE_VFS
|
||||||
@ -130,7 +124,6 @@ static const struct {
|
|||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef HAVE_GNOME
|
|
||||||
static const struct {
|
static const struct {
|
||||||
char *opt_name;
|
char *opt_name;
|
||||||
int *opt_addr;
|
int *opt_addr;
|
||||||
@ -148,7 +141,6 @@ static const struct {
|
|||||||
{ "filetype_mode", &filetype_mode },
|
{ "filetype_mode", &filetype_mode },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#undef SAVE_CHANGES_OUTSIDE_OPTIONS_MENU
|
#undef SAVE_CHANGES_OUTSIDE_OPTIONS_MENU
|
||||||
@ -162,11 +154,7 @@ static const struct {
|
|||||||
int *opt_addr;
|
int *opt_addr;
|
||||||
} options [] = {
|
} options [] = {
|
||||||
{ "show_backups", &show_backups },
|
{ "show_backups", &show_backups },
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
{ "gnome_show_dot_files", &show_dot_files },
|
|
||||||
#else
|
|
||||||
{ "show_dot_files", &show_dot_files },
|
{ "show_dot_files", &show_dot_files },
|
||||||
#endif
|
|
||||||
{ "verbose", &verbose },
|
{ "verbose", &verbose },
|
||||||
{ "mark_moves_down", &mark_moves_down },
|
{ "mark_moves_down", &mark_moves_down },
|
||||||
{ "pause_after_run", &pause_after_run },
|
{ "pause_after_run", &pause_after_run },
|
||||||
@ -185,15 +173,13 @@ static const struct {
|
|||||||
{ "confirm_execute", &confirm_execute },
|
{ "confirm_execute", &confirm_execute },
|
||||||
{ "confirm_exit", &confirm_exit },
|
{ "confirm_exit", &confirm_exit },
|
||||||
{ "safe_delete", &know_not_what_am_i_doing },
|
{ "safe_delete", &know_not_what_am_i_doing },
|
||||||
#ifndef HAVE_X
|
|
||||||
{ "mouse_repeat_rate", &mou_auto_repeat },
|
{ "mouse_repeat_rate", &mou_auto_repeat },
|
||||||
{ "double_click_speed", &double_click_speed },
|
{ "double_click_speed", &double_click_speed },
|
||||||
#ifndef HAVE_CHARSET
|
#ifndef HAVE_CHARSET
|
||||||
{ "eight_bit_clean", &eight_bit_clean },
|
{ "eight_bit_clean", &eight_bit_clean },
|
||||||
{ "full_eight_bits", &full_eight_bits },
|
{ "full_eight_bits", &full_eight_bits },
|
||||||
#endif
|
#endif /* !HAVE_CHARSET */
|
||||||
{ "use_8th_bit_as_meta", &use_8th_bit_as_meta },
|
{ "use_8th_bit_as_meta", &use_8th_bit_as_meta },
|
||||||
#endif
|
|
||||||
{ "confirm_view_dir", &confirm_view_dir },
|
{ "confirm_view_dir", &confirm_view_dir },
|
||||||
{ "mouse_move_pages", &mouse_move_pages },
|
{ "mouse_move_pages", &mouse_move_pages },
|
||||||
{ "mouse_move_pages_viewer", &mouse_move_pages_viewer },
|
{ "mouse_move_pages_viewer", &mouse_move_pages_viewer },
|
||||||
@ -202,15 +188,10 @@ static const struct {
|
|||||||
{ "advanced_chown", &advanced_chfns },
|
{ "advanced_chown", &advanced_chfns },
|
||||||
{ "drop_menus", &drop_menus },
|
{ "drop_menus", &drop_menus },
|
||||||
{ "wrap_mode", &global_wrap_mode},
|
{ "wrap_mode", &global_wrap_mode},
|
||||||
#ifndef HAVE_X
|
|
||||||
{ "old_esc_mode", &old_esc_mode },
|
{ "old_esc_mode", &old_esc_mode },
|
||||||
{ "cd_symlinks", &cd_symlinks },
|
{ "cd_symlinks", &cd_symlinks },
|
||||||
#endif
|
|
||||||
{ "show_all_if_ambiguous", &show_all_if_ambiguous },
|
{ "show_all_if_ambiguous", &show_all_if_ambiguous },
|
||||||
{ "have_fast_cpu", &have_fast_cpu },
|
{ "have_fast_cpu", &have_fast_cpu },
|
||||||
#if 0
|
|
||||||
{ "iconify_on_exec", &iconify_on_exec },
|
|
||||||
#endif
|
|
||||||
{ "torben_fj_mode", &torben_fj_mode },
|
{ "torben_fj_mode", &torben_fj_mode },
|
||||||
{ "use_file_to_guess_type", &use_file_to_check_type },
|
{ "use_file_to_guess_type", &use_file_to_check_type },
|
||||||
{ "alternate_plus_minus", &alternate_plus_minus },
|
{ "alternate_plus_minus", &alternate_plus_minus },
|
||||||
@ -220,16 +201,13 @@ static const struct {
|
|||||||
{ "xtree_mode", &xtree_mode },
|
{ "xtree_mode", &xtree_mode },
|
||||||
{ "num_history_items_recorded", &num_history_items_recorded },
|
{ "num_history_items_recorded", &num_history_items_recorded },
|
||||||
{ "file_op_compute_totals", &file_op_compute_totals },
|
{ "file_op_compute_totals", &file_op_compute_totals },
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
{ "use_magic", &use_magic },
|
|
||||||
#endif
|
|
||||||
#ifdef SAVE_CHANGES_OUTSIDE_OPTIONS_MENU
|
#ifdef SAVE_CHANGES_OUTSIDE_OPTIONS_MENU
|
||||||
{ "dive_into_subdirs", &dive_into_subdirs },
|
{ "dive_into_subdirs", &dive_into_subdirs },
|
||||||
{ "preserve_uidgid", &preserve_uidgid },
|
{ "preserve_uidgid", &preserve_uidgid },
|
||||||
/* What about the other two options in the copy dialog
|
/* What about the other two options in the copy dialog
|
||||||
(follow links, stable symlinks) -Norbert */
|
(follow links, stable symlinks) -Norbert */
|
||||||
{ "tree_navigation_flag", &tree_navigation_flag },
|
{ "tree_navigation_flag", &tree_navigation_flag },
|
||||||
#endif
|
#endif /* SAVE_CHANGES_OUTSIDE_OPTIONS_MENU */
|
||||||
#ifdef USE_VFS
|
#ifdef USE_VFS
|
||||||
{ "vfs_timeout", &vfs_timeout },
|
{ "vfs_timeout", &vfs_timeout },
|
||||||
#ifdef USE_NETCODE
|
#ifdef USE_NETCODE
|
||||||
@ -240,8 +218,8 @@ static const struct {
|
|||||||
{ "ftpfs_use_passive_connections", &ftpfs_use_passive_connections },
|
{ "ftpfs_use_passive_connections", &ftpfs_use_passive_connections },
|
||||||
{ "ftpfs_use_unix_list_options", &ftpfs_use_unix_list_options },
|
{ "ftpfs_use_unix_list_options", &ftpfs_use_unix_list_options },
|
||||||
{ "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls },
|
{ "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls },
|
||||||
#endif
|
#endif /* USE_NETCODE */
|
||||||
#endif
|
#endif /* USE_VFS */
|
||||||
#ifdef USE_INTERNAL_EDIT
|
#ifdef USE_INTERNAL_EDIT
|
||||||
{ "editor_word_wrap_line_length", &option_word_wrap_line_length },
|
{ "editor_word_wrap_line_length", &option_word_wrap_line_length },
|
||||||
{ "editor_key_emulation", &edit_key_emulation },
|
{ "editor_key_emulation", &edit_key_emulation },
|
||||||
@ -256,45 +234,10 @@ static const struct {
|
|||||||
{ "editor_option_typewriter_wrap", &option_typewriter_wrap },
|
{ "editor_option_typewriter_wrap", &option_typewriter_wrap },
|
||||||
{ "editor_edit_confirm_save", &edit_confirm_save },
|
{ "editor_edit_confirm_save", &edit_confirm_save },
|
||||||
{ "editor_syntax_highlighting", &option_syntax_highlighting },
|
{ "editor_syntax_highlighting", &option_syntax_highlighting },
|
||||||
#endif
|
#endif /* USE_INTERNAL_EDIT */
|
||||||
|
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
{ "desktop_use_shaped_icons", &desktop_use_shaped_icons },
|
|
||||||
{ "desktop_use_shaped_text", &desktop_use_shaped_text },
|
|
||||||
{ "desktop_auto_placement", &desktop_auto_placement },
|
|
||||||
{ "desktop_snap_icons", &desktop_snap_icons },
|
|
||||||
{ "desktop_arr_r2l", &desktop_arr_r2l },
|
|
||||||
{ "desktop_arr_b2t", &desktop_arr_b2t },
|
|
||||||
{ "desktop_arr_rows", &desktop_arr_rows },
|
|
||||||
{ "tree_panel_visible", &tree_panel_visible },
|
|
||||||
{ "we_can_afford_the_speed", &we_can_afford_the_speed },
|
|
||||||
|
|
||||||
/* Keep the following in sync with panel.h */
|
|
||||||
{ "column_width_brief_icon", &default_column_width[0] },
|
|
||||||
{ "column_width_brief_filename", &default_column_width[1] },
|
|
||||||
{ "column_width_detailed_icon", &default_column_width[2] },
|
|
||||||
{ "column_width_detailed_filename", &default_column_width[3] },
|
|
||||||
{ "column_width_detailed_size", &default_column_width[4] },
|
|
||||||
{ "column_width_detailed_mtime", &default_column_width[5] },
|
|
||||||
{ "column_width_custom_0", &default_column_width[6] },
|
|
||||||
{ "column_width_custom_1", &default_column_width[7] },
|
|
||||||
{ "column_width_custom_2", &default_column_width[8] },
|
|
||||||
{ "column_width_custom_3", &default_column_width[9] },
|
|
||||||
{ "column_width_custom_4", &default_column_width[10] },
|
|
||||||
{ "column_width_custom_5", &default_column_width[11] },
|
|
||||||
{ "column_width_custom_6", &default_column_width[12] },
|
|
||||||
{ "column_width_custom_7", &default_column_width[13] },
|
|
||||||
{ "column_width_custom_8", &default_column_width[14] },
|
|
||||||
{ "column_width_custom_9", &default_column_width[15] },
|
|
||||||
{ "column_width_custom_10", &default_column_width[16] },
|
|
||||||
{ "column_width_custom_11", &default_column_width[17] },
|
|
||||||
{ "column_width_custom_12", &default_column_width[18] },
|
|
||||||
{ "column_width_custom_13", &default_column_width[19] },
|
|
||||||
{ "column_width_custom_14", &default_column_width[20] },
|
|
||||||
#else
|
|
||||||
{ "nice_rotating_dash", &nice_rotating_dash },
|
{ "nice_rotating_dash", &nice_rotating_dash },
|
||||||
{ "horizontal_split", &horizontal_split },
|
{ "horizontal_split", &horizontal_split },
|
||||||
#endif
|
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -335,7 +278,6 @@ panel_save_setup (WPanel *panel, char *section)
|
|||||||
profile_name);
|
profile_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
void
|
void
|
||||||
save_layout (void)
|
save_layout (void)
|
||||||
{
|
{
|
||||||
@ -353,7 +295,6 @@ save_layout (void)
|
|||||||
|
|
||||||
g_free (profile);
|
g_free (profile);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
save_configure (void)
|
save_configure (void)
|
||||||
@ -367,10 +308,6 @@ save_configure (void)
|
|||||||
for (i = 0; options [i].opt_name; i++)
|
for (i = 0; options [i].opt_name; i++)
|
||||||
set_int (profile, options [i].opt_name, *options [i].opt_addr);
|
set_int (profile, options [i].opt_name, *options [i].opt_addr);
|
||||||
|
|
||||||
#ifdef HAVE_GNOME
|
|
||||||
save_string (app_text, "default_user_format", default_user_format, profile_name);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_free (profile);
|
g_free (profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,7 +351,6 @@ save_setup (void)
|
|||||||
|
|
||||||
save_configure ();
|
save_configure ();
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
save_layout ();
|
save_layout ();
|
||||||
save_string ("Dirs", "other_dir",
|
save_string ("Dirs", "other_dir",
|
||||||
get_other_type () == view_listing
|
get_other_type () == view_listing
|
||||||
@ -423,26 +359,23 @@ save_setup (void)
|
|||||||
WritePrivateProfileString ("Dirs", "current_is_left",
|
WritePrivateProfileString ("Dirs", "current_is_left",
|
||||||
get_current_index () == 0 ? "1" : "0", profile);
|
get_current_index () == 0 ? "1" : "0", profile);
|
||||||
save_hotlist ();
|
save_hotlist ();
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
save_panelize ();
|
save_panelize ();
|
||||||
save_panel_types ();
|
save_panel_types ();
|
||||||
/* directory_history_save (); */
|
/* directory_history_save (); */
|
||||||
|
|
||||||
#ifdef USE_VFS
|
#if defined(USE_VFS) && defined (USE_NETCODE)
|
||||||
#ifdef USE_NETCODE
|
|
||||||
WritePrivateProfileString ("Misc", "ftpfs_password",
|
WritePrivateProfileString ("Misc", "ftpfs_password",
|
||||||
ftpfs_anonymous_passwd, profile);
|
ftpfs_anonymous_passwd, profile);
|
||||||
if (ftpfs_proxy_host)
|
if (ftpfs_proxy_host)
|
||||||
WritePrivateProfileString ("Misc", "ftp_proxy_host",
|
WritePrivateProfileString ("Misc", "ftp_proxy_host",
|
||||||
ftpfs_proxy_host, profile);
|
ftpfs_proxy_host, profile);
|
||||||
#endif
|
#endif /* USE_VFS && USE_NETCODE */
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
save_string( "Misc", "display_codepage",
|
save_string( "Misc", "display_codepage",
|
||||||
get_codepage_id( display_codepage ), profile_name );
|
get_codepage_id( display_codepage ), profile_name );
|
||||||
#endif
|
#endif /* HAVE_CHARSET */
|
||||||
|
|
||||||
g_free (profile);
|
g_free (profile);
|
||||||
saving_setup = 0;
|
saving_setup = 0;
|
||||||
@ -500,7 +433,6 @@ panel_load_setup (WPanel *panel, char *section)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
static void
|
static void
|
||||||
load_layout (char *profile_name)
|
load_layout (char *profile_name)
|
||||||
{
|
{
|
||||||
@ -511,7 +443,6 @@ load_layout (char *profile_name)
|
|||||||
load_int ("Layout", layout [i].opt_name,
|
load_int ("Layout", layout [i].opt_name,
|
||||||
*layout [i].opt_addr);
|
*layout [i].opt_addr);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
load_mode (char *section)
|
load_mode (char *section)
|
||||||
@ -582,12 +513,7 @@ load_setup (void)
|
|||||||
*options [i].opt_addr =
|
*options [i].opt_addr =
|
||||||
get_int (profile, options [i].opt_name, *options [i].opt_addr);
|
get_int (profile, options [i].opt_name, *options [i].opt_addr);
|
||||||
|
|
||||||
#ifdef HAVE_X
|
|
||||||
g_free (default_user_format);
|
|
||||||
default_user_format = do_load_string (app_text, "default_user_format", DEFAULT_USER_FORMAT);
|
|
||||||
#else
|
|
||||||
load_layout (profile);
|
load_layout (profile);
|
||||||
#endif
|
|
||||||
|
|
||||||
load_panelize ();
|
load_panelize ();
|
||||||
|
|
||||||
@ -598,7 +524,6 @@ load_setup (void)
|
|||||||
if (startup_left_mode != view_listing && startup_right_mode!=view_listing)
|
if (startup_left_mode != view_listing && startup_right_mode!=view_listing)
|
||||||
startup_left_mode = view_listing;
|
startup_left_mode = view_listing;
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
if (!other_dir){
|
if (!other_dir){
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
|
||||||
@ -613,7 +538,6 @@ load_setup (void)
|
|||||||
|
|
||||||
boot_current_is_left =
|
boot_current_is_left =
|
||||||
GetPrivateProfileInt ("Dirs", "current_is_left", 1, profile);
|
GetPrivateProfileInt ("Dirs", "current_is_left", 1, profile);
|
||||||
#endif /* !HAVE_X */
|
|
||||||
|
|
||||||
#ifdef USE_NETCODE
|
#ifdef USE_NETCODE
|
||||||
ftpfs_proxy_host = do_load_string ("Misc", "ftp_proxy_host", "gate");
|
ftpfs_proxy_host = do_load_string ("Misc", "ftp_proxy_host", "gate");
|
||||||
@ -637,11 +561,9 @@ load_setup (void)
|
|||||||
/* Remove the temporal entries */
|
/* Remove the temporal entries */
|
||||||
profile_clean_section ("Temporal:New Left Panel", profile_name);
|
profile_clean_section ("Temporal:New Left Panel", profile_name);
|
||||||
profile_clean_section ("Temporal:New Right Panel", profile_name);
|
profile_clean_section ("Temporal:New Right Panel", profile_name);
|
||||||
#ifdef USE_VFS
|
#if defined(USE_VFS) && defined (USE_NETCODE)
|
||||||
#ifdef USE_NETCODE
|
|
||||||
ftpfs_init_passwd ();
|
ftpfs_init_passwd ();
|
||||||
#endif
|
#endif /* USE_VFS && USE_NETCODE */
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
if ( load_codepages_list() > 0 ) {
|
if ( load_codepages_list() > 0 ) {
|
||||||
@ -654,11 +576,10 @@ load_setup (void)
|
|||||||
|
|
||||||
init_printable_table( display_codepage );
|
init_printable_table( display_codepage );
|
||||||
init_translation_table( source_codepage, display_codepage );
|
init_translation_table( source_codepage, display_codepage );
|
||||||
#endif
|
#endif /* HAVE_CHARSET */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_VFS
|
#if defined(USE_VFS) && defined (USE_NETCODE)
|
||||||
#ifdef USE_NETCODE
|
|
||||||
char *
|
char *
|
||||||
load_anon_passwd ()
|
load_anon_passwd ()
|
||||||
{
|
{
|
||||||
@ -670,20 +591,16 @@ load_anon_passwd ()
|
|||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* USE_VFS && USE_NETCODE */
|
||||||
#endif
|
|
||||||
|
|
||||||
void done_setup (void)
|
void done_setup (void)
|
||||||
{
|
{
|
||||||
g_free (profile_name);
|
g_free (profile_name);
|
||||||
#ifndef HAVE_X
|
|
||||||
done_hotlist ();
|
done_hotlist ();
|
||||||
#endif /* HAVE_X */
|
|
||||||
done_panelize ();
|
done_panelize ();
|
||||||
/* directory_history_free (); */
|
/* directory_history_free (); */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_X
|
|
||||||
static void
|
static void
|
||||||
load_keys_from_section (char *terminal, char *profile_name)
|
load_keys_from_section (char *terminal, char *profile_name)
|
||||||
{
|
{
|
||||||
@ -732,4 +649,3 @@ void load_key_defs (void)
|
|||||||
free_profile_name (libfile);
|
free_profile_name (libfile);
|
||||||
g_free (libfile);
|
g_free (libfile);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user