* main.c (make_panels_dirty): Remove, it's unneded now.

(midnight_callback): Don't call make_panels_dirty().  Mark
current panel dirty if the search mode is unset.  No need to set
attibutes before calling show_console_contents().
This commit is contained in:
Pavel Roskin 2003-09-07 05:58:55 +00:00
parent 2a60f651e3
commit 485bbcef9b
2 changed files with 9 additions and 31 deletions

View File

@ -1,5 +1,10 @@
2003-09-07 Pavel Roskin <proski@gnu.org>
* main.c (make_panels_dirty): Remove, it's unneded now.
(midnight_callback): Don't call make_panels_dirty(). Mark
current panel dirty if the search mode is unset. No need to set
attibutes before calling show_console_contents().
* dlg.h: Convert send_idle_msg field to a publicly visible flag
DLG_WANT_IDLE.
* main.c (midnight_callback): Move auto_menu handling to the

View File

@ -1477,30 +1477,6 @@ done_mc_profile (void)
free_profiles ();
}
/*
* Partly repaint the contents of the panels.
* Ideally, all painting should be done in the panel's callback.
* Since we are bypassing the standard widget library by forcing
* the repaint, the cursor position needs to be preserved.
*/
static void
make_panels_dirty (void)
{
int col, row;
/* Preserve current cursor position */
getyx (stdscr, row, col);
if (cpanel->dirty)
panel_update_contents (cpanel);
if ((get_other_type () == view_listing) && opanel->dirty)
panel_update_contents (opanel);
/* Restore cursor position */
move (row, col);
}
static int
midnight_callback (struct Dlg_head *h, int id, int msg)
{
@ -1516,10 +1492,6 @@ midnight_callback (struct Dlg_head *h, int id, int msg)
}
return MSG_HANDLED;
case DLG_PRE_EVENT:
make_panels_dirty ();
return MSG_HANDLED;
case DLG_KEY:
if (ctl_x_map_enabled) {
ctl_x_map_enabled = 0;
@ -1596,8 +1568,10 @@ midnight_callback (struct Dlg_head *h, int id, int msg)
break;
case DLG_HOTKEY_HANDLED:
if (get_current_type () == view_listing)
if ((get_current_type () == view_listing) && cpanel->searching) {
cpanel->searching = 0;
cpanel->dirty = 1;
}
break;
case DLG_UNHANDLED_KEY:
@ -1625,9 +1599,8 @@ midnight_callback (struct Dlg_head *h, int id, int msg)
}
return MSG_NOT_HANDLED;
/* We handle the special case of the output lines */
case DLG_DRAW:
attrset (SELECTED_COLOR);
/* We handle the special case of the output lines */
if (console_flag && output_lines)
show_console_contents (output_start_y,
LINES - output_lines - keybar_visible -