mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
statusbar was a bit broken when using split windows
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1487 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
749e70cad6
commit
f89d89b0e7
@ -596,6 +596,7 @@ static void sig_mainwindow_created(MAIN_WINDOW_REC *window)
|
|||||||
window->statusbar =
|
window->statusbar =
|
||||||
statusbar_create(STATUSBAR_POS_MIDDLE,
|
statusbar_create(STATUSBAR_POS_MIDDLE,
|
||||||
window->first_line+window->height);
|
window->first_line+window->height);
|
||||||
|
((STATUSBAR_REC *) window->statusbar)->window = window;
|
||||||
sidebar_add_items(window);
|
sidebar_add_items(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,9 +133,14 @@ static void statusbar_get_sizes(STATUSBAR_REC *bar, int max_width)
|
|||||||
|
|
||||||
static void statusbar_redraw_line(STATUSBAR_REC *bar)
|
static void statusbar_redraw_line(STATUSBAR_REC *bar)
|
||||||
{
|
{
|
||||||
|
WINDOW_REC *old_active_win;
|
||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
int xpos, rxpos;
|
int xpos, rxpos;
|
||||||
|
|
||||||
|
old_active_win = active_win;
|
||||||
|
if (bar->window != NULL)
|
||||||
|
active_win = bar->window->active;
|
||||||
|
|
||||||
statusbar_get_sizes(bar, COLS-2);
|
statusbar_get_sizes(bar, COLS-2);
|
||||||
|
|
||||||
xpos = 1;
|
xpos = 1;
|
||||||
@ -159,6 +164,8 @@ static void statusbar_redraw_line(STATUSBAR_REC *bar)
|
|||||||
rec->func(rec, FALSE);
|
rec->func(rec, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
active_win = old_active_win;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void statusbar_redraw_all(void)
|
static void statusbar_redraw_all(void)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef __STATUSBAR_H
|
#ifndef __STATUSBAR_H
|
||||||
#define __STATUSBAR_H
|
#define __STATUSBAR_H
|
||||||
|
|
||||||
|
#include "mainwindows.h"
|
||||||
|
|
||||||
#define SBAR_PRIORITY_HIGH 100
|
#define SBAR_PRIORITY_HIGH 100
|
||||||
#define SBAR_PRIORITY_NORMAL 0
|
#define SBAR_PRIORITY_NORMAL 0
|
||||||
#define SBAR_PRIORITY_LOW -100
|
#define SBAR_PRIORITY_LOW -100
|
||||||
@ -15,6 +17,8 @@ typedef struct SBAR_ITEM_REC SBAR_ITEM_REC;
|
|||||||
typedef void (*STATUSBAR_FUNC) (SBAR_ITEM_REC *item, int get_size_only);
|
typedef void (*STATUSBAR_FUNC) (SBAR_ITEM_REC *item, int get_size_only);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
MAIN_WINDOW_REC *window;
|
||||||
|
|
||||||
int pos;
|
int pos;
|
||||||
int line;
|
int line;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user