# HG changeset patch # User Christophe Lincoln # Date 1489535269 -3600 # Node ID 9c7e46fe4fdade3b6a87f913f1a9d8e9c5bdfaa3 # Parent bb7b18c98c6314ba4f012b1a13527bca7297d4c0 Better private browsing (no cache or global history), up french translation diff -r bb7b18c98c63 -r 9c7e46fe4fda README --- a/README Tue Mar 14 20:15:40 2017 +0200 +++ b/README Wed Mar 15 00:47:49 2017 +0100 @@ -26,9 +26,10 @@ * Download manager * Text based config file * Search engine entry box - * Favorites support + * Bookmarks support * Print, including to pdf * Rich contextual menu + * Private browsing Build and install diff -r bb7b18c98c63 -r 9c7e46fe4fda data/bookmarks.txt --- a/data/bookmarks.txt Tue Mar 14 20:15:40 2017 +0200 +++ b/data/bookmarks.txt Wed Mar 15 00:47:49 2017 +0100 @@ -1,5 +1,6 @@ SliTaz Website|http://www.slitaz.org/ -SliTaz ARM|http://arm.slitaz.org/ +SliTaz Community|http://scn.slitaz.org/ Wikipedia|https://www.wikipedia.org/ Twitter|https://twitter.com/ +Facebook|https://facebook.com/ Google search|https://www.google.com/ diff -r bb7b18c98c63 -r 9c7e46fe4fda po/fr.po --- a/po/fr.po Tue Mar 14 20:15:40 2017 +0200 +++ b/po/fr.po Wed Mar 15 00:47:49 2017 +0100 @@ -8,27 +8,26 @@ "Project-Id-Version: TazWeb 1.6.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-03-14 13:07+0200\n" -"PO-Revision-Date: 2014-01-19 13:37+0100\n" +"PO-Revision-Date: 2017-03-14 19:44+0100\n" "Last-Translator: Christophe Lincoln \n" "Language-Team: French\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.6\n" #: src/tazweb.c:319 lib/helper.sh:68 lib/helper.sh:78 -#, fuzzy msgid "Bookmarks" -msgstr "Marquer cette page" +msgstr "Marque pages" #: src/tazweb.c:327 msgid "Add a bookmark" msgstr "Marquer cette page" #: src/tazweb.c:334 -#, fuzzy msgid "Edit bookmarks" -msgstr "Marquer cette page" +msgstr "Éditer les marques pages" #: src/tazweb.c:346 msgid "Print this page" @@ -40,11 +39,11 @@ #: src/tazweb.c:365 msgid "View cookies" -msgstr "" +msgstr "Voir les cookies" #: src/tazweb.c:371 msgid "Clean all cookies" -msgstr "" +msgstr "Nettoyer les cookies" #: src/tazweb.c:383 msgid "TazWeb manual" @@ -56,7 +55,7 @@ #: lib/helper.sh:93 lib/helper.sh:103 msgid "Cookies" -msgstr "" +msgstr "Cookies" #: data/tazweb.desktop.in:4 msgid "TazWeb Browser" @@ -68,7 +67,7 @@ #: data/tazweb.desktop.in:6 msgid "tazweb" -msgstr "" +msgstr "tazweb" #~ msgid "Zoom in" #~ msgstr "Zoom avant" diff -r bb7b18c98c63 -r 9c7e46fe4fda src/tazweb.c --- a/src/tazweb.c Tue Mar 14 20:15:40 2017 +0200 +++ b/src/tazweb.c Wed Mar 15 00:47:49 2017 +0100 @@ -30,7 +30,6 @@ int width = 800; int height = 600; int private = 0; -int debug = 1; static gchar *useragent = "TazWeb (X11; SliTaz GNU/Linux; U; en_US)"; static gboolean notoolbar; @@ -392,6 +391,12 @@ gtk_widget_show_all(GTK_WIDGET(menu)); } +void +webkit_settings_set_user_agent_with_application_details + (WebKitWebSettings *settings, + const gchar *application_name, + const gchar *application_version); + /* Scrolled window for the webview */ static GtkWidget* create_browser(GtkWidget* window, GtkWidget* urientry, GtkWidget* search, @@ -405,11 +410,14 @@ gtk_container_add(GTK_CONTAINER(browser), GTK_WIDGET(webview)); - /* User agent */ + /* Webkit settings */ settings = webkit_web_view_get_settings (webview); g_object_set(G_OBJECT(settings), "user-agent", useragent, NULL); - - /* Connect WebKit events */ + + if (private) + g_object_set(G_OBJECT(settings), "enable-private-browsing", TRUE); + + /* Connect Webkit events */ g_signal_connect(webview, "notify::title", G_CALLBACK(notify_title_cb), window); g_signal_connect(webview, "notify::progress", @@ -548,7 +556,7 @@ \n\ Options:\n\ -h --help Print TazWeb command line help\n\ - -p --private Private browsing without cookies support\n\ + -p --private Disable on-disk cache, cookies, history\n\ -u --useragent [ua] Configure the user agent string\n\ -k --kiosk Fullscreen, no bookmarks and download support\n\ -r --raw Raw webkit window without toolbar and menu\n\ @@ -592,12 +600,6 @@ switch (c) { case 0: /* Options with flag */ - if (debug) { - printf ("Option: %s", long_options[index].name); - if (optarg) - printf (" with arg: %s", optarg); - printf ("\n"); - } break; case 'h': @@ -609,8 +611,6 @@ break; case 'u': - if (debug) - printf ("User agent option: %s\n", optarg); useragent = optarg; break; @@ -628,7 +628,7 @@ height = 480; break; - case '?': + default: help(); return 0; }