TTY: moved repaint_screen() from src/main.[ch] to src/layout.[ch].

Fixed includes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2009-07-19 19:00:26 +04:00
parent 509f4d5c4f
commit bd0d344802
12 changed files with 25 additions and 27 deletions

View File

@ -47,7 +47,8 @@
#include "dir.h"
#include "panel.h" /* Needed for the externs */
#include "chmod.h"
#include "main.h"
#include "main.h" /* update_panels() */
#include "layout.h" /* repaint_screen() */
#include "achown.h"
#define BX 5

View File

@ -46,6 +46,7 @@
#include "global.h"
#include "background.h"
#include "wtools.h"
#include "layout.h" /* repaint_screen() */
#include "fileopctx.h" /* FileOpContext */
#include "../src/tty/key.h" /* add_select_channel(), delete_select_channel() */

View File

@ -41,6 +41,7 @@
#include "wtools.h" /* message() */
#include "panel.h" /* do_file_mark() */
#include "main.h" /* update_panels() */
#include "layout.h" /* repaint_screen() */
#include "chmod.h"
#include "strutil.h"

View File

@ -45,7 +45,8 @@
#include "dir.h"
#include "panel.h" /* Needed for the externs */
#include "chmod.h"
#include "main.h"
#include "main.h" /* update_panels() */
#include "layout.h" /* repaint_screen() */
#include "chown.h"
#include "wtools.h" /* For init_box_colors */

View File

@ -52,7 +52,8 @@
#include "../src/mcconfig/mcconfig.h" /* Load/save directories hotlist */
#include "wtools.h" /* QuickDialog */
#include "panel.h" /* current_panel */
#include "main.h" /* repaint_screen */
#include "main.h" /* update_panels() */
#include "layout.h" /* repaint_screen() */
#include "hotlist.h"
#include "command.h" /* cmdline */
#include "glibcompat.h" /* g_strlcpy for glib < 2.0 */

View File

@ -575,6 +575,14 @@ clr_scr (void)
tty_refresh ();
}
void
repaint_screen (void)
{
do_refresh ();
tty_touch_screen ();
tty_refresh ();
}
static void
panel_do_cols (int index)
{
@ -737,8 +745,7 @@ change_screen_size (void)
#endif
/* Now, force the redraw */
do_refresh ();
tty_touch_screen ();
repaint_screen ();
#endif /* TIOCGWINSZ */
#endif /* defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4 */
}

View File

@ -32,6 +32,7 @@ void set_hintbar (const char *str);
/* Clear screen */
void clr_scr (void);
void repaint_screen (void);
extern int winch_flag;
extern int equal_split;

View File

@ -43,7 +43,8 @@
#include "widget.h"
#include "../src/mcconfig/mcconfig.h" /* Save profile */
#include "setup.h"
#include "main.h"
#include "main.h" /* alternate_plus_minus */
#include "layout.h" /* repaint_screen() */
#include "learn.h"
#include "wtools.h"
#include "strutil.h"

View File

@ -47,6 +47,7 @@
#include "dir.h"
#include "panel.h" /* Needed for the externs */
#include "file.h"
#include "layout.h" /* repaint_screen() */
#include "main.h"
#include "listmode.h"

View File

@ -528,21 +528,6 @@ quiet_quit_cmd (void)
quit_cmd_internal (1);
}
/*
* Touch window and refresh window functions
*/
/* This routine untouches the first line on both panels in order */
/* to avoid the refreshing the menu bar */
void
repaint_screen (void)
{
do_refresh ();
tty_touch_screen ();
tty_refresh ();
}
/* Wrapper for do_subshell_chdir, check for availability of subshell */
void
subshell_chdir (const char *directory)

View File

@ -6,10 +6,6 @@
#ifndef MC_MAIN_H
#define MC_MAIN_H
#include "menu.h"
#include "panel.h"
#include "widget.h"
/* Toggling functions */
void toggle_fast_reload (void);
void toggle_mix_all_files (void);
@ -91,7 +87,6 @@ typedef struct {
} key_map;
void update_panels (int force_update, const char *current_file);
void repaint_screen (void);
void do_update_prompt (void);
enum cd_enum {
@ -128,6 +123,8 @@ char *remove_encoding_from_path (const char *);
#define MC_BASE "/.mc/"
struct WPanel;
void directory_history_add (struct WPanel *panel, const char *dir);
int do_panel_cd (struct WPanel *panel, const char *new_dir, enum cd_enum cd_type);

View File

@ -44,7 +44,8 @@
#include "../src/mcconfig/mcconfig.h" /* Load/save directories panelize */
#include "dir.h"
#include "panel.h" /* current_panel */
#include "main.h" /* repaint_screen */
#include "layout.h" /* repaint_screen() */
#include "main.h"
#include "panelize.h"
#include "history.h"
#include "strutil.h"