logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: e94212d51be4e15e12a67e633baa32f0a0d6273b
parent: a33acf084bca33816f9869bf6dfa00fdd4c7b5cb
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  4 Jul 2020 06:52:00 +0200

badwolf: badwolf_get_tab_position → gtk_notebook_page_num

Diffstat:

Mbadwolf.c16++--------------
Mpo/messages.pot62+++++++++++++++++++++++++++++++-------------------------------
2 files changed, 33 insertions(+), 45 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -75,8 +75,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); @@ -221,7 +220,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); } @@ -898,17 +897,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[]) { diff --git a/po/messages.pot b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 1.0.0+g5c8cf6d.develop\n" +"Project-Id-Version: Badwolf 1.0.0+g498bce5.develop\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-06-16 06:32+0200\n" +"POT-Creation-Date: 2020-07-04 06:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -41,23 +41,23 @@ msgstr "" msgid "Badwolf Downloads" msgstr "" -#: badwolf.c:925 +#: badwolf.c:913 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:417 +#: badwolf.c:416 msgid "Continue" msgstr "" -#: badwolf.c:367 +#: badwolf.c:366 msgid "" "Couldn't verify the TLS certificate to ensure a better security of the " "connection. You might want to verify your machine and network.\n" "\n" msgstr "" -#: badwolf.c:100 +#: badwolf.c:99 msgid "Crashed" msgstr "" @@ -65,31 +65,31 @@ msgstr "" msgid "Download starting…" msgstr "" -#: badwolf.c:390 +#: badwolf.c:389 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" -#: badwolf.c:371 +#: badwolf.c:370 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "" -#: badwolf.c:384 +#: badwolf.c:383 msgid "Error: The certificate has been revoked.\n" msgstr "" -#: badwolf.c:381 +#: badwolf.c:380 msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "" -#: badwolf.c:387 +#: badwolf.c:386 msgid "Error: The certificate is considered to be insecure.\n" msgstr "" -#: badwolf.c:378 +#: badwolf.c:377 msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" msgstr "" -#: badwolf.c:374 +#: badwolf.c:373 msgid "Error: The given identity doesn't match the expected one.\n" msgstr "" @@ -100,79 +100,79 @@ msgid "" "Runtime WebKit version: %d.%d.%d" msgstr "" -#: badwolf.c:854 +#: badwolf.c:853 msgid "New tab" msgstr "" -#: badwolf.c:974 +#: badwolf.c:962 msgid "Open new tab" msgstr "" -#: badwolf.c:104 +#: badwolf.c:103 msgid "Out of Memory" msgstr "" -#: badwolf.c:923 +#: badwolf.c:911 #, c-format msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:930 +#: badwolf.c:918 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:414 +#: badwolf.c:413 #, c-format msgid "TLS Error for %s." msgstr "" -#: badwolf.c:417 +#: badwolf.c:416 msgid "Temporarily Add Exception" msgstr "" -#: badwolf.c:625 +#: badwolf.c:624 msgid "Toggle javascript" msgstr "" -#: badwolf.c:630 +#: badwolf.c:629 msgid "Toggle loading images automatically" msgstr "" -#: badwolf.c:108 +#: badwolf.c:107 msgid "Unknown Crash" msgstr "" -#: badwolf.c:628 +#: badwolf.c:627 msgid "_IMG" msgstr "" -#: badwolf.c:623 +#: badwolf.c:622 msgid "_JS" msgstr "" -#: badwolf.c:743 +#: badwolf.c:742 msgid "search in current page" msgstr "" -#: badwolf.c:99 +#: badwolf.c:98 msgid "the web process crashed.\n" msgstr "" -#: badwolf.c:103 +#: badwolf.c:102 msgid "the web process exceeded the memory limit.\n" msgstr "" -#: badwolf.c:107 +#: badwolf.c:106 msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:937 +#: badwolf.c:925 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:1008 +#: badwolf.c:996 msgid "ø" msgstr ""