summaryrefslogtreecommitdiffstats
path: root/src/tab.c
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-24 23:25:35 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-24 23:25:35 (EDT)
commit17bb4d51e0d17ebf632a02bff5ef0e12dbc5c69b (patch)
treec5fc945ea5ce27b6fdd55c6b5cd93002045d379e /src/tab.c
parent34994d68e076ff5dc9037fe3752bf987cee3533d (diff)
downloadmarquee-17bb4d51e0d17ebf632a02bff5ef0e12dbc5c69b.zip
marquee-17bb4d51e0d17ebf632a02bff5ef0e12dbc5c69b.tar.gz
marquee-17bb4d51e0d17ebf632a02bff5ef0e12dbc5c69b.tar.bz2
mq_tab_new(), mq_tab_new_relative(): Change argument type to (MqWindow *)
And save the window in the MqTab struct.
Diffstat (limited to 'src/tab.c')
-rw-r--r--src/tab.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/tab.c b/src/tab.c
index 913b34f..2998c2f 100644
--- a/src/tab.c
+++ b/src/tab.c
@@ -113,7 +113,7 @@ reload_tab_clicked_cb(GtkWidget __attribute__((unused)) *button, MqTab *tab)
static void
new_tab_clicked_cb(GtkWidget __attribute__((unused)) *button, MqTab *tab)
{
- mq_tab_new(tab->application, NULL, tab);
+ mq_tab_new(tab->window, NULL, tab);
gtk_widget_hide(tab->popover);
}
@@ -296,7 +296,7 @@ title_cb(WebKitWebView __attribute__((unused)) *web_view,
}
static MqTab *
-init_non_root(MqApplication *application, gchar *uri)
+init_non_root(MqWindow *window, gchar *uri)
{
MqTab *tab;
@@ -306,7 +306,8 @@ init_non_root(MqApplication *application, gchar *uri)
tab->next = NULL;
tab->first_child = tab->last_child = NULL;
tab->tree_size = 1;
- tab->application = application;
+ tab->window = window;
+ tab->application = mq_window_get_application(window);
mq_tab_populate_tab(tab);
@@ -329,11 +330,11 @@ init_non_root(MqApplication *application, gchar *uri)
}
MqTab *
-mq_tab_new(MqApplication *application, gchar *uri, MqTab *source)
+mq_tab_new(MqWindow *window, gchar *uri, MqTab *source)
{
MqTab *tab;
- tab = init_non_root(application, uri);
+ tab = init_non_root(window, uri);
append_sibling(tab, source);
@@ -341,11 +342,11 @@ mq_tab_new(MqApplication *application, gchar *uri, MqTab *source)
}
MqTab *
-mq_tab_new_relative(MqApplication *application, gchar *uri, MqTab *source)
+mq_tab_new_relative(MqWindow *window, gchar *uri, MqTab *source)
{
MqTab *tab;
- tab = init_non_root(application, uri);
+ tab = init_non_root(window, uri);
append_child(tab, source);