logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://hacktivis.me/git/badwolf.git
commit: 1d4e9c3d4a22be09c0dbc1bc01e618ce5a394ef3
parent 9c0eb5080122f304b0bf444b040d98a366fbad62
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.pot60++++++++++++++++++++++++++++++------------------------------
2 files changed, 32 insertions(+), 44 deletions(-)

diff --git 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[]) { diff --git a/po/messages.pot b/po/messages.pot @@ -37,27 +37,27 @@ msgstr "" msgid "%02i:%02i:%02i Downloading…" msgstr "" -#: downloads.c:199 downloads.c:216 downloads.c:218 +#: downloads.c:199 downloads.c:216 downloads.c:219 msgid "Badwolf Downloads" msgstr "" -#: badwolf.c:910 +#: badwolf.c:898 #, c-format msgid "Buildtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:403 +#: badwolf.c:402 msgid "Continue" msgstr "" -#: badwolf.c:353 +#: badwolf.c:352 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:99 +#: badwolf.c:98 msgid "Crashed" msgstr "" @@ -65,31 +65,31 @@ msgstr "" msgid "Download starting…" msgstr "" -#: badwolf.c:376 +#: badwolf.c:375 msgid "Error: Some unknown error occurred validating the certificate.\n" msgstr "" -#: badwolf.c:357 +#: badwolf.c:356 msgid "Error: The X509 Certificate Authority is unknown.\n" msgstr "" -#: badwolf.c:370 +#: badwolf.c:369 msgid "Error: The certificate has been revoked.\n" msgstr "" -#: badwolf.c:367 +#: badwolf.c:366 msgid "Error: The certificate has expired. Check your system's clock.\n" msgstr "" -#: badwolf.c:373 +#: badwolf.c:372 msgid "Error: The certificate is considered to be insecure.\n" msgstr "" -#: badwolf.c:364 +#: badwolf.c:363 msgid "Error: The certificate isn't valid yet. Check your system's clock.\n" msgstr "" -#: badwolf.c:360 +#: badwolf.c:359 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:839 +#: badwolf.c:838 msgid "New tab" msgstr "" -#: badwolf.c:959 +#: badwolf.c:947 msgid "Open new tab" msgstr "" -#: badwolf.c:103 +#: badwolf.c:102 msgid "Out of Memory" msgstr "" -#: badwolf.c:908 +#: badwolf.c:896 #, c-format msgid "Running Badwolf version: %s\n" msgstr "" -#: badwolf.c:915 +#: badwolf.c:903 #, c-format msgid "Runtime WebKit version: %d.%d.%d\n" msgstr "" -#: badwolf.c:400 +#: badwolf.c:399 #, c-format msgid "TLS Error for %s." msgstr "" -#: badwolf.c:403 +#: badwolf.c:402 msgid "Temporarily Add Exception" msgstr "" -#: badwolf.c:610 +#: badwolf.c:609 msgid "Toggle javascript" msgstr "" -#: badwolf.c:615 +#: badwolf.c:614 msgid "Toggle loading images automatically" msgstr "" -#: badwolf.c:107 +#: badwolf.c:106 msgid "Unknown Crash" msgstr "" -#: badwolf.c:613 +#: badwolf.c:612 msgid "_IMG" msgstr "" -#: badwolf.c:608 +#: badwolf.c:607 msgid "_JS" msgstr "" -#: badwolf.c:728 +#: badwolf.c:727 msgid "search in current page" msgstr "" -#: badwolf.c:98 +#: badwolf.c:97 msgid "the web process crashed.\n" msgstr "" -#: badwolf.c:102 +#: badwolf.c:101 msgid "the web process exceeded the memory limit.\n" msgstr "" -#: badwolf.c:106 +#: badwolf.c:105 msgid "the web process terminated for an unknown reason.\n" msgstr "" -#: badwolf.c:922 +#: badwolf.c:910 #, c-format msgid "webkit-web-extension directory set to: %s\n" msgstr "" #. TRANSLATOR Ignore this entry. Done for forcing Unicode in xgettext. -#: badwolf.c:993 +#: badwolf.c:981 msgid "ø" msgstr ""