* main.c (get_current_panel): Remove.

(get_other_panel): Move ...
* layout.c: ... here.
This commit is contained in:
Pavel Roskin 2003-10-26 06:32:42 +00:00
parent dca92d4941
commit bb13ad8db4
6 changed files with 16 additions and 18 deletions

View File

@ -1,5 +1,9 @@
2003-10-26 Pavel Roskin <proski@gnu.org>
* main.c (get_current_panel): Remove.
(get_other_panel): Move ...
* layout.c: ... here.
* info.h: Don't expose WInfo internals.
* background.c (tell_parent): Eliminate.

View File

@ -1109,6 +1109,12 @@ int get_other_index (void)
return !get_current_index ();
}
struct WPanel *
get_other_panel (void)
{
return (struct WPanel *) get_panel_widget (get_other_index ());
}
/* Returns the view type for the current panel/view */
int get_current_type (void)
{

View File

@ -21,6 +21,9 @@ char *get_nth_panel_name (int num);
struct Widget;
struct Widget *get_panel_widget (int index);
struct WPanel;
struct WPanel *get_other_panel (void);
void set_hintbar (char *str);
/* Clear screen */

View File

@ -276,18 +276,6 @@ char *mc_home;
char cmd_buf[512];
WPanel *
get_current_panel (void)
{
return current_panel;
}
WPanel *
get_other_panel (void)
{
return (WPanel *) get_panel_widget (get_other_index ());
}
static void
reload_panelized (WPanel *panel)
{

View File

@ -5,7 +5,6 @@
#include "dialog.h" /* Widget */
#define selection(p) (&(p->dir.list[p->selected]))
#define other_panel get_other_panel()
#define DEFAULT_USER_FORMAT "half type name | size | perm"
#define LIST_TYPES 4
@ -92,12 +91,10 @@ void update_dirty_panels (void);
void panel_update_cols (Widget *widget, int frame_size);
int set_panel_formats (WPanel *p);
WPanel *get_current_panel (void);
WPanel *get_other_panel (void);
/* Useful macros to avoid too much typing */
#define cpanel get_current_panel()
#define cpanel current_panel
#define opanel get_other_panel()
#define other_panel get_other_panel()
extern WPanel *left_panel;
extern WPanel *right_panel;

View File

@ -328,7 +328,7 @@ save_setup (void)
save_string ("Dirs", "other_dir",
get_other_type () == view_listing
? opanel->cwd : ".", profile);
if (get_current_panel () != NULL)
if (current_panel != NULL)
WritePrivateProfileString ("Dirs", "current_is_left",
get_current_index () == 0 ? "1" : "0", profile);
save_hotlist ();