diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-29 22:13:40 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-29 22:13:40 (EDT) |
commit | 81e4ebe6ff35dc7157d8b660cb600c2424df69fb (patch) | |
tree | 84a3683034fd65d389ab94b31a891ad03dd159e7 | |
parent | 00c1005f35447970f233b085918980f2091d88c6 (diff) | |
download | marquee-81e4ebe6ff35dc7157d8b660cb600c2424df69fb.zip marquee-81e4ebe6ff35dc7157d8b660cb600c2424df69fb.tar.gz marquee-81e4ebe6ff35dc7157d8b660cb600c2424df69fb.tar.bz2 |
MqTabPage: Register and unregister with MqApplication
-rw-r--r-- | src/tab-page.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tab-page.c b/src/tab-page.c index 1a7b37a..c6e5edd 100644 --- a/src/tab-page.c +++ b/src/tab-page.c @@ -42,6 +42,7 @@ struct _MqTabPage { gchar *uri; guint position; MqApplication *application; + guint64 id; GtkWidget *container; GtkWidget *label; const gchar *title; @@ -81,6 +82,9 @@ init_non_root(MqTabPage *tab_page) tab_page->application = mq_window_get_application(tab_page->window); + tab_page->id = mq_application_register_tab(tab_page->application, + tab_page); + tab_page->web_view = WEBKIT_WEB_VIEW(mq_web_view_new(tab_page, tab_page->uri)); g_signal_connect(tab_page->web_view, "notify::title", @@ -128,6 +132,8 @@ finalize(GObject *object) g_free(tab_page->uri); + mq_application_unregister_tab(tab_page->application, tab_page->id); + G_OBJECT_CLASS(mq_tab_page_parent_class)->finalize(object); } |