* TODO: Remove Tk-related entries.
* boxes.c [HAVE_TK]: Remove. Don't need INPUT_INDEX anymore. * screen.c [HAVE_TK]: Remove. (panel_event): Made static. * chmod.c [HAVE_TK]: Remove. * cmd.c [HAVE_TK]: Likewise. * help.c [HAVE_TK]: Likewise. * hotlist.c [HAVE_TK]: Likewise. * info.c [HAVE_TK]: Likewise. * view.c [HAVE_TK]: Likewise. * view.h [HAVE_TK]: Likewise. * widget.c [HAVE_TK]: Likewise. * wtools.c [HAVE_TK]: Likewise.
Этот коммит содержится в:
родитель
944d5416c0
Коммит
5f8add985b
@ -1,5 +1,19 @@
|
||||
2001-05-18 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* TODO: Remove Tk-related entries.
|
||||
* boxes.c [HAVE_TK]: Remove. Don't need INPUT_INDEX anymore.
|
||||
* screen.c [HAVE_TK]: Remove.
|
||||
(panel_event): Made static.
|
||||
* chmod.c [HAVE_TK]: Remove.
|
||||
* cmd.c [HAVE_TK]: Likewise.
|
||||
* help.c [HAVE_TK]: Likewise.
|
||||
* hotlist.c [HAVE_TK]: Likewise.
|
||||
* info.c [HAVE_TK]: Likewise.
|
||||
* view.c [HAVE_TK]: Likewise.
|
||||
* view.h [HAVE_TK]: Likewise.
|
||||
* widget.c [HAVE_TK]: Likewise.
|
||||
* wtools.c [HAVE_TK]: Likewise.
|
||||
|
||||
* TODO: Remove XView-related entries.
|
||||
* menu.h [HAVE_XVIEW]: Remove all XView-related code.
|
||||
|
||||
|
45
src/TODO
45
src/TODO
@ -21,51 +21,6 @@
|
||||
ii) define a sequence, which is a prefix of other longer and already
|
||||
defined sequence
|
||||
|
||||
* Tk/mc
|
||||
|
||||
- Add drag and drop.
|
||||
|
||||
- Fix viewer.
|
||||
|
||||
- Fix WInputs (they currently are not very well coordinated with Tk's entry)
|
||||
|
||||
- Fix problem with enter/enter on most dialogs (should be just one enter).
|
||||
|
||||
- Fix the auto-reload dir problem with the little shortcut option.
|
||||
|
||||
- Change the menus for the Tk version.
|
||||
|
||||
- name_trunc the pathname on top of the panels.
|
||||
|
||||
- Click on the pathname should take you to that directory.
|
||||
|
||||
- Viewer breaks with object libraries prev_color is miss computed.
|
||||
|
||||
- Tk/Winfo: The program should not recompute the file system information
|
||||
for each file, it should keep a cache
|
||||
|
||||
- The control of the buttonbar is broken in Tk, try quick view and
|
||||
then press F3 when focusing the Quick view. It does not change
|
||||
the labels on the buttonbar.
|
||||
|
||||
- UNLINK the file as soon as the ftpfs gets an error during write.
|
||||
|
||||
- Port the WTree and WHelp widgets.
|
||||
|
||||
- The current size detection for the widgets will only work if there
|
||||
was a panel before (they assume winfo width/height container does
|
||||
have useful information), I should encapsulate and fix this.
|
||||
|
||||
- Change of the listing mode is broken.
|
||||
|
||||
- The mini status has not been coded.
|
||||
|
||||
- menubar_arrange, destroy_menu: implement
|
||||
|
||||
- Port the interal editor
|
||||
|
||||
- the interal editor adds it's entries to the wrong menu
|
||||
|
||||
* Configuration
|
||||
|
||||
* Documentation
|
||||
|
59
src/boxes.c
59
src/boxes.c
@ -721,13 +721,6 @@ cd_dialog (void)
|
||||
{
|
||||
QuickDialog Quick_input;
|
||||
QuickWidget quick_widgets [] = {
|
||||
#ifdef HAVE_TK
|
||||
#define INPUT_INDEX 2
|
||||
{ quick_button, 0, 1, 0, 1, N_("&Cancel"), 0, B_CANCEL, 0, 0, "cancel" },
|
||||
{ quick_button, 0, 1, 0, 1, N_("&Ok"), 0, B_ENTER, 0, 0, "ok" },
|
||||
#else
|
||||
#define INPUT_INDEX 0
|
||||
#endif
|
||||
{ quick_input, 6, 57, 5, 0, "", 50, 0, 0, 0, "input" },
|
||||
{ quick_label, 3, 57, 2, 0, "", 0, 0, 0, 0, "label" },
|
||||
{ 0 } };
|
||||
@ -739,31 +732,31 @@ cd_dialog (void)
|
||||
Quick_input.title = _("Quick cd");
|
||||
Quick_input.help = "[Quick cd]";
|
||||
Quick_input.class = "quick_input";
|
||||
quick_widgets [INPUT_INDEX].text = "";
|
||||
quick_widgets [INPUT_INDEX].value = 2; /* want cd like completion */
|
||||
quick_widgets [INPUT_INDEX+1].text = _("cd");
|
||||
quick_widgets [INPUT_INDEX+1].y_divisions =
|
||||
quick_widgets [INPUT_INDEX].y_divisions = Quick_input.ylen = 5;
|
||||
quick_widgets [0].text = "";
|
||||
quick_widgets [0].value = 2; /* want cd like completion */
|
||||
quick_widgets [1].text = _("cd");
|
||||
quick_widgets [1].y_divisions =
|
||||
quick_widgets [0].y_divisions = Quick_input.ylen = 5;
|
||||
|
||||
len = strlen (quick_widgets [INPUT_INDEX+1].text);
|
||||
len = strlen (quick_widgets [1].text);
|
||||
|
||||
quick_widgets [INPUT_INDEX+1].relative_x = 3;
|
||||
quick_widgets [INPUT_INDEX].relative_x =
|
||||
quick_widgets [INPUT_INDEX+1].relative_x + len + 1;
|
||||
quick_widgets [1].relative_x = 3;
|
||||
quick_widgets [0].relative_x =
|
||||
quick_widgets [1].relative_x + len + 1;
|
||||
|
||||
Quick_input.xlen = len + quick_widgets [INPUT_INDEX].hotkey_pos + 7;
|
||||
quick_widgets [INPUT_INDEX].x_divisions =
|
||||
quick_widgets [INPUT_INDEX+1].x_divisions = Quick_input.xlen;
|
||||
Quick_input.xlen = len + quick_widgets [0].hotkey_pos + 7;
|
||||
quick_widgets [0].x_divisions =
|
||||
quick_widgets [1].x_divisions = Quick_input.xlen;
|
||||
|
||||
Quick_input.i18n = 1;
|
||||
Quick_input.xpos = 2;
|
||||
Quick_input.ypos = LINES - 2 - Quick_input.ylen;
|
||||
quick_widgets [INPUT_INDEX].relative_y = 2;
|
||||
quick_widgets [INPUT_INDEX].str_result = &my_str;
|
||||
quick_widgets [0].relative_y = 2;
|
||||
quick_widgets [0].str_result = &my_str;
|
||||
|
||||
Quick_input.widgets = quick_widgets;
|
||||
if (quick_dialog (&Quick_input) != B_CANCEL){
|
||||
return *(quick_widgets [INPUT_INDEX].str_result);
|
||||
return *(quick_widgets [0].str_result);
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
@ -774,16 +767,6 @@ symlink_dialog (char *existing, char *new, char **ret_existing, char **ret_new)
|
||||
{
|
||||
QuickDialog Quick_input;
|
||||
QuickWidget quick_widgets [] = {
|
||||
#undef INPUT_INDEX
|
||||
#if defined(HAVE_TK)
|
||||
#define INPUT_INDEX 2
|
||||
{ quick_button, 0, 1, 0, 1, _("&Cancel"), 0, B_CANCEL, 0, 0,
|
||||
"cancel" },
|
||||
{ quick_button, 0, 1, 0, 1, _("&Ok"), 0, B_ENTER, 0, 0,
|
||||
"ok" },
|
||||
#else
|
||||
#define INPUT_INDEX 0
|
||||
#endif
|
||||
{ quick_input, 4, 80, 5, 8, "", 58, 0, 0, 0, "input-1" },
|
||||
{ quick_label, 4, 80, 4, 8, "", 0, 0, 0, 0, "label-1" },
|
||||
{ quick_input, 4, 80, 3, 8, "", 58, 0, 0, 0, "input-2" },
|
||||
@ -796,13 +779,13 @@ symlink_dialog (char *existing, char *new, char **ret_existing, char **ret_new)
|
||||
Quick_input.help = "[File Menu]";
|
||||
Quick_input.class = "quick_symlink";
|
||||
Quick_input.i18n = 0;
|
||||
quick_widgets [INPUT_INDEX].text = new;
|
||||
quick_widgets [INPUT_INDEX+1].text = _("Symbolic link filename:");
|
||||
quick_widgets [INPUT_INDEX+2].text = existing;
|
||||
quick_widgets [INPUT_INDEX+3].text = _("Existing filename (filename symlink will point to):");
|
||||
quick_widgets [0].text = new;
|
||||
quick_widgets [1].text = _("Symbolic link filename:");
|
||||
quick_widgets [2].text = existing;
|
||||
quick_widgets [3].text = _("Existing filename (filename symlink will point to):");
|
||||
Quick_input.xpos = -1;
|
||||
quick_widgets [INPUT_INDEX].str_result = ret_new;
|
||||
quick_widgets [INPUT_INDEX+2].str_result = ret_existing;
|
||||
quick_widgets [0].str_result = ret_new;
|
||||
quick_widgets [2].str_result = ret_existing;
|
||||
|
||||
Quick_input.widgets = quick_widgets;
|
||||
if (quick_dialog (&Quick_input) == B_CANCEL){
|
||||
|
@ -46,10 +46,6 @@
|
||||
#include "chown.h"
|
||||
#include "../vfs/vfs.h"
|
||||
|
||||
#ifdef HAVE_TK
|
||||
# include "tkmain.h"
|
||||
#endif
|
||||
|
||||
static int single_set;
|
||||
struct Dlg_head *ch_dlg;
|
||||
|
||||
|
@ -89,10 +89,6 @@
|
||||
# define MAP_FILE 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TK
|
||||
# include "tkscreen.h"
|
||||
#endif
|
||||
|
||||
/* If set and you don't have subshell support,then C-o will give you a shell */
|
||||
int output_starts_shell = 0;
|
||||
|
||||
|
@ -54,10 +54,6 @@
|
||||
#include "dlg.h" /* For Dlg_head */
|
||||
#include "widget.h" /* For Widget */
|
||||
|
||||
#ifdef HAVE_TK
|
||||
# include "tkmain.h"
|
||||
#endif
|
||||
|
||||
#define MAXLINKNAME 80
|
||||
#define HISTORY_SIZE 20
|
||||
#define HELP_WINDOW_WIDTH 62
|
||||
|
@ -68,10 +68,6 @@
|
||||
#include "key.h"
|
||||
#include "command.h"
|
||||
|
||||
#ifdef HAVE_TK
|
||||
# include "tkwidget.h"
|
||||
#endif
|
||||
|
||||
#define UX 5
|
||||
#define UY 2
|
||||
|
||||
|
@ -35,11 +35,6 @@
|
||||
#include "key.h" /* is_idle() */
|
||||
#include "x.h"
|
||||
|
||||
#ifdef HAVE_TK
|
||||
# include "tkmain.h"
|
||||
# include "tkinfo.h"
|
||||
#endif
|
||||
|
||||
#ifndef VERSION
|
||||
# define VERSION "undefined"
|
||||
#endif
|
||||
|
11
src/screen.c
11
src/screen.c
@ -84,7 +84,7 @@ WPanel *the_info_panel = 0;
|
||||
Hook *select_file_hook = 0;
|
||||
|
||||
static int panel_callback (Dlg_head *h, WPanel *p, int Msg, int Par);
|
||||
int panel_event (Gpm_Event *event, WPanel *panel);
|
||||
static int panel_event (Gpm_Event *event, WPanel *panel);
|
||||
|
||||
#ifndef PORT_HAS_PANEL_ADJUST_TOP_FILE
|
||||
# define x_adjust_top_file(p)
|
||||
@ -1503,14 +1503,10 @@ mini_status_format (WPanel *panel)
|
||||
int
|
||||
ITEMS (WPanel *p)
|
||||
{
|
||||
#ifdef HAVE_TK
|
||||
return p->widget.lines;
|
||||
#else
|
||||
if (p->split)
|
||||
return llines (p) * 2;
|
||||
else
|
||||
return llines (p);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This function sets redisplays the selection */
|
||||
@ -2511,8 +2507,7 @@ get_sort_fn (char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* not static because it's called from Tk's version */
|
||||
int
|
||||
static int
|
||||
panel_event (Gpm_Event *event, WPanel *panel)
|
||||
{
|
||||
const int lines = panel->count;
|
||||
@ -2562,7 +2557,7 @@ panel_event (Gpm_Event *event, WPanel *panel)
|
||||
|
||||
#else
|
||||
|
||||
int
|
||||
static int
|
||||
panel_event (Gpm_Event *event, WPanel *panel)
|
||||
{
|
||||
const int lines = llines (panel);
|
||||
|
@ -767,13 +767,11 @@ view_display_clean (WView *view, int height, int width)
|
||||
#define view_gotoyx(v,r,c) widget_move (v,r,c)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TK
|
||||
/* Both the text mode and gnome editions use this */
|
||||
#define BOLD_COLOR MARKED_COLOR
|
||||
#define UNDERLINE_COLOR VIEW_UNDERLINED_COLOR
|
||||
#define MARK_COLOR SELECTED_COLOR
|
||||
#define DEF_COLOR NORMAL_COLOR
|
||||
#endif
|
||||
|
||||
#ifndef PORT_HAS_VIEW_FREEZE
|
||||
# define view_freeze(view)
|
||||
@ -1030,9 +1028,6 @@ display (WView *view)
|
||||
if (view->growing_buffer && from+1 == view->last_byte)
|
||||
get_byte (view, from+1);
|
||||
}
|
||||
#ifdef HAVE_TK
|
||||
view_gotoyx (view, view->current_line+1, 0);
|
||||
#endif
|
||||
}
|
||||
view->last = from;
|
||||
view_thaw (view);
|
||||
|
@ -151,13 +151,6 @@ struct hexedit_change_node {
|
||||
unsigned char value;
|
||||
};
|
||||
|
||||
#ifdef HAVE_TK
|
||||
#define DEF_COLOR 0
|
||||
#define BOLD_COLOR 1
|
||||
#define UNDERLINE_COLOR 2
|
||||
#define MARK_COLOR 3
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_X
|
||||
#ifdef WANT_WIDGETS
|
||||
void view_add_character (WView *view, int c);
|
||||
|
15
src/widget.c
15
src/widget.c
@ -385,16 +385,6 @@ radio_callback (Dlg_head *h, WRadio *r, int Msg, int Par)
|
||||
return default_proc (h, Msg, Par);
|
||||
}
|
||||
|
||||
#ifdef HAVE_TK
|
||||
static void Radio_destroy (WRadio *r)
|
||||
{
|
||||
x_destroy_cmd (r);
|
||||
}
|
||||
# define radio_destroy (destroy_fn) Radio_destroy
|
||||
#else
|
||||
# define radio_destroy 0
|
||||
#endif
|
||||
|
||||
static int
|
||||
radio_event (Gpm_Event *event, WRadio *r)
|
||||
{
|
||||
@ -430,7 +420,7 @@ radio_new (int y, int x, int count, char **texts, int use_hotkey, char *tkname)
|
||||
}
|
||||
|
||||
init_widget (&r->widget, y, x, count, max, (callback_fn) radio_callback,
|
||||
radio_destroy, (mouse_h) radio_event, tkname);
|
||||
0, (mouse_h) radio_event, tkname);
|
||||
r->state = 1;
|
||||
r->pos = 0;
|
||||
r->sel = 0;
|
||||
@ -1594,9 +1584,6 @@ handle_char (WInput *in, int c_code)
|
||||
|
||||
v = 0;
|
||||
|
||||
#ifdef HAVE_TK
|
||||
in->inserted_one = 0;
|
||||
#endif
|
||||
if (quote){
|
||||
free_completions (in);
|
||||
v = insert_char (in, c_code);
|
||||
|
10
src/wtools.c
10
src/wtools.c
@ -290,14 +290,8 @@ int query_dialog (char *header, char *text, int flags, int count, ...)
|
||||
_("&Ok"), 0, 0, NULL));
|
||||
|
||||
add_widget (query_dlg, label_new (2, 3, text, NULL));
|
||||
#ifdef HAVE_TK
|
||||
if (flags & D_INSERT){
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
run_dlg (query_dlg);
|
||||
destroy_dlg (query_dlg);
|
||||
}
|
||||
run_dlg (query_dlg);
|
||||
destroy_dlg (query_dlg);
|
||||
#else
|
||||
add_widget (query_dlg, label_new (2, 3, text, NULL));
|
||||
add_widget (query_dlg, button_new(0, 0, 0, HIDDEN_BUTTON, "-", 0, 0, NULL));
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user