Summary Files Commits Branches @commit @diff @stats
path: root / badwolf.c
diff options
context:
space:
mode:
1 files changed, 2 insertions, 14 deletions
-rw-r--r--badwolf.c16
diff --git a/badwolf.c b/badwolf.c
index 54dcf53..d7d1001 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -74,8 +74,7 @@ WebViewCb_close(WebKitWebView *webView, gpointer user_data)
struct Client *browser = (struct Client *)user_data;
GtkNotebook *notebook = GTK_NOTEBOOK(browser->window->notebook);
- gtk_notebook_remove_page(notebook,
- badwolf_get_tab_position(GTK_CONTAINER(notebook), browser->box));
+ gtk_notebook_remove_page(notebook, gtk_notebook_page_num(GTK_NOTEBOOK(notebook), browser->box));
gtk_widget_destroy(browser->box);
@@ -212,7 +211,7 @@ webView_tab_label_change(struct Client *browser, const gchar *title)
gtk_notebook_set_menu_label_text(GTK_NOTEBOOK(notebook), browser->box, title);
// Set the window title if the title change was on the current tab
- if(badwolf_get_tab_position(GTK_CONTAINER(notebook), browser->box) ==
+ if(gtk_notebook_page_num(GTK_NOTEBOOK(notebook), browser->box) ==
gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)))
gtk_window_set_title(GTK_WINDOW(browser->window->main_window), title);
}
@@ -883,17 +882,6 @@ notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num,
gtk_window_set_title(GTK_WINDOW(window->main_window), gtk_widget_get_tooltip_text(label));
}
-gint
-badwolf_get_tab_position(GtkContainer *notebook, GtkWidget *child)
-{
- GValue position = G_VALUE_INIT;
- g_value_init(&position, G_TYPE_INT);
-
- gtk_container_child_get_property(notebook, child, "position", &position);
-
- return g_value_get_int(&position);
-}
-
int
main(int argc, char *argv[])
{