summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-11-25 16:35:11 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-11-25 16:35:11 +0000
commit9db0c7cc7d8287ad83ed8a90a4608317a07ab402 (patch)
treea935b057b68e5a9f886dfac9c2c896ddd4af25f9 /src/fe-text
parent09b5baa3d9544c58ee47f1254278da5063075e81 (diff)
downloadirssi-9db0c7cc7d8287ad83ed8a90a4608317a07ab402.zip
--more-- statusbar item didn't work properly with split windows. Also
changed it's settings in non-active window to be the same as in active window (right aligned) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2147 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/statusbar-items.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c
index 5aefcfc1..2f9a43fc 100644
--- a/src/fe-text/statusbar-items.c
+++ b/src/fe-text/statusbar-items.c
@@ -31,7 +31,7 @@
#define LAG_REFRESH_TIME 10
static GList *activity_list;
-static int more_visible;
+static GSList *more_visible; /* list of MAIN_WINDOW_RECs which have --more-- */
static GHashTable *input_entries;
static int last_lag, last_lag_unknown, lag_timeout_tag;
@@ -218,19 +218,28 @@ static void sig_statusbar_activity_updated(void)
static void item_more(SBAR_ITEM_REC *item, int get_size_only)
{
- more_visible = WINDOW_GUI(active_win)->view->more_text;
- if (!more_visible) {
+ MAIN_WINDOW_REC *mainwin;
+ int visible;
+
+ mainwin = WINDOW_MAIN(active_win);
+ visible = WINDOW_GUI(active_win)->view->more_text;
+ if (!visible) {
+ more_visible = g_slist_remove(more_visible, mainwin);
if (get_size_only)
item->min_size = item->max_size = 0;
return;
}
+ more_visible = g_slist_prepend(more_visible, mainwin);
statusbar_item_default_handler(item, get_size_only, NULL, "", FALSE);
}
static void sig_statusbar_more_updated(void)
{
- if (WINDOW_GUI(active_win)->view->more_text != more_visible)
+ int visible;
+
+ visible = g_slist_find(more_visible, WINDOW_MAIN(active_win)) != NULL;
+ if (WINDOW_GUI(active_win)->view->more_text != visible)
statusbar_items_redraw("more");
}
@@ -378,7 +387,7 @@ void statusbar_items_init(void)
signal_add("window refnum changed", (SIGNAL_FUNC) sig_statusbar_activity_updated);
/* more */
- more_visible = FALSE;
+ more_visible = NULL;
signal_add("gui page scrolled", (SIGNAL_FUNC) sig_statusbar_more_updated);
signal_add("window changed", (SIGNAL_FUNC) sig_statusbar_more_updated);
signal_add_last("gui print text finished", (SIGNAL_FUNC) sig_statusbar_more_updated);
@@ -408,6 +417,7 @@ void statusbar_items_deinit(void)
activity_list = NULL;
/* more */
+ g_slist_free(more_visible);
signal_remove("gui page scrolled", (SIGNAL_FUNC) sig_statusbar_more_updated);
signal_remove("window changed", (SIGNAL_FUNC) sig_statusbar_more_updated);
signal_remove("gui print text finished", (SIGNAL_FUNC) sig_statusbar_more_updated);