summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-10-01 20:13:46 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-10-01 20:13:46 (EDT)
commit1de2dc5114a79ff8feb9f5cc32c9bf62a00cfdf1 (patch)
tree6a04875868692fc7e6151767b0019ad3e2d9dcf3
parent86a6adf3b0eb8e69bc5342acedee963cb8a664df (diff)
downloadmarquee-1de2dc5114a79ff8feb9f5cc32c9bf62a00cfdf1.zip
marquee-1de2dc5114a79ff8feb9f5cc32c9bf62a00cfdf1.tar.gz
marquee-1de2dc5114a79ff8feb9f5cc32c9bf62a00cfdf1.tar.bz2
MqWindow: Use mq_notebook_foreach_label() for scrolling
-rw-r--r--src/window.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index d472ed5..fc26382 100644
--- a/src/window.c
+++ b/src/window.c
@@ -31,6 +31,7 @@
#include "i18n.h"
#include "notebook.h"
#include "tab-page.h"
+#include "tree.h"
struct _MqWindow {
GtkWindow parent_instance;
@@ -356,20 +357,44 @@ mq_window_set_title(MqWindow *window, const gchar *title)
set_title(window, title);
}
+static gboolean
+scroll_label(MqTabLabel *label, G_GNUC_UNUSED gpointer user_data)
+{
+ mq_tab_label_scroll(label);
+ return MQ_TREE_CONTINUE;
+}
+
void
mq_window_scroll_tab_labels(MqWindow *window)
{
- mq_tab_page_scroll_tab_labels(window->root_tab);
+ mq_notebook_foreach_label(MQ_NOTEBOOK(window->notebook),
+ scroll_label, NULL);
+}
+
+static gboolean
+begin_scrolling_label(MqTabLabel *label, G_GNUC_UNUSED gpointer user_data)
+{
+ mq_tab_label_begin_scrolling(label);
+ return MQ_TREE_CONTINUE;
}
void
mq_window_begin_scrolling_tab_labels(MqWindow *window)
{
- mq_tab_page_begin_scrolling_tab_labels(window->root_tab);
+ mq_notebook_foreach_label(MQ_NOTEBOOK(window->notebook),
+ begin_scrolling_label, NULL);
+}
+
+static gboolean
+end_scrolling_label(MqTabLabel *label, G_GNUC_UNUSED gpointer user_data)
+{
+ mq_tab_label_begin_scrolling(label);
+ return MQ_TREE_CONTINUE;
}
void
mq_window_end_scrolling_tab_labels(MqWindow *window)
{
- mq_tab_page_end_scrolling_tab_labels(window->root_tab);
+ mq_notebook_foreach_label(MQ_NOTEBOOK(window->notebook),
+ end_scrolling_label, NULL);
}