summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-17 02:08:18 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-17 02:08:18 (EDT)
commit3228f0de677719fdfbbce42c2ba12b0c35211222 (patch)
treef2a6145c438d385d5650932d8ecc423f5da80f19
parent60e8a6820d4983631612bd49742f94fd815095fb (diff)
downloadmarquee-3228f0de677719fdfbbce42c2ba12b0c35211222.zip
marquee-3228f0de677719fdfbbce42c2ba12b0c35211222.tar.gz
marquee-3228f0de677719fdfbbce42c2ba12b0c35211222.tar.bz2
mq_tab_chrome_new(): Accept notebook and tab page arguments
-rw-r--r--src/tab-chrome.c2
-rw-r--r--src/tab-chrome.h2
-rw-r--r--src/tab.c5
3 files changed, 5 insertions, 4 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 79b5c2a..35e9426 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -68,7 +68,7 @@ navigation_toolbar_new(MqTabChrome *chrome, gchar *uri)
}
MqTabChrome *
-mq_tab_chrome_new(gchar *uri)
+mq_tab_chrome_new(gchar *uri, GtkNotebook *notebook, GtkWidget *notebook_child)
{
MqTabChrome *chrome;
diff --git a/src/tab-chrome.h b/src/tab-chrome.h
index 359bfd1..2dec778 100644
--- a/src/tab-chrome.h
+++ b/src/tab-chrome.h
@@ -32,7 +32,7 @@ typedef struct {
} MqTabChrome;
MqTabChrome *
-mq_tab_chrome_new(gchar *uri);
+mq_tab_chrome_new(gchar *uri, GtkNotebook *notebook, GtkWidget *notebook_child);
GtkWidget *
mq_tab_chrome_get_container(MqTabChrome *chrome);
diff --git a/src/tab.c b/src/tab.c
index a2b2c57..52e0c2c 100644
--- a/src/tab.c
+++ b/src/tab.c
@@ -33,12 +33,13 @@ mq_tab_new(gchar *uri, GtkNotebook *notebook)
MqTab *tab;
tab = malloc(sizeof(*tab));
- tab->chrome = mq_tab_chrome_new(uri);
+ tab->container = gtk_grid_new();
+
+ tab->chrome = mq_tab_chrome_new(uri, notebook, tab->container);
tab->body = mq_tab_body_new(uri);
mq_tab_chrome_set_web_view(tab->chrome,
mq_tab_body_get_web_view(tab->body));
- tab->container = gtk_grid_new();
gtk_grid_attach(GTK_GRID(tab->container),
mq_tab_chrome_get_container(tab->chrome),
0, 0, 1, 1);