mirror of https://github.com/MidnightCommander/mc
* cmd.c: Clean up unused GNOME code and some ifdef's.
* dlg.c: Likewise. * dlg.h: Likewise. * ext.c: Likewise. * setup.c: Likewise.
This commit is contained in:
parent
33b7085e68
commit
0a4aa53f65
|
@ -1,5 +1,11 @@
|
|||
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
|
||||
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;
|
||||
}
|
||||
if (internal){
|
||||
#ifdef HAVE_X
|
||||
gmc_view (filename, start_line);
|
||||
#else
|
||||
char view_entry [BUF_TINY];
|
||||
|
||||
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);
|
||||
repaint_screen ();
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
} else {
|
||||
char *localcopy;
|
||||
|
||||
|
@ -325,13 +321,9 @@ do_edit (const char *what)
|
|||
|
||||
void edit_cmd (WPanel *panel)
|
||||
{
|
||||
#ifndef HAVE_X
|
||||
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 /* !HAVE_X */
|
||||
}
|
||||
|
||||
void edit_cmd_new (WPanel *panel)
|
||||
|
@ -422,12 +414,8 @@ set_panel_filter_to (WPanel *p, char *allocated_filter_string)
|
|||
else
|
||||
g_free (allocated_filter_string);
|
||||
reread_cmd ();
|
||||
#ifdef HAVE_X
|
||||
x_filter_changed (p);
|
||||
#endif /* HAVE_X */
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
/* Set a given panel filter expression */
|
||||
void set_panel_filter (WPanel *p)
|
||||
{
|
||||
|
@ -455,7 +443,6 @@ void filter_cmd (void)
|
|||
p = MENU_PANEL;
|
||||
set_panel_filter (p);
|
||||
}
|
||||
#endif /* HAVE_X */
|
||||
|
||||
void reread_cmd (void)
|
||||
{
|
||||
|
@ -493,12 +480,10 @@ void reverse_selection_cmd_panel (WPanel *panel)
|
|||
paint_panel (panel);
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
void reverse_selection_cmd (void)
|
||||
{
|
||||
reverse_selection_cmd_panel (cpanel);
|
||||
}
|
||||
#endif /* HAVE_X */
|
||||
|
||||
void select_cmd_panel (WPanel *panel)
|
||||
{
|
||||
|
@ -547,12 +532,10 @@ void select_cmd_panel (WPanel *panel)
|
|||
g_free (reg_exp);
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
void select_cmd (void)
|
||||
{
|
||||
select_cmd_panel (cpanel);
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
void unselect_cmd_panel (WPanel *panel)
|
||||
{
|
||||
|
@ -600,7 +583,6 @@ void unselect_cmd_panel (WPanel *panel)
|
|||
g_free (reg_exp);
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
void unselect_cmd (void)
|
||||
{
|
||||
unselect_cmd_panel (cpanel);
|
||||
|
@ -939,7 +921,7 @@ view_other_cmd (void)
|
|||
*/
|
||||
reset_shell_mode ();
|
||||
noecho ();
|
||||
#endif /* HAVE_SLANG */
|
||||
#endif /* !HAVE_SLANG */
|
||||
keypad(stdscr, FALSE);
|
||||
endwin ();
|
||||
do_exit_ca_mode ();
|
||||
|
@ -994,7 +976,6 @@ view_other_cmd (void)
|
|||
repaint_screen ();
|
||||
}
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
#ifndef OS2_NT
|
||||
static void
|
||||
|
@ -1077,10 +1058,7 @@ void 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)) {
|
||||
#endif /* !HAVE_X */
|
||||
char buffer [MC_MAXPATHLEN];
|
||||
char *p = NULL;
|
||||
int i;
|
||||
|
@ -1121,12 +1099,10 @@ void edit_symlink_cmd (void)
|
|||
}
|
||||
}
|
||||
g_free (q);
|
||||
#ifndef HAVE_X
|
||||
} else {
|
||||
message (1, MSG_ERROR, _("`%s' is not a symbolic link"),
|
||||
selection (cpanel)->fname);
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
}
|
||||
|
||||
void other_symlink_cmd (void)
|
||||
|
@ -1207,8 +1183,6 @@ char *guess_message_value (void)
|
|||
NULL
|
||||
};
|
||||
|
||||
gchar *retval;
|
||||
|
||||
unsigned i = 0;
|
||||
char *locale = NULL;
|
||||
|
||||
|
@ -1279,7 +1253,6 @@ char *get_random_hint (void)
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
#ifdef USE_NETCODE
|
||||
|
||||
static char *machine_str = N_(" Enter machine name (F1 for details): ");
|
||||
|
@ -1378,7 +1351,6 @@ void quick_cd_cmd (void)
|
|||
if (p)
|
||||
g_free (p);
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
void
|
||||
dirsizes_cmd (void)
|
||||
|
@ -1403,7 +1375,6 @@ dirsizes_cmd (void)
|
|||
paint_panel (panel);
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
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);
|
||||
|
||||
#ifndef HAVE_X
|
||||
switch_to_listing (panel_index);
|
||||
#endif /* !HAVE_X */
|
||||
p->list_type = listing_mode;
|
||||
if (set_panel_formats (p))
|
||||
return 0;
|
||||
|
@ -1549,5 +1518,4 @@ toggle_listing_cmd (void)
|
|||
return;
|
||||
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 */
|
||||
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)
|
||||
{
|
||||
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);
|
||||
#else
|
||||
SLsmg_draw_box (h->y+y, h->x+x, ys, xs);
|
||||
#endif
|
||||
#endif /* HAVE_SLANG */
|
||||
}
|
||||
|
||||
/* 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);
|
||||
#else
|
||||
SLsmg_draw_double_box (h->y+y, h->x+x, ys, xs);
|
||||
#endif
|
||||
#endif /* HAVE_SLANG */
|
||||
}
|
||||
|
||||
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,
|
||||
int (*callback)(Dlg_head *, void *, int, int),
|
||||
|
@ -208,9 +193,6 @@ int default_dlg_callback (Dlg_head *h, int id, int msg)
|
|||
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,
|
||||
int *color_set,
|
||||
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;
|
||||
|
||||
#ifndef HAVE_X
|
||||
if (flags & DLG_CENTER){
|
||||
y1 = (LINES-lines)/2;
|
||||
x1 = (COLS-cols)/2;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((flags & DLG_TRYUP) && (y1 > 3))
|
||||
y1 -= 2;
|
||||
|
@ -239,19 +219,12 @@ Dlg_head *create_dlg (int y1, int x1, int lines, int cols,
|
|||
new_d->cols = cols;
|
||||
new_d->lines = lines;
|
||||
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);
|
||||
}
|
||||
|
||||
void set_idle_proc (Dlg_head *d, int state)
|
||||
{
|
||||
d->send_idle_msg = state;
|
||||
x_set_idle (d, state);
|
||||
}
|
||||
|
||||
/* add component to dialog buffer */
|
||||
|
@ -314,9 +287,6 @@ int add_widget (Dlg_head *where, void *what)
|
|||
if (where->running){
|
||||
send_message (where, widget, WIDGET_INIT, 0);
|
||||
send_message (where, widget, WIDGET_DRAW, 0);
|
||||
#ifdef HAVE_GNOME
|
||||
x_add_widget (where, where->current);
|
||||
#endif
|
||||
}
|
||||
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)
|
||||
{
|
||||
Widget_Item *p, *first, *wi;
|
||||
#ifdef HAVE_GNOME
|
||||
int was_panel;
|
||||
#endif
|
||||
|
||||
if (!h->current)
|
||||
return;
|
||||
|
@ -381,35 +348,16 @@ void dlg_broadcast_msg_to (Dlg_head *h, int message, int reverse, int flags)
|
|||
if (reverse)
|
||||
first = p = h->current->prev;
|
||||
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;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME
|
||||
was_panel = FALSE;
|
||||
#endif
|
||||
do {
|
||||
wi = p;
|
||||
if (reverse)
|
||||
p = p->prev;
|
||||
else
|
||||
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);
|
||||
} 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 */
|
||||
|
@ -611,7 +559,6 @@ void dlg_refresh (void *parameter)
|
|||
void dlg_stop (Dlg_head *h)
|
||||
{
|
||||
h->running = 0;
|
||||
x_dialog_stop (h);
|
||||
}
|
||||
|
||||
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 ();
|
||||
break;
|
||||
|
||||
#ifndef HAVE_X
|
||||
case XCTRL('z'):
|
||||
suspend_cmd ();
|
||||
/* Fall through */
|
||||
|
@ -647,14 +593,12 @@ static INLINE void dialog_handle_key (Dlg_head *h, int d_key)
|
|||
#endif /* HAVE_SLANG */
|
||||
mc_refresh ();
|
||||
doupdate ();
|
||||
#endif /* !HAVE_X */
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
case KEY_ENTER:
|
||||
h->ret_value = B_ENTER;
|
||||
h->running = 0;
|
||||
x_dialog_stop (h);
|
||||
break;
|
||||
|
||||
case ESC_CHAR:
|
||||
|
@ -818,15 +762,11 @@ void init_dlg (Dlg_head *h)
|
|||
(*h->callback) (h, 0, DLG_INIT);
|
||||
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)
|
||||
refresh_mode = REFRESH_COVERS_ALL;
|
||||
else
|
||||
refresh_mode = REFRESH_COVERS_PART;
|
||||
|
||||
#endif
|
||||
push_refresh (dlg_refresh, h, refresh_mode);
|
||||
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);
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
static inline void
|
||||
frontend_run_dlg (Dlg_head *h)
|
||||
{
|
||||
|
@ -920,7 +859,6 @@ frontend_run_dlg (Dlg_head *h)
|
|||
dlg_process_event (h, d_key, &event);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_X */
|
||||
|
||||
/* Standard run dialog routine
|
||||
* 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)
|
||||
{
|
||||
init_dlg (h);
|
||||
#ifdef HAVE_X
|
||||
gtkrundlg_event (h);
|
||||
#else
|
||||
frontend_run_dlg (h);
|
||||
#endif /* !HAVE_X */
|
||||
dlg_run_done (h);
|
||||
}
|
||||
|
||||
|
@ -965,10 +899,8 @@ destroy_dlg (Dlg_head *h)
|
|||
x_destroy_dlg (h);
|
||||
g_free (h);
|
||||
|
||||
#ifndef HAVE_X
|
||||
if (refresh_list)
|
||||
do_refresh ();
|
||||
#endif
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
void
|
||||
x_set_dialog_title (Dlg_head *h, const char *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
|
||||
#include "mouse.h"
|
||||
|
||||
#ifndef HAVE_X
|
||||
/* Color constants */
|
||||
#define FOCUSC h->color[1]
|
||||
#define NORMALC h->color[0]
|
||||
#define HOT_NORMALC h->color[2]
|
||||
#define HOT_FOCUSC h->color[3]
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
/* Possible directions */
|
||||
#define DIR_FORWARD 1
|
||||
|
@ -108,9 +106,6 @@ typedef struct Dlg_head {
|
|||
|
||||
widget_data wdata;
|
||||
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;
|
||||
|
||||
/* 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 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 dlg_move(h, _y, _x) move(((Dlg_head *) h)->y + _y, \
|
||||
((Dlg_head *) h)->x + _x)
|
||||
|
||||
#define widget_move(w,y,x) real_widget_move((Widget*)w,y,x)
|
||||
#endif
|
||||
|
||||
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);
|
||||
void update_cursor (Dlg_head *h);
|
||||
|
||||
#ifdef HAVE_X
|
||||
extern Dlg_head *midnight_dlg;
|
||||
void x_focus_widget (Widget_Item *p);
|
||||
void x_unfocus_widget (Widget_Item *p);
|
||||
void x_init_dlg (Dlg_head *h);
|
||||
void x_destroy_dlg (Dlg_head *h);
|
||||
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
|
||||
/* FIXME: Remove those functions */
|
||||
#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 /* 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;
|
||||
do_cd (p, cd_parse_command);
|
||||
} else {
|
||||
#ifdef HAVE_X
|
||||
if (needs_term)
|
||||
gnome_open_terminal_with_cmd (file_name);
|
||||
else
|
||||
shell_execute (file_name, EXECUTE_INTERNAL | EXECUTE_TEMPFILE);
|
||||
#else
|
||||
shell_execute (file_name, EXECUTE_INTERNAL | EXECUTE_TEMPFILE);
|
||||
if (console_flag)
|
||||
{
|
||||
if (console_flag) {
|
||||
handle_console (CONSOLE_SAVE);
|
||||
if (output_lines && keybar_visible)
|
||||
{
|
||||
if (output_lines && keybar_visible) {
|
||||
show_console_contents (output_start_y,
|
||||
LINES-keybar_visible-output_lines-1,
|
||||
LINES-keybar_visible-1);
|
||||
|
||||
}
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
}
|
||||
if (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 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)
|
||||
{
|
||||
|
@ -684,4 +674,3 @@ match_file_output:
|
|||
easy_patterns = old_patterns;
|
||||
return to_return;
|
||||
}
|
||||
#endif /* !HAVE_GNOME */
|
||||
|
|
110
src/setup.c
110
src/setup.c
|
@ -58,12 +58,6 @@
|
|||
# include "../vfs/ftpfs.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GNOME
|
||||
extern int tree_panel_visible;
|
||||
extern int we_can_afford_the_speed;
|
||||
int use_magic = 0;
|
||||
#endif
|
||||
|
||||
/* "$Id$" */
|
||||
|
||||
#ifdef USE_VFS
|
||||
|
@ -130,7 +124,6 @@ static const struct {
|
|||
{ 0, 0 }
|
||||
};
|
||||
|
||||
#ifndef HAVE_GNOME
|
||||
static const struct {
|
||||
char *opt_name;
|
||||
int *opt_addr;
|
||||
|
@ -148,7 +141,6 @@ static const struct {
|
|||
{ "filetype_mode", &filetype_mode },
|
||||
{ 0, 0 }
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#undef SAVE_CHANGES_OUTSIDE_OPTIONS_MENU
|
||||
|
@ -162,11 +154,7 @@ static const struct {
|
|||
int *opt_addr;
|
||||
} options [] = {
|
||||
{ "show_backups", &show_backups },
|
||||
#ifdef HAVE_GNOME
|
||||
{ "gnome_show_dot_files", &show_dot_files },
|
||||
#else
|
||||
{ "show_dot_files", &show_dot_files },
|
||||
#endif
|
||||
{ "verbose", &verbose },
|
||||
{ "mark_moves_down", &mark_moves_down },
|
||||
{ "pause_after_run", &pause_after_run },
|
||||
|
@ -185,15 +173,13 @@ static const struct {
|
|||
{ "confirm_execute", &confirm_execute },
|
||||
{ "confirm_exit", &confirm_exit },
|
||||
{ "safe_delete", &know_not_what_am_i_doing },
|
||||
#ifndef HAVE_X
|
||||
{ "mouse_repeat_rate", &mou_auto_repeat },
|
||||
{ "double_click_speed", &double_click_speed },
|
||||
#ifndef HAVE_CHARSET
|
||||
{ "eight_bit_clean", &eight_bit_clean },
|
||||
{ "full_eight_bits", &full_eight_bits },
|
||||
#endif
|
||||
#endif /* !HAVE_CHARSET */
|
||||
{ "use_8th_bit_as_meta", &use_8th_bit_as_meta },
|
||||
#endif
|
||||
{ "confirm_view_dir", &confirm_view_dir },
|
||||
{ "mouse_move_pages", &mouse_move_pages },
|
||||
{ "mouse_move_pages_viewer", &mouse_move_pages_viewer },
|
||||
|
@ -202,15 +188,10 @@ static const struct {
|
|||
{ "advanced_chown", &advanced_chfns },
|
||||
{ "drop_menus", &drop_menus },
|
||||
{ "wrap_mode", &global_wrap_mode},
|
||||
#ifndef HAVE_X
|
||||
{ "old_esc_mode", &old_esc_mode },
|
||||
{ "cd_symlinks", &cd_symlinks },
|
||||
#endif
|
||||
{ "show_all_if_ambiguous", &show_all_if_ambiguous },
|
||||
{ "have_fast_cpu", &have_fast_cpu },
|
||||
#if 0
|
||||
{ "iconify_on_exec", &iconify_on_exec },
|
||||
#endif
|
||||
{ "torben_fj_mode", &torben_fj_mode },
|
||||
{ "use_file_to_guess_type", &use_file_to_check_type },
|
||||
{ "alternate_plus_minus", &alternate_plus_minus },
|
||||
|
@ -220,16 +201,13 @@ static const struct {
|
|||
{ "xtree_mode", &xtree_mode },
|
||||
{ "num_history_items_recorded", &num_history_items_recorded },
|
||||
{ "file_op_compute_totals", &file_op_compute_totals },
|
||||
#ifdef HAVE_GNOME
|
||||
{ "use_magic", &use_magic },
|
||||
#endif
|
||||
#ifdef SAVE_CHANGES_OUTSIDE_OPTIONS_MENU
|
||||
{ "dive_into_subdirs", &dive_into_subdirs },
|
||||
{ "preserve_uidgid", &preserve_uidgid },
|
||||
/* What about the other two options in the copy dialog
|
||||
(follow links, stable symlinks) -Norbert */
|
||||
{ "tree_navigation_flag", &tree_navigation_flag },
|
||||
#endif
|
||||
#endif /* SAVE_CHANGES_OUTSIDE_OPTIONS_MENU */
|
||||
#ifdef USE_VFS
|
||||
{ "vfs_timeout", &vfs_timeout },
|
||||
#ifdef USE_NETCODE
|
||||
|
@ -240,8 +218,8 @@ static const struct {
|
|||
{ "ftpfs_use_passive_connections", &ftpfs_use_passive_connections },
|
||||
{ "ftpfs_use_unix_list_options", &ftpfs_use_unix_list_options },
|
||||
{ "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls },
|
||||
#endif
|
||||
#endif
|
||||
#endif /* USE_NETCODE */
|
||||
#endif /* USE_VFS */
|
||||
#ifdef USE_INTERNAL_EDIT
|
||||
{ "editor_word_wrap_line_length", &option_word_wrap_line_length },
|
||||
{ "editor_key_emulation", &edit_key_emulation },
|
||||
|
@ -256,45 +234,10 @@ static const struct {
|
|||
{ "editor_option_typewriter_wrap", &option_typewriter_wrap },
|
||||
{ "editor_edit_confirm_save", &edit_confirm_save },
|
||||
{ "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 },
|
||||
{ "horizontal_split", &horizontal_split },
|
||||
#endif
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
@ -335,7 +278,6 @@ panel_save_setup (WPanel *panel, char *section)
|
|||
profile_name);
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
void
|
||||
save_layout (void)
|
||||
{
|
||||
|
@ -353,7 +295,6 @@ save_layout (void)
|
|||
|
||||
g_free (profile);
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
void
|
||||
save_configure (void)
|
||||
|
@ -367,10 +308,6 @@ save_configure (void)
|
|||
for (i = 0; options [i].opt_name; i++)
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -414,7 +351,6 @@ save_setup (void)
|
|||
|
||||
save_configure ();
|
||||
|
||||
#ifndef HAVE_X
|
||||
save_layout ();
|
||||
save_string ("Dirs", "other_dir",
|
||||
get_other_type () == view_listing
|
||||
|
@ -423,26 +359,23 @@ save_setup (void)
|
|||
WritePrivateProfileString ("Dirs", "current_is_left",
|
||||
get_current_index () == 0 ? "1" : "0", profile);
|
||||
save_hotlist ();
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
save_panelize ();
|
||||
save_panel_types ();
|
||||
/* directory_history_save (); */
|
||||
|
||||
#ifdef USE_VFS
|
||||
#ifdef USE_NETCODE
|
||||
#if defined(USE_VFS) && defined (USE_NETCODE)
|
||||
WritePrivateProfileString ("Misc", "ftpfs_password",
|
||||
ftpfs_anonymous_passwd, profile);
|
||||
if (ftpfs_proxy_host)
|
||||
WritePrivateProfileString ("Misc", "ftp_proxy_host",
|
||||
ftpfs_proxy_host, profile);
|
||||
#endif
|
||||
#endif
|
||||
#endif /* USE_VFS && USE_NETCODE */
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
save_string( "Misc", "display_codepage",
|
||||
get_codepage_id( display_codepage ), profile_name );
|
||||
#endif
|
||||
#endif /* HAVE_CHARSET */
|
||||
|
||||
g_free (profile);
|
||||
saving_setup = 0;
|
||||
|
@ -500,7 +433,6 @@ panel_load_setup (WPanel *panel, char *section)
|
|||
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
static void
|
||||
load_layout (char *profile_name)
|
||||
{
|
||||
|
@ -511,7 +443,6 @@ load_layout (char *profile_name)
|
|||
load_int ("Layout", layout [i].opt_name,
|
||||
*layout [i].opt_addr);
|
||||
}
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
static int
|
||||
load_mode (char *section)
|
||||
|
@ -582,12 +513,7 @@ load_setup (void)
|
|||
*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);
|
||||
#endif
|
||||
|
||||
load_panelize ();
|
||||
|
||||
|
@ -598,7 +524,6 @@ load_setup (void)
|
|||
if (startup_left_mode != view_listing && startup_right_mode!=view_listing)
|
||||
startup_left_mode = view_listing;
|
||||
|
||||
#ifndef HAVE_X
|
||||
if (!other_dir){
|
||||
char *buffer;
|
||||
|
||||
|
@ -613,7 +538,6 @@ load_setup (void)
|
|||
|
||||
boot_current_is_left =
|
||||
GetPrivateProfileInt ("Dirs", "current_is_left", 1, profile);
|
||||
#endif /* !HAVE_X */
|
||||
|
||||
#ifdef USE_NETCODE
|
||||
ftpfs_proxy_host = do_load_string ("Misc", "ftp_proxy_host", "gate");
|
||||
|
@ -637,11 +561,9 @@ load_setup (void)
|
|||
/* Remove the temporal entries */
|
||||
profile_clean_section ("Temporal:New Left Panel", profile_name);
|
||||
profile_clean_section ("Temporal:New Right Panel", profile_name);
|
||||
#ifdef USE_VFS
|
||||
#ifdef USE_NETCODE
|
||||
#if defined(USE_VFS) && defined (USE_NETCODE)
|
||||
ftpfs_init_passwd ();
|
||||
#endif
|
||||
#endif
|
||||
#endif /* USE_VFS && USE_NETCODE */
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
if ( load_codepages_list() > 0 ) {
|
||||
|
@ -654,11 +576,10 @@ load_setup (void)
|
|||
|
||||
init_printable_table( display_codepage );
|
||||
init_translation_table( source_codepage, display_codepage );
|
||||
#endif
|
||||
#endif /* HAVE_CHARSET */
|
||||
}
|
||||
|
||||
#ifdef USE_VFS
|
||||
#ifdef USE_NETCODE
|
||||
#if defined(USE_VFS) && defined (USE_NETCODE)
|
||||
char *
|
||||
load_anon_passwd ()
|
||||
{
|
||||
|
@ -670,20 +591,16 @@ load_anon_passwd ()
|
|||
else
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* USE_VFS && USE_NETCODE */
|
||||
|
||||
void done_setup (void)
|
||||
{
|
||||
g_free (profile_name);
|
||||
#ifndef HAVE_X
|
||||
done_hotlist ();
|
||||
#endif /* HAVE_X */
|
||||
done_panelize ();
|
||||
/* directory_history_free (); */
|
||||
}
|
||||
|
||||
#ifndef HAVE_X
|
||||
static void
|
||||
load_keys_from_section (char *terminal, char *profile_name)
|
||||
{
|
||||
|
@ -732,4 +649,3 @@ void load_key_defs (void)
|
|||
free_profile_name (libfile);
|
||||
g_free (libfile);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue