* gfind.c: New file - copied from find.c. Reindent, remove

unneeded parts.  Rewrite find_parameters() to use GNOME dialog.
* layout: Remove usused entries.
* Makefile.in: Use gfind.c, not find.c.
This commit is contained in:
Pavel Roskin 2001-07-14 21:14:01 +00:00
parent 6883eb1dd0
commit 2f9f1bb380
4 changed files with 829 additions and 722 deletions

View File

@ -1,3 +1,10 @@
2001-07-14 Pavel Roskin <proski@gnu.org>
* gfind.c: New file - copied from find.c. Reindent, remove
unneeded parts. Rewrite find_parameters() to use GNOME dialog.
* layout: Remove usused entries.
* Makefile.in: Use gfind.c, not find.c.
2001-07-12 Pavel Roskin <proski@gnu.org>
* gdesktop.c (create_desktop_dir): If ~/Desktop doesn't exist

View File

@ -51,6 +51,7 @@ GNOMESRCS = \
gdesktop.c \
gdialogs.c \
gdnd.c \
gfind.c \
gicon.c \
gkey.c \
glayout.c \
@ -121,7 +122,7 @@ ICONS = \
# These objects are made from sources in ../src
#
OOBJS = dlg.o screen.o widget.o wtools.o \
file.o find.o dialog.o view.o \
file.o dialog.o view.o \
panelize.o background.o dir.o util.o \
win.o color.o profile.o user.o ext.o setup.o \
regex.o complete.o \
@ -149,6 +150,7 @@ OBJS = \
gdesktop-prefs.o \
gdesktop.o \
gdnd.o \
gfind.o \
gicon.o \
gkey.o \
glayout.o \

819
gnome/gfind.c Normal file
View File

@ -0,0 +1,819 @@
/* Find file command for the Midnight Commander
Copyright (C) The Free Software Foundation
Written 1995 by Miguel de Icaza
Complete rewrote.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <config.h>
#include <string.h>
#include <stdio.h>
#ifdef NEEDS_IO_H
# include <io.h>
#endif
#include <sys/stat.h>
#include <sys/param.h>
#include <fcntl.h>
#include <ctype.h>
#include "tty.h"
#include "x.h"
#include "global.h"
#include "find.h"
#include "dialog.h" /* For message() */
#include "main.h" /* do_cd, try_to_select */
#include "cmd.h" /* view_file_at_line */
#include "../vfs/vfs.h"
#ifndef PORT_HAS_FLUSH_EVENTS
# define x_flush_events()
#endif
#define FIND2_X_USE 35
#define verbose 1
/* A couple of extra messages we need */
enum {
B_STOP = B_USER + 1,
B_AGAIN,
B_PANELIZE,
B_TREE,
B_VIEW
};
/* A list of directories to be ignores, separated with ':' */
char *find_ignore_dirs = 0;
static int running = 0; /* nice flag */
static char *find_pattern; /* Pattern to search */
static char *content_pattern; /* pattern to search inside files */
static int count; /* Number of files displayed */
static int matches; /* Number of matches */
static int is_start; /* Status of the start/stop toggle button */
static char *old_dir;
static GtkWidget *g_find_dlg;
static GtkWidget *g_status_label;
static GtkWidget *g_clist;
static GtkWidget *g_start_stop;
static GtkWidget *g_start_stop_label;
static GtkWidget *g_view, *g_edit;
static GtkWidget *g_panelize;
static int current_row;
static int idle_tag;
static int stop;
/* This keeps track of the directory stack */
typedef struct dir_stack {
char *name;
struct dir_stack *prev;
} dir_stack;
static dir_stack *dir_stack_base = 0;
static char *add_to_list(char *text, void *closure);
static void stop_idle(void *data);
static void status_update(char *text);
static void get_list_info(char **file, char **dir);
/*
* find_parameters: gets information from the user
*
* If the return value is true, then the following holds:
*
* START_DIR and PATTERN are pointers to char * and upon return they
* contain the information provided by the user.
*
* CONTENT holds a strdup of the contents specified by the user if he
* asked for them or 0 if not (note, this is different from the
* behavior for the other two parameters.
*
*/
static int case_sensitive = 1;
static int find_parameters(char **start_dir, char **pattern, char **content)
{
int return_value;
GtkWidget *find_dialog;
GtkWidget *case_box;
GtkWidget *start_entry, *name_entry, *content_entry;
GtkWidget *start_label, *name_label, *content_label;
static char *case_label = N_("Case sensitive");
static char *in_contents = NULL;
static char *in_start_dir = NULL;
static char *in_start_name = NULL;
static char *labs[] = { N_("Start at:"), N_("Filename:"), N_("Content: ") };
if (!in_start_dir)
in_start_dir = g_strdup(".");
if (!in_start_name)
in_start_name = g_strdup(easy_patterns ? "*" : ".");
if (!in_contents)
in_contents = g_strdup("");
/* Create dialog */
find_dialog =
gnome_dialog_new(_("Find File"), GNOME_STOCK_BUTTON_OK,
GNOME_STOCK_BUTTON_CANCEL, NULL);
gmc_window_setup_from_panel(GNOME_DIALOG(find_dialog), cpanel);
start_label = gtk_label_new(_(labs[0]));
gtk_misc_set_alignment(GTK_MISC(start_label), 0.0, 0.5);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(find_dialog)->vbox), start_label, FALSE,
FALSE, 0);
start_entry = gnome_entry_new("start");
gnome_entry_load_history(GNOME_ENTRY(start_entry));
gtk_entry_set_text(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(start_entry))),
in_start_dir);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(find_dialog)->vbox), start_entry, FALSE,
FALSE, 0);
name_label = gtk_label_new(_(labs[1]));
gtk_misc_set_alignment(GTK_MISC(name_label), 0.0, 0.5);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(find_dialog)->vbox), name_label, FALSE,
FALSE, 0);
name_entry = gnome_entry_new("name");
gnome_entry_load_history(GNOME_ENTRY(name_entry));
gtk_entry_set_text(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(name_entry))),
in_start_name);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(find_dialog)->vbox), name_entry, FALSE,
FALSE, 0);
content_label = gtk_label_new(_(labs[2]));
gtk_misc_set_alignment(GTK_MISC(content_label), 0.0, 0.5);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(find_dialog)->vbox), content_label, FALSE,
FALSE, 0);
content_entry = gnome_entry_new("content");
gnome_entry_load_history(GNOME_ENTRY(content_entry));
gtk_entry_set_text(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(content_entry))),
in_contents);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(find_dialog)->vbox), content_entry, FALSE,
FALSE, 0);
case_box = gtk_check_button_new_with_label(_(case_label));
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(case_box), case_sensitive);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(find_dialog)->vbox), case_box, FALSE,
FALSE, 0);
gtk_widget_grab_focus(gnome_entry_gtk_entry(GNOME_ENTRY(start_entry)));
gnome_dialog_set_default(GNOME_DIALOG(find_dialog), 0);
gtk_widget_show_all(GNOME_DIALOG(find_dialog)->vbox);
switch (gnome_dialog_run(GNOME_DIALOG(find_dialog))) {
case 0:
return_value = 1;
*start_dir =
strdup(gtk_entry_get_text
(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(start_entry)))));
*pattern =
strdup(gtk_entry_get_text
(GTK_ENTRY(gnome_entry_gtk_entry(GNOME_ENTRY(name_entry)))));
*content =
strdup(gtk_entry_get_text
(GTK_ENTRY
(gnome_entry_gtk_entry(GNOME_ENTRY(content_entry)))));
g_free(in_start_dir);
in_start_dir = g_strdup(*start_dir);
g_free(in_start_name);
in_start_name = g_strdup(*pattern);
g_free(in_contents);
if (*content[0]) {
in_contents = g_strdup(*content);
} else {
*content = in_contents = NULL;
}
break;
case 1:
return_value = 0;
break;
default:
return 0;
}
gtk_widget_destroy(find_dialog);
return return_value;
}
static void push_directory(char *dir)
{
dir_stack *new;
new = g_new(dir_stack, 1);
new->name = g_strdup(dir);
new->prev = dir_stack_base;
dir_stack_base = new;
}
static char *pop_directory(void)
{
char *name;
dir_stack *next;
if (dir_stack_base) {
name = dir_stack_base->name;
next = dir_stack_base->prev;
g_free(dir_stack_base);
dir_stack_base = next;
return name;
} else
return 0;
}
static void insert_file(char *dir, char *file)
{
char *tmp_name;
static char *dirname;
int i;
if (dir[0] == PATH_SEP && dir[1] == PATH_SEP)
dir++;
i = strlen(dir);
if (i) {
if (dir[i - 1] != PATH_SEP) {
dir[i] = PATH_SEP;
dir[i + 1] = 0;
}
}
if (old_dir) {
if (strcmp(old_dir, dir)) {
g_free(old_dir);
old_dir = g_strdup(dir);
dirname = add_to_list(dir, NULL);
}
} else {
old_dir = g_strdup(dir);
dirname = add_to_list(dir, NULL);
}
tmp_name = g_strconcat(" ", file, NULL);
add_to_list(tmp_name, dirname);
g_free(tmp_name);
}
static void find_add_match(Dlg_head * h, char *dir, char *file)
{
insert_file(dir, file);
}
/*
* search_content:
*
* Search with egrep the global (FIXME) content_pattern string in the
* DIRECTORY/FILE. It will add the found entries to the find listbox.
*/
static void search_content(Dlg_head * h, char *directory, char *filename)
{
struct stat s;
char buffer[BUF_SMALL];
char *fname, *p;
int file_fd, pipe, ignoring;
char c;
int i;
pid_t pid;
char *egrep_path = "egrep";
char *egrep_opts = case_sensitive ? "-n" : "-in";
fname = concat_dir_and_file(directory, filename);
if (mc_stat(fname, &s) != 0 || !S_ISREG(s.st_mode)) {
g_free(fname);
return;
}
file_fd = mc_open(fname, O_RDONLY);
g_free(fname);
if (file_fd == -1)
return;
#ifndef GREP_STDIN
pipe =
mc_doublepopen(file_fd, -1, &pid, egrep_path, egrep_path, egrep_opts,
content_pattern, NULL);
#else /* GREP_STDIN */
pipe =
mc_doublepopen(file_fd, -1, &pid, egrep_path, egrep_path, egrep_opts,
content_pattern, "-", NULL);
#endif /* GREP STDIN */
if (pipe == -1) {
mc_close(file_fd);
return;
}
g_snprintf(buffer, sizeof(buffer), _("Grepping in %s"),
name_trunc(filename, FIND2_X_USE));
status_update(buffer);
mc_refresh();
p = buffer;
ignoring = 0;
enable_interrupt_key();
got_interrupt();
while ((i = read(pipe, &c, 1)) == 1) {
if (c == '\n') {
p = buffer;
ignoring = 0;
}
if (ignoring)
continue;
if (c == ':') {
char *the_name;
*p = 0;
ignoring = 1;
the_name = g_strconcat(buffer, ":", filename, NULL);
find_add_match(h, directory, the_name);
g_free(the_name);
} else {
if (p - buffer < (sizeof(buffer) - 1) && ISASCII(c) && isdigit(c))
*p++ = c;
else
*p = 0;
}
}
disable_interrupt_key();
if (i == -1)
message(1, _(" Find/read "), _(" Problem reading from child "));
mc_doublepclose(pipe, pid);
mc_close(file_fd);
}
static int do_search(struct Dlg_head *h)
{
static struct dirent *dp = 0;
static DIR *dirp = 0;
static char directory[MC_MAXPATHLEN + 2];
struct stat tmp_stat;
static int subdirs_left = 0;
char *tmp_name; /* For bulding file names */
if (!h) { /* someone forces me to close dirp */
if (dirp) {
mc_closedir(dirp);
dirp = 0;
}
dp = 0;
return 1;
}
while (!dp) {
if (dirp) {
mc_closedir(dirp);
dirp = 0;
}
while (!dirp) {
char *tmp;
while (1) {
tmp = pop_directory();
if (!tmp) {
running = 0;
status_update(_("Finished"));
stop_idle(h);
return 0;
}
if (find_ignore_dirs) {
int found;
char *temp_dir = g_strconcat(":", tmp, ":", NULL);
found = strstr(find_ignore_dirs, temp_dir) != 0;
g_free(temp_dir);
if (found)
g_free(tmp);
else
break;
} else
break;
}
strcpy(directory, tmp);
g_free(tmp);
if (verbose) {
char buffer[BUF_SMALL];
g_snprintf(buffer, sizeof(buffer), _("Searching %s"),
name_trunc(directory, FIND2_X_USE));
status_update(buffer);
}
/* mc_stat should not be called after mc_opendir
because vfs_s_opendir modifies the st_nlink
*/
mc_stat(directory, &tmp_stat);
subdirs_left = tmp_stat.st_nlink - 2;
/* Commented out as unnecessary
if (subdirs_left < 0)
subdirs_left = MAXINT;
*/
dirp = mc_opendir(directory);
}
dp = mc_readdir(dirp);
}
if (strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0) {
dp = mc_readdir(dirp);
return 1;
}
tmp_name = concat_dir_and_file(directory, dp->d_name);
if (subdirs_left) {
mc_lstat(tmp_name, &tmp_stat);
if (S_ISDIR(tmp_stat.st_mode)) {
push_directory(tmp_name);
subdirs_left--;
}
}
if (regexp_match(find_pattern, dp->d_name, match_file)) {
if (content_pattern)
search_content(h, directory, dp->d_name);
else
find_add_match(h, directory, dp->d_name);
}
g_free(tmp_name);
dp = mc_readdir(dirp);
/* Displays the nice dot */
count++;
x_flush_events();
return 1;
}
static void init_find_vars(void)
{
char *dir;
if (old_dir) {
g_free(old_dir);
old_dir = 0;
}
count = 0;
matches = 0;
/* Remove all the items in the stack */
while ((dir = pop_directory()) != NULL)
g_free(dir);
}
static void find_do_view_edit(int unparsed_view, int edit, char *dir, char *file)
{
char *fullname, *filename;
int line;
if (content_pattern) {
filename = strchr(file + 4, ':') + 1;
line = atoi(file + 4);
} else {
filename = file + 4;
line = 0;
}
if (dir[0] == '.' && dir[1] == 0)
fullname = g_strdup(filename);
else if (dir[0] == '.' && dir[1] == PATH_SEP)
fullname = concat_dir_and_file(dir + 2, filename);
else
fullname = concat_dir_and_file(dir, filename);
if (edit)
do_edit_at_line(fullname, line);
else
view_file_at_line(fullname, unparsed_view, use_internal_view, line);
g_free(fullname);
}
static void select_row(GtkCList * clist, gint row, gint column, GdkEvent * event)
{
gtk_widget_set_sensitive(g_edit, TRUE);
gtk_widget_set_sensitive(g_view, TRUE);
current_row = row;
}
static void find_do_chdir(void)
{
gtk_idle_remove(idle_tag);
idle_tag = 0;
stop = B_ENTER;
gtk_main_quit();
}
static void find_do_again(void)
{
gtk_idle_remove(idle_tag);
idle_tag = 0;
stop = B_AGAIN;
gtk_main_quit();
}
static void find_do_panelize(void)
{
gtk_idle_remove(idle_tag);
idle_tag = 0;
stop = B_PANELIZE;
gtk_main_quit();
}
static void find_start_stop(void)
{
if (is_start) {
idle_tag = gtk_idle_add((GtkFunction) do_search, g_find_dlg);
} else {
gtk_idle_remove(idle_tag);
idle_tag = 0;
}
gtk_label_set_text(GTK_LABEL(g_start_stop_label),
is_start ? _("Suspend") : _("Restart"));
is_start = !is_start;
status_update(is_start ? _("Stopped") : _("Searching"));
}
static void find_do_view(void)
{
char *file, *dir;
get_list_info(&file, &dir);
find_do_view_edit(0, 0, dir, file);
}
static void find_do_edit(void)
{
char *file, *dir;
get_list_info(&file, &dir);
find_do_view_edit(0, 1, dir, file);
}
static void setup_gui(void)
{
GtkWidget *sw, *b1, *b2;
GtkWidget *box, *box2;
g_find_dlg = gnome_dialog_new(_("Find file"), GNOME_STOCK_BUTTON_OK, NULL);
/* The buttons */
b1 = gtk_button_new_with_label(_("Change to this directory"));
b2 = gtk_button_new_with_label(_("Search again"));
g_start_stop_label = gtk_label_new(_("Suspend"));
g_start_stop = gtk_button_new();
gtk_container_add(GTK_CONTAINER(g_start_stop), g_start_stop_label);
g_view = gtk_button_new_with_label(_("View this file"));
g_edit = gtk_button_new_with_label(_("Edit this file"));
g_panelize = gtk_button_new_with_label(_("Send the results to a Panel"));
box = gtk_hbox_new(TRUE, GNOME_PAD);
gtk_box_pack_start(GTK_BOX(box), b1, 0, 1, 0);
gtk_box_pack_start(GTK_BOX(box), b2, 0, 1, 0);
gtk_box_pack_start(GTK_BOX(box), g_start_stop, 0, 1, 0);
/* RECOONECT _("Panelize contents"), */
/* _("View"),
_("Edit"), */
sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
g_clist = gtk_clist_new(1);
gtk_clist_set_selection_mode(GTK_CLIST(g_clist), GTK_SELECTION_SINGLE);
gtk_widget_set_usize(g_clist, -1, 200);
gtk_container_add(GTK_CONTAINER(sw), g_clist);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(g_find_dlg)->vbox), sw, TRUE, TRUE,
GNOME_PAD_SMALL);
current_row = -1;
stop = 0;
gtk_signal_connect(GTK_OBJECT(g_clist), "select_row", GTK_SIGNAL_FUNC(select_row),
NULL);
/*
* Connect the buttons
*/
gtk_signal_connect(GTK_OBJECT(b1), "clicked", GTK_SIGNAL_FUNC(find_do_chdir),
NULL);
gtk_signal_connect(GTK_OBJECT(b2), "clicked", GTK_SIGNAL_FUNC(find_do_again),
NULL);
gtk_signal_connect(GTK_OBJECT(g_start_stop), "clicked",
GTK_SIGNAL_FUNC(find_start_stop), NULL);
gtk_signal_connect(GTK_OBJECT(g_panelize), "clicked",
GTK_SIGNAL_FUNC(find_do_panelize), NULL);
/*
* View/edit buttons
*/
gtk_signal_connect(GTK_OBJECT(g_view), "clicked", GTK_SIGNAL_FUNC(find_do_view),
NULL);
gtk_signal_connect(GTK_OBJECT(g_edit), "clicked", GTK_SIGNAL_FUNC(find_do_edit),
NULL);
gtk_widget_set_sensitive(g_view, FALSE);
gtk_widget_set_sensitive(g_edit, FALSE);
box2 = gtk_hbox_new(1, GNOME_PAD + GNOME_PAD);
gtk_box_pack_start(GTK_BOX(box2), g_view, 0, 0, 0);
gtk_box_pack_start(GTK_BOX(box2), g_edit, 0, 0, 0);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(g_find_dlg)->vbox), box, TRUE, TRUE,
GNOME_PAD_SMALL);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(g_find_dlg)->vbox), box2, TRUE, TRUE,
GNOME_PAD_SMALL);
g_status_label = gtk_label_new(_("Searching"));
gtk_misc_set_alignment(GTK_MISC(g_status_label), 0.0, 0.5);
gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(g_find_dlg)->vbox), g_status_label, TRUE,
TRUE, GNOME_PAD_SMALL);
gtk_widget_show_all(g_find_dlg);
gtk_widget_hide(GTK_WIDGET(g_view));
gtk_widget_hide(GTK_WIDGET(g_edit));
}
static int run_process(void)
{
idle_tag = gtk_idle_add((GtkFunction) do_search, g_find_dlg);
gnome_dialog_run(GNOME_DIALOG(g_find_dlg));
g_start_stop = NULL;
return stop;
}
static void kill_gui(void)
{
gtk_object_destroy(GTK_OBJECT(g_find_dlg));
}
static void stop_idle(void *data)
{
if (g_start_stop)
gtk_widget_set_sensitive(GTK_WIDGET(g_start_stop), FALSE);
}
static void status_update(char *text)
{
gtk_label_set_text(GTK_LABEL(g_status_label), text);
x_flush_events();
}
static char *add_to_list(char *text, void *data)
{
int row;
char *texts[1];
texts[0] = text;
row = gtk_clist_append(GTK_CLIST(g_clist), texts);
gtk_clist_set_row_data(GTK_CLIST(g_clist), row, data);
#if 1
if (gtk_clist_row_is_visible(GTK_CLIST(g_clist), row) != GTK_VISIBILITY_FULL)
gtk_clist_moveto(GTK_CLIST(g_clist), row, 0, 0.5, 0.0);
#endif
return text;
}
static void get_list_info(char **file, char **dir)
{
if (current_row == -1)
*file = *dir = NULL;
gtk_clist_get_text(GTK_CLIST(g_clist), current_row, 0, file);
*dir = gtk_clist_get_row_data(GTK_CLIST(g_clist), current_row);
}
static int find_file(char *start_dir, char *pattern, char *content, char **dirname,
char **filename)
{
int return_value = 0;
char *dir;
char *dir_tmp, *file_tmp;
setup_gui();
/* FIXME: Need to cleanup this, this ought to be passed non-globaly */
find_pattern = pattern;
content_pattern = content;
init_find_vars();
push_directory(start_dir);
return_value = run_process();
/* Remove all the items in the stack */
while ((dir = pop_directory()) != NULL)
g_free(dir);
get_list_info(&file_tmp, &dir_tmp);
if (dir_tmp)
*dirname = g_strdup(dir_tmp);
if (file_tmp)
*filename = g_strdup(file_tmp);
kill_gui();
do_search(0); /* force do_search to release resources */
if (old_dir) {
g_free(old_dir);
old_dir = 0;
}
return return_value;
}
void do_find(void)
{
char *start_dir, *pattern, *content;
char *filename, *dirname;
int v, dir_and_file_set;
int done = 0;
while (!done) {
if (!find_parameters(&start_dir, &pattern, &content))
break;
dirname = filename = NULL;
is_start = 0;
v = find_file(start_dir, pattern, content, &dirname, &filename);
g_free(start_dir);
g_free(pattern);
if (v == B_ENTER) {
if (dirname || filename) {
if (dirname) {
do_cd(dirname, cd_exact);
if (filename)
try_to_select(cpanel,
filename +
(content
? (strchr
(filename + 4,
':') - filename +
1) : 4));
} else if (filename)
do_cd(filename, cd_exact);
paint_panel(cpanel);
select_item(cpanel);
}
if (dirname)
g_free(dirname);
if (filename)
g_free(filename);
break;
}
if (content)
g_free(content);
dir_and_file_set = dirname && filename;
if (dirname)
g_free(dirname);
if (filename)
g_free(filename);
if (v == B_CANCEL)
break;
if (v == B_PANELIZE) {
if (dir_and_file_set) {
try_to_select(cpanel, NULL);
paint_panel(cpanel);
}
break;
}
}
}

View File

@ -1,612 +1,4 @@
[display-Widget-cancel-button]
geometry=4,10,1,1
flags=
[display-Widget-ok-button]
geometry=2,10,1,1
flags=
[display-Frame-Frame-0]
geometry=0,0,6,5
flags=snew
text=File listing mode
[display-Frame-Frame-1]
geometry=0,5,6,4
flags=snew
text=Mini info display format
[display-Widget-mini-input]
geometry=4,7,1,1
flags=w
[display-Widget-user-fmt-input]
geometry=4,2,1,1
flags=s
[display-Widget-mini-status]
geometry=2,7,1,1
flags=w
[display-Widget-radio]
geometry=2,2,1,1
flags=
[quick_input-Widget-button-cancel]
geometry=5,4,1,1
flags=ew
[quick_input-Widget-button-ok]
geometry=3,4,1,1
flags=ew
[quick_input-Widget-label]
geometry=2,2,5,1
flags=w
[quick_input-Widget-inp]
geometry=2,3,5,1
flags=ew
[findfile-Widget-tree]
geometry=4,6,1,1
flags=ns
[findfile-Widget-ok]
geometry=3,6,1,1
flags=
[findfile-Widget-start]
geometry=3,2,3,1
flags=ew
[findfile-Widget-content]
geometry=3,4,3,1
flags=ew
[findfile-Widget-name]
geometry=3,3,3,1
flags=ew
[findfile-Widget-label-file]
geometry=2,3,1,1
flags=e
[findfile-Widget-label-cont]
geometry=2,4,1,1
flags=e
[findfile-Widget-cancel]
geometry=5,6,1,1
flags=
[findfile-Widget-label-start]
geometry=2,2,1,1
flags=
[findfile-Widget-find-case-check]
geometry=3,5,1,1
flags=
[hotlist-Widget-e]
geometry=3,12,1,1
flags=ew
[hotlist-Widget-up]
geometry=4,11,1,1
flags=ew
[hotlist-Widget-move]
geometry=5,12,1,1
flags=
[hotlist-Widget-r]
geometry=4,12,1,1
flags=
[hotlist-Widget-g]
geometry=2,12,1,1
flags=
[hotlist-Widget-cc]
geometry=12,11,1,1
flags=
[hotlist-Widget-ct]
geometry=2,11,1,1
flags=
[hotlist-Widget-ad]
geometry=3,11,1,1
flags=
[hotlist-Widget-the-lab]
geometry=2,8,15,1
flags=w
[hotlist-Widget-listbox]
geometry=2,2,12,3
flags=snew
[hotlist-Frame-Frame-0]
geometry=0,0,15,6
flags=snew
text=Group
[hotlist-Frame-Frame-1]
geometry=0,6,15,4
flags=snew
text=Directory path
[option-Widget-button-ok]
geometry=2,16,1,1
flags=
[option-Widget-safe-del]
geometry=5,14,1,1
flags=w
[option-Widget-shell-patt]
geometry=5,4,1,1
flags=w
[option-Widget-auto-save]
geometry=5,5,1,1
flags=w
[option-Widget-drop-menus]
geometry=2,5,2,1
flags=w
[option-Widget-edit-int]
geometry=5,7,1,1
flags=w
[option-Widget-button-save]
geometry=3,16,2,1
flags=ew
[option-Widget-lynx]
geometry=5,11,1,1
flags=w
[option-Widget-fast-reload]
geometry=2,7,1,1
flags=w
[option-Widget-view-int]
geometry=5,8,1,1
flags=w
[option-Widget-completion]
geometry=5,9,1,1
flags=w
[option-Widget-achown]
geometry=5,12,1,1
flags=w
[option-Widget-show-hidden]
geometry=2,3,2,1
flags=w
[option-Widget-mark-moves]
geometry=2,4,2,1
flags=w
[option-Widget-verbose]
geometry=5,2,1,1
flags=w
[option-Widget-compute-totals]
geometry=5,3,1,1
flags=w
[option-Widget-mix-files]
geometry=2,6,2,1
flags=w
[option-Widget-auto-menus]
geometry=5,6,1,1
flags=w
[option-Widget-button-cancel]
geometry=5,16,1,1
flags=
[option-Widget-dummy]
geometry=5,10,1,1
flags=w
[option-Widget-cd-follow]
geometry=5,13,1,1
flags=w
[option-Widget-show-backup]
geometry=2,2,2,1
flags=w
[option-Widget-pause-radio]
geometry=2,11,2,5
flags=nw
[option-Frame-Frame-1]
geometry=4,0,4,16
flags=snew
text=Other options
[option-Frame-Frame-0]
geometry=0,0,4,9
flags=snew
text=Panel options
[quick_file_mask_copy-Frame-Frame-0]
geometry=0,0,9,12
flags=snew
text=File copy
[quick_file_mask_copy-Widget-dive]
geometry=6,8,2,1
flags=w
[quick_file_mask_copy-Widget-ql]
geometry=2,2,5,1
flags=w
[quick_file_mask_copy-Widget-stab-sym]
geometry=6,9,2,1
flags=w
[quick_file_mask_copy-Widget-using-shell]
geometry=2,4,2,1
flags=w
[quick_file_mask_copy-Widget-preserve]
geometry=2,9,2,1
flags=w
[quick_file_mask_copy-Widget-follow]
geometry=2,8,2,1
flags=w
[quick_file_mask_copy-Widget-to]
geometry=2,6,1,1
flags=w
[quick_file_mask_copy-Widget-ok]
geometry=2,10,2,1
flags=
[quick_file_mask_copy-Widget-back]
geometry=4,10,1,1
flags=w
[quick_file_mask_copy-Widget-input-def]
geometry=2,3,6,1
flags=ew
[quick_file_mask_copy-Widget-input2]
geometry=2,7,6,1
flags=ew
[quick_file_mask_copy-Widget-cancel]
geometry=6,10,2,1
flags=
[quick_file_mask_move-Frame-Frame-0]
geometry=0,0,7,13
flags=snew
text=File move
[quick_file_mask_move-Widget-cancel]
geometry=5,10,1,1
flags=
[quick_file_mask_move-Widget-stab-sym]
geometry=2,8,2,1
flags=w
[quick_file_mask_move-Widget-dive]
geometry=2,7,2,1
flags=w
[quick_file_mask_move-Widget-to]
geometry=2,5,1,1
flags=w
[quick_file_mask_move-Widget-using-shell]
geometry=2,4,2,1
flags=w
[quick_file_mask_move-Widget-back]
geometry=3,10,1,1
flags=
[quick_file_mask_move-Widget-input2]
geometry=2,6,4,1
flags=ew
[quick_file_mask_move-Widget-ql]
geometry=2,2,4,1
flags=w
[quick_file_mask_move-Widget-input-def]
geometry=2,3,4,1
flags=ew
[quick_file_mask_move-Widget-ok]
geometry=2,10,1,1
flags=
[opwin-Widget-abort]
geometry=3,5,1,1
flags=
[opwin-Widget-skip]
geometry=1,5,1,1
flags=
[opwin-Widget-eta_label]
geometry=4,4,1,1
flags=
[opwin-Widget-stalled]
geometry=4,3,1,1
flags=
[opwin-Widget-bps-label]
geometry=4,2,1,1
flags=
[opwin-Widget-g-1]
geometry=1,2,3,1
flags=ew
[opwin-Widget-fs-x-1]
geometry=1,1,7,1
flags=w
[opwin-Widget-fs-x-2]
geometry=0,1,1,1
flags=
[opwin-Widget-fs-l-1]
geometry=1,0,7,1
flags=w
[opwin-Widget-fs-l-2]
geometry=0,0,1,1
flags=
[opwin-Widget-g-3]
geometry=1,4,3,1
flags=ew
[opwin-Widget-g-2]
geometry=1,3,3,1
flags=ew
[opwin-Widget-l-3]
geometry=0,4,1,1
flags=
[opwin-Widget-l-2]
geometry=0,3,1,1
flags=
[opwin-Widget-l-1]
geometry=0,2,1,1
flags=
[replace-Widget-abort]
geometry=3,9,1,1
flags=ew
[replace-Widget-reget]
geometry=5,6,1,1
flags=ew
[replace-Widget-none]
geometry=4,7,1,1
flags=ew
[replace-Widget-no]
geometry=3,6,1,1
flags=ew
[replace-Widget-all]
geometry=2,7,1,1
flags=ew
[replace-Widget-source-date]
geometry=1,3,6,1
flags=w
[replace-Widget-target-date]
geometry=1,4,6,1
flags=w
[replace-Widget-target-e]
geometry=1,1,6,1
flags=w
[replace-Widget-append]
geometry=4,6,1,1
flags=
[replace-Widget-if-size]
geometry=5,7,1,1
flags=
[replace-Widget-update]
geometry=3,7,1,1
flags=
[replace-Widget-yes]
geometry=2,6,1,1
flags=
[replace-Widget-over-label]
geometry=1,7,1,1
flags=
[replace-Widget-overlab]
geometry=1,6,1,1
flags=ew
[mfind-Widget-listbox]
geometry=0,0,6,3
flags=snew
[mfind-Widget-button-edit]
geometry=2,5,1,1
flags=ew
[mfind-Widget-button-view]
geometry=1,5,1,1
flags=ew
[mfind-Widget-button-quit]
geometry=4,4,1,1
flags=
[mfind-Widget-button-again]
geometry=1,4,1,1
flags=ew
[mfind-Widget-button-panelize]
geometry=0,5,1,1
flags=ew
[mfind-Widget-start-stop]
geometry=2,4,1,1
flags=ew
[mfind-Widget-label-search]
geometry=0,3,7,1
flags=w
[mfind-Widget-button-chdir]
geometry=0,4,1,1
flags=ew
[quick_confirm-Widget-c]
geometry=3,2,1,1
flags=ew
[quick_confirm-Widget-o]
geometry=3,1,1,1
flags=ew
[quick_confirm-Widget-x]
geometry=1,3,1,1
flags=w
[quick_confirm-Widget-de]
geometry=1,1,1,1
flags=w
[quick_confirm-Widget-ov]
geometry=1,2,1,1
flags=w
[quick_confirm-Widget-e]
geometry=1,4,1,1
flags=w
[quick_vfs-Widget-label-vfs]
geometry=1,1,1,1
flags=w
[quick_vfs-Widget-input-timo-vfs]
geometry=2,1,1,1
flags=
[quick_vfs-Widget-label-pass]
geometry=1,2,1,1
flags=w
[quick_vfs-Widget-button-ok]
geometry=5,1,1,1
flags=ew
[quick_vfs-Widget-input-ftp-proxy]
geometry=2,4,1,1
flags=
[quick_vfs-Widget-label-cache]
geometry=1,3,1,1
flags=w
[quick_vfs-Widget-input-timeout]
geometry=2,3,1,1
flags=
[quick_vfs-Widget-check-ftp-proxy]
geometry=1,4,1,1
flags=w
[quick_vfs-Widget-input-passwd]
geometry=2,2,1,1
flags=
[quick_vfs-Widget-label-sec]
geometry=3,3,1,1
flags=
[quick_vfs-Widget-button-cancel]
geometry=5,2,1,1
flags=ew
[quick_vfs-Widget-label-sec2]
geometry=3,1,1,1
flags=
[sort-Widget-case-check]
geometry=3,2,1,1
flags=w
[sort-Widget-ok-button]
geometry=4,1,1,1
flags=ew
[sort-Widget-reverse-check]
geometry=3,1,1,1
flags=w
[sort-Widget-cancel-button]
geometry=4,2,1,1
flags=ew
[sort-Widget-radio-1]
geometry=1,1,1,6
flags=n
[quick_symlink-Widget-input-2]
geometry=0,2,7,1
flags=ew
[quick_symlink-Widget-input-1]
geometry=0,4,7,1
flags=ew
[quick_symlink-Widget-label-1]
geometry=0,1,7,1
flags=w
[quick_symlink-Widget-label-2]
geometry=0,3,7,1
flags=
[quick_symlink-Widget-ok]
geometry=2,6,1,1
flags=ew
[quick_symlink-Widget-cancel]
geometry=4,6,1,1
flags=
[panelize-Widget-l]
geometry=1,4,1,1
flags=
@ -635,119 +27,6 @@ flags=w
geometry=0,2,6,1
flags=ew
[vfshot-Frame-Frame-0]
geometry=0,2,8,5
flags=snew
text=Directory path
[vfshot-Widget-ct]
geometry=2,7,1,1
flags=
[vfshot-Widget-cc]
geometry=4,7,1,1
flags=
[vfshot-Widget-the-lab]
geometry=2,5,4,1
flags=w
[vfshot-Widget-listbox]
geometry=1,0,5,1
flags=ew
[jobs-Widget-button-ok]
geometry=11,2,1,1
flags=
[jobs-Widget-listbox]
geometry=0,0,14,1
flags=ew
[jobs-Widget-button-cont]
geometry=2,2,1,1
flags=
[jobs-Widget-button-kill]
geometry=3,2,1,1
flags=
[jobs-Widget-button-stop]
geometry=1,2,1,1
flags=
[hotlist_new_group-Widget-input]
geometry=0,2,6,1
flags=ew
[hotlist_new_group-Widget-button-cancel]
geometry=4,4,1,1
flags=
[hotlist_new_group-Widget-button-insert]
geometry=1,4,1,1
flags=
[hotlist_new_group-Widget-button-append]
geometry=0,4,1,1
flags=
[hotlist_new_group-Widget-label]
geometry=0,1,1,1
flags=w
[hotlist_new_entry-Widget-button-cancel]
geometry=4,6,1,1
flags=
[hotlist_new_entry-Widget-button-insert]
geometry=2,6,1,1
flags=
[hotlist_new_entry-Widget-button-append]
geometry=0,6,1,1
flags=
[hotlist_new_entry-Widget-label-lbl]
geometry=0,1,1,1
flags=w
[hotlist_new_entry-Widget-label-pth]
geometry=0,3,1,1
flags=w
[hotlist_new_entry-Widget-input-lbl]
geometry=0,2,7,1
flags=ew
[hotlist_new_entry-Widget-input-pth]
geometry=0,4,7,1
flags=ew
[movelist-Widget-ct]
geometry=0,4,1,1
flags=ew
[movelist-Widget-up]
geometry=4,4,1,1
flags=ew
[movelist-Widget-g]
geometry=0,5,1,1
flags=ew
[movelist-Widget-e]
geometry=1,5,1,1
flags=ew
[movelist-Widget-cc]
geometry=5,4,1,1
flags=ew
[movelist-Widget-listbox]
geometry=0,0,9,1
flags=ew
[smbauthinfo-Widget-auth_name]
geometry=3,2,1,1
flags=