tazweb rev 189

Better private browsing (no cache or global history), up french translation
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 15 00:47:49 2017 +0100 (2017-03-15)
parents bb7b18c98c63
children 6a5a94a11ff7
files README data/bookmarks.txt po/fr.po src/tazweb.c
line diff
     1.1 --- a/README	Tue Mar 14 20:15:40 2017 +0200
     1.2 +++ b/README	Wed Mar 15 00:47:49 2017 +0100
     1.3 @@ -26,9 +26,10 @@
     1.4      * Download manager
     1.5      * Text based config file
     1.6      * Search engine entry box
     1.7 -    * Favorites support
     1.8 +    * Bookmarks support
     1.9      * Print, including to pdf
    1.10      * Rich contextual menu
    1.11 +    * Private browsing
    1.12  
    1.13  
    1.14  Build and install
     2.1 --- a/data/bookmarks.txt	Tue Mar 14 20:15:40 2017 +0200
     2.2 +++ b/data/bookmarks.txt	Wed Mar 15 00:47:49 2017 +0100
     2.3 @@ -1,5 +1,6 @@
     2.4  SliTaz Website|http://www.slitaz.org/
     2.5 -SliTaz ARM|http://arm.slitaz.org/
     2.6 +SliTaz Community|http://scn.slitaz.org/
     2.7  Wikipedia|https://www.wikipedia.org/
     2.8  Twitter|https://twitter.com/
     2.9 +Facebook|https://facebook.com/
    2.10  Google search|https://www.google.com/
     3.1 --- a/po/fr.po	Tue Mar 14 20:15:40 2017 +0200
     3.2 +++ b/po/fr.po	Wed Mar 15 00:47:49 2017 +0100
     3.3 @@ -8,27 +8,26 @@
     3.4  "Project-Id-Version: TazWeb 1.6.4\n"
     3.5  "Report-Msgid-Bugs-To: \n"
     3.6  "POT-Creation-Date: 2017-03-14 13:07+0200\n"
     3.7 -"PO-Revision-Date: 2014-01-19 13:37+0100\n"
     3.8 +"PO-Revision-Date: 2017-03-14 19:44+0100\n"
     3.9  "Last-Translator: Christophe Lincoln <pankso@slitaz.org>\n"
    3.10  "Language-Team: French\n"
    3.11  "Language: fr\n"
    3.12  "MIME-Version: 1.0\n"
    3.13  "Content-Type: text/plain; charset=UTF-8\n"
    3.14  "Content-Transfer-Encoding: 8bit\n"
    3.15 +"X-Generator: Poedit 1.8.6\n"
    3.16  
    3.17  #: src/tazweb.c:319 lib/helper.sh:68 lib/helper.sh:78
    3.18 -#, fuzzy
    3.19  msgid "Bookmarks"
    3.20 -msgstr "Marquer cette page"
    3.21 +msgstr "Marque pages"
    3.22  
    3.23  #: src/tazweb.c:327
    3.24  msgid "Add a bookmark"
    3.25  msgstr "Marquer cette page"
    3.26  
    3.27  #: src/tazweb.c:334
    3.28 -#, fuzzy
    3.29  msgid "Edit bookmarks"
    3.30 -msgstr "Marquer cette page"
    3.31 +msgstr "Éditer les marques pages"
    3.32  
    3.33  #: src/tazweb.c:346
    3.34  msgid "Print this page"
    3.35 @@ -40,11 +39,11 @@
    3.36  
    3.37  #: src/tazweb.c:365
    3.38  msgid "View cookies"
    3.39 -msgstr ""
    3.40 +msgstr "Voir les cookies"
    3.41  
    3.42  #: src/tazweb.c:371
    3.43  msgid "Clean all cookies"
    3.44 -msgstr ""
    3.45 +msgstr "Nettoyer les cookies"
    3.46  
    3.47  #: src/tazweb.c:383
    3.48  msgid "TazWeb manual"
    3.49 @@ -56,7 +55,7 @@
    3.50  
    3.51  #: lib/helper.sh:93 lib/helper.sh:103
    3.52  msgid "Cookies"
    3.53 -msgstr ""
    3.54 +msgstr "Cookies"
    3.55  
    3.56  #: data/tazweb.desktop.in:4
    3.57  msgid "TazWeb Browser"
    3.58 @@ -68,7 +67,7 @@
    3.59  
    3.60  #: data/tazweb.desktop.in:6
    3.61  msgid "tazweb"
    3.62 -msgstr ""
    3.63 +msgstr "tazweb"
    3.64  
    3.65  #~ msgid "Zoom in"
    3.66  #~ msgstr "Zoom avant"
     4.1 --- a/src/tazweb.c	Tue Mar 14 20:15:40 2017 +0200
     4.2 +++ b/src/tazweb.c	Wed Mar 15 00:47:49 2017 +0100
     4.3 @@ -30,7 +30,6 @@
     4.4  int		width			= 800;
     4.5  int		height			= 600;
     4.6  int		private			= 0;
     4.7 -int		debug			= 1;
     4.8  
     4.9  static gchar *useragent = "TazWeb (X11; SliTaz GNU/Linux; U; en_US)";
    4.10  static gboolean		notoolbar;
    4.11 @@ -392,6 +391,12 @@
    4.12  	gtk_widget_show_all(GTK_WIDGET(menu));
    4.13  }
    4.14  
    4.15 +void
    4.16 +webkit_settings_set_user_agent_with_application_details
    4.17 +                               (WebKitWebSettings *settings,
    4.18 +                                const gchar *application_name,
    4.19 +                                const gchar *application_version);
    4.20 +
    4.21  /* Scrolled window for the webview */
    4.22  static GtkWidget*
    4.23  create_browser(GtkWidget* window, GtkWidget* urientry, GtkWidget* search,
    4.24 @@ -405,11 +410,14 @@
    4.25  
    4.26  	gtk_container_add(GTK_CONTAINER(browser), GTK_WIDGET(webview));
    4.27  
    4.28 -	/* User agent */
    4.29 +	/* Webkit settings */
    4.30  	settings = webkit_web_view_get_settings (webview);
    4.31  	g_object_set(G_OBJECT(settings), "user-agent", useragent, NULL);
    4.32 -
    4.33 -	/* Connect WebKit events */
    4.34 +	
    4.35 +	if (private)
    4.36 +		g_object_set(G_OBJECT(settings), "enable-private-browsing", TRUE);
    4.37 +	
    4.38 +	/* Connect Webkit events */
    4.39  	g_signal_connect(webview, "notify::title",
    4.40  			G_CALLBACK(notify_title_cb), window);
    4.41  	g_signal_connect(webview, "notify::progress",
    4.42 @@ -548,7 +556,7 @@
    4.43  \n\
    4.44  Options:\n\
    4.45    -h  --help            Print TazWeb command line help\n\
    4.46 -  -p  --private         Private browsing without cookies support\n\
    4.47 +  -p  --private         Disable on-disk cache, cookies, history\n\
    4.48    -u  --useragent [ua]  Configure the user agent string\n\
    4.49    -k  --kiosk           Fullscreen, no bookmarks and download support\n\
    4.50    -r  --raw             Raw webkit window without toolbar and menu\n\
    4.51 @@ -592,12 +600,6 @@
    4.52  		switch (c) {
    4.53  			case 0:
    4.54  				/* Options with flag */
    4.55 -				if (debug) {
    4.56 -					printf ("Option: %s", long_options[index].name);
    4.57 -					if (optarg)
    4.58 -						printf (" with arg: %s", optarg);
    4.59 -					printf ("\n");
    4.60 -				}
    4.61  				break;
    4.62  
    4.63  			case 'h':
    4.64 @@ -609,8 +611,6 @@
    4.65  				break;
    4.66  
    4.67  			case 'u':
    4.68 -				if (debug)
    4.69 -					printf ("User agent option: %s\n", optarg);
    4.70  				useragent = optarg;
    4.71  				break;
    4.72  
    4.73 @@ -628,7 +628,7 @@
    4.74  				height = 480;
    4.75  				break;
    4.76  
    4.77 -			case '?':
    4.78 +			default:
    4.79  				help();
    4.80  				return 0;
    4.81  		}