summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-23 03:39:31 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-23 03:39:31 (EDT)
commit6626b86a07dcf94012638589284b243ba4fa88f8 (patch)
tree630f8ab764cb25a3bb25cd0c0e634de16c52a930
parent58745ea1ae404debedca5fbec155a813fd41a253 (diff)
downloadmarquee-6626b86a07dcf94012638589284b243ba4fa88f8.zip
marquee-6626b86a07dcf94012638589284b243ba4fa88f8.tar.gz
marquee-6626b86a07dcf94012638589284b243ba4fa88f8.tar.bz2
MqWindow: Fix notebook page switch callback
-rw-r--r--src/window.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c
index d8860c8..d88ab86 100644
--- a/src/window.c
+++ b/src/window.c
@@ -184,14 +184,11 @@ set_title(MqWindow *window, const gchar *title)
static void
switch_page_cb(GtkNotebook G_GNUC_UNUSED *notebook,
- GtkWidget G_GNUC_UNUSED *page, guint page_num, MqWindow *window)
+ MqTabPage *page, guint page_num, MqWindow *window)
{
window->current_tab = ++page_num;
- /* TODO: Use MqNotebook function. */
- set_title(window, mq_tab_page_get_title(
- MQ_TAB_PAGE(gtk_notebook_get_nth_page(
- GTK_NOTEBOOK(window->notebook), page_num))));
+ set_title(window, mq_tab_page_get_title(page));
}
static void