[Xfce4-commits] midori:master makedist: Strip SHA1 from version if it's a release build

2013-05-17 Thread Christian Dywan
Updating branch refs/heads/master
 to 580a4f4bf18c6bd2bfb6eb1c7f2d96cd4730f3c5 (commit)
   from 19c47083c49ff7020f86719a3d1e38464b216ce5 (commit)

commit 580a4f4bf18c6bd2bfb6eb1c7f2d96cd4730f3c5
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Fri May 17 19:47:09 2013 +0200

makedist: Strip SHA1 from version if it's a release build

 win32/makedist/makedist.midori |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index 0dd4129..27feaf3 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -42,6 +42,11 @@ have_7zip=`which 7za`
 grep -q gtk-3.0 _build/config.log  GTK3_BUILD=1
 version=`grep PACKAGE_VERSION _build/default/config.h | awk '{ print $3 $4; }' 
| sed 's@(debug)@-debug@g'|sed 's@@@g'`
 
+#strip sha from version if release
+if [ $RELEASE !=  ];then
+version=$(echo $version| awk -F \- '{print $1}')
+fi
+
 if [ $1 !=  ]; then
version_tag=$1
 fi
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master tools/release: Omit 'Update Foo translation' from changelogs

2013-05-17 Thread Christian Dywan
Updating branch refs/heads/master
 to 41f052da87f31e2a0da0161d6da5010bc18ac8a3 (commit)
   from 37384338224023de7dd63a095a460905cb412730 (commit)

commit 41f052da87f31e2a0da0161d6da5010bc18ac8a3
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri May 17 20:19:30 2013 +0200

tools/release: Omit 'Update Foo translation' from changelogs

 tools/release |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/release b/tools/release
index 54cb433..dbf4cf9 100755
--- a/tools/release
+++ b/tools/release
@@ -14,7 +14,7 @@ if [ x$1 = xbefore ]; then
 NEWVER=$(python -c print('0.'+str(float('$OLDVER'[2:])+.1)))
 echo Bumping from $OLDVER to $NEWVER
 sed -i s@$OLDVER@$NEWVER@g wscript win32/makedist/midori.nsi
-echo; git log --pretty='format: %s' $OLDVER..HEAD | grep -v l10n | grep -v 
makedist | grep -v tools/release | grep -v nsi; echo
+echo; git log --pretty='format: %s' $OLDVER..HEAD | grep -v l10n | grep -v 
makedist | grep -v tools/release | grep -v nsi | grep -v -E 'Update .+ 
translation'; echo
 curl http://wiki.xfce.org/_export/xhtml/midori/faq | \
 sed 's@This is a list of frequently asked questions@This is a 
href=http://wiki.xfce.org/midori/faq;a snapshot of the online FAQ/a@g' | \
 sed 's@link rel=style.*@link rel=stylesheet href=faq.css /@g' 
 data/faq.html
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master tools/release: Print shell-dependant fail-safe git command

2013-05-17 Thread Christian Dywan
Updating branch refs/heads/master
 to 5fd74d20aef298800055d37c4d455759d579bc81 (commit)
   from 41f052da87f31e2a0da0161d6da5010bc18ac8a3 (commit)

commit 5fd74d20aef298800055d37c4d455759d579bc81
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri May 17 20:35:28 2013 +0200

tools/release: Print shell-dependant fail-safe git command

 tools/release |   15 +++
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/tools/release b/tools/release
index dbf4cf9..ce10bb7 100755
--- a/tools/release
+++ b/tools/release
@@ -9,17 +9,24 @@
 #
 # See the file COPYING for the full license text.
 
+OLDVER=$(git describe --abbrev=0)
+NEWVER=$(python -c print('0.'+str(float('$OLDVER'[2:])+.1)))
 if [ x$1 = xbefore ]; then
-OLDVER=$(git describe --abbrev=0)
-NEWVER=$(python -c print('0.'+str(float('$OLDVER'[2:])+.1)))
 echo Bumping from $OLDVER to $NEWVER
 sed -i s@$OLDVER@$NEWVER@g wscript win32/makedist/midori.nsi
-echo; git log --pretty='format: %s' $OLDVER..HEAD | grep -v l10n | grep -v 
makedist | grep -v tools/release | grep -v nsi | grep -v -E 'Update .+ 
translation'; echo
+echo; echo v$NEWVER:; git log --pretty='format: %s' $OLDVER..HEAD | grep 
-v l10n | grep -v makedist | grep -v tools/release | grep -v nsi | grep -v -E 
'Update .+ translation'; echo
 curl http://wiki.xfce.org/_export/xhtml/midori/faq | \
 sed 's@This is a list of frequently asked questions@This is a 
href=http://wiki.xfce.org/midori/faq;a snapshot of the online FAQ/a@g' | \
 sed 's@link rel=style.*@link rel=stylesheet href=faq.css /@g' 
 data/faq.html
 elif [ x$1 = xafter ]; then
-echo git commit -m 'Bump version to $NEWVER'';' git tag -a $NEWVER -m 
'Bump version to $NEWVER'
+echo -n git commit -m 'Bump version to $NEWVER'
+case $SHELL in
+*fish*)
+echo -n '; and ' ;;
+*)
+echo -n '  ' ;;
+esac
+echo git tag -a $NEWVER -m 'Bump version to $NEWVER'
 echo http://git.xfce.org/apps/midori/snapshot/midori-$NEWVER.tar.bz2
 echo https://releases.xfce.org/
 echo Press RETURN to update Launchpad bugs now; read yes
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Prompt for downloading tarball after pushing tagged commit

2013-05-17 Thread Christian Dywan
Updating branch refs/heads/master
 to 8eab6dfe4bc0f89e65cbba434d3893c664e67acc (commit)
   from 5fd74d20aef298800055d37c4d455759d579bc81 (commit)

commit 8eab6dfe4bc0f89e65cbba434d3893c664e67acc
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri May 17 20:38:50 2013 +0200

Prompt for downloading tarball after pushing tagged commit

 tools/release |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/release b/tools/release
index ce10bb7..78ab4f9 100755
--- a/tools/release
+++ b/tools/release
@@ -27,7 +27,8 @@ elif [ x$1 = xafter ]; then
 echo -n '  ' ;;
 esac
 echo git tag -a $NEWVER -m 'Bump version to $NEWVER'
-echo http://git.xfce.org/apps/midori/snapshot/midori-$NEWVER.tar.bz2
+echo Press RETURN to download tarball now; read yes
+wget http://git.xfce.org/apps/midori/snapshot/midori-$NEWVER.tar.bz2
 echo https://releases.xfce.org/
 echo Press RETURN to update Launchpad bugs now; read yes
 if [ -n $(which bugreleaser 1/dev/null) ]; then
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori|0.5.2 Creating annotated tag 0.5.2

2013-05-17 Thread Christian Dywan
Updating annotated tag refs/tags/0.5.2
 as new annotated tag
 to 9e82f8cedfdb7f143176e7f8eca68c45a0ce2ae0 (tag)
   succeeds 0.5.1-6-g8eab6df
  tagged by Christian Dywan christ...@twotoasts.de
 on 2013-05-17 20:40 +0200

Christian Dywan (1):
  Bump version to 0.5.2

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Bump version to 0.5.2

2013-05-17 Thread Christian Dywan
Updating branch refs/heads/master
 to 8af8d47dc1e8e625df8a52b1c9c9d00d8d921054 (commit)
   from 8eab6dfe4bc0f89e65cbba434d3893c664e67acc (commit)

commit 8af8d47dc1e8e625df8a52b1c9c9d00d8d921054
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri May 17 20:40:41 2013 +0200

Bump version to 0.5.2

 ChangeLog |3 +++
 win32/makedist/midori.nsi |2 +-
 wscript   |2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2532059..7e2a94f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 This file is licensed under the terms of the expat license, see the file EXPAT.
 
+v0.5.2:
+ Re-release with a proper version number and changelog
+
 v0.5.1:
  Fix mouse gesture regression breaking context menu
  Fix --run command line switch by midori_paths_init
diff --git a/win32/makedist/midori.nsi b/win32/makedist/midori.nsi
index 3e8cfcc..840ac60 100644
--- a/win32/makedist/midori.nsi
+++ b/win32/makedist/midori.nsi
@@ -21,7 +21,7 @@ RequestExecutionLevel admin ; set execution level for Windows 
Vista
 ; helper defines  ;
 ;;;
 !define PRODUCT_NAME Midori
-!define PRODUCT_VERSION 0.5.1
+!define PRODUCT_VERSION 0.5.2
 !define PRODUCT_BUILD 0
 !define PRODUCT_VERSION_ID ${PRODUCT_VERSION}.${PRODUCT_BUILD}
 !define PRODUCT_PUBLISHER Christian Dywan
diff --git a/wscript b/wscript
index 311e042..7d9aba0 100644
--- a/wscript
+++ b/wscript
@@ -28,7 +28,7 @@ import misc
 from Configure import find_program_impl
 
 APPNAME = 'midori'
-VERSION = VERSION_FULL = '0.5.1'
+VERSION = VERSION_FULL = '0.5.2'
 VERSION_SUFFIX = ' (%s)' % VERSION
 
 try:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Bump version to 0.5.1

2013-05-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 19c47083c49ff7020f86719a3d1e38464b216ce5 (commit)
   from d0c884a7848a99b09c0e1f7c08137a6ae275d7a7 (commit)

commit 19c47083c49ff7020f86719a3d1e38464b216ce5
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu May 16 23:25:22 2013 +0200

Bump version to 0.5.1

 ChangeLog |   24 +
 README|2 +-
 data/faq.html |   79 ++--
 win32/makedist/midori.nsi |2 +-
 wscript   |2 +-
 5 files changed, 81 insertions(+), 28 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ccfb036..2532059 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
 This file is licensed under the terms of the expat license, see the file EXPAT.
 
+v0.5.1:
+ Fix mouse gesture regression breaking context menu
+ Fix --run command line switch by midori_paths_init
+ Fix bug in size calculation for the history list popup
+ Handle diagnostic dialog argument in running instance
+ Fix feed panel default value crash
+ Ensure existence of the applications directory
+ Fix download tooltip crash and extend test case
+ Integrate user interaction exploit demo in about:
+ Don't convey loading or progress on special pages
+ Address missing NULL checks and dead code found by clang
+ No security window for blank pages, but a search icon
+ Introduce UI for created apps/ launchers: Web App Manager
+ Add custom-title setting to override browser title
+ Add a Gtk.Entry to --plain mode for entering URLs
+ Deprecate middle_click_opens_selection in favour of gtk-enable-primary-paste
+
+ Webkit2:
+ Require 1.11.91 aka 2.0.0 for WebKit2
+ Delayed load, clear favicons, clear HTTP cache, tab favicons
+ Navigation policy, mouse buttons, security details
+ basic cookies, download dialog, res://, stock://, print
+ Zoom, default-charset, view-source, spell-check, prefetch
+ Back/ forward, enable-java, plugin listing, web inspector
 v0.5.0:
  Store --execute arguments in string array
  Prevent overlay frame from being caught by show_all
diff --git a/README b/README
index c9cbc2c..3940bae 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ Midori is a lightweight web browser.
 Requirements: GLib 2.22, GTK+ 2.16, WebkitGTK+ 1.1.17, libXML2,
   libsoup 2.27.90, sqlite 3.0, Vala 0.14
 
-Optional: GTK+ 3.0, Unique 0.9, libnotify, gcr, Granite 0.2
+Optional: GTK+ 3.0, Unique 0.9, libnotify, gcr, Granite 0.2, WebKit2GTK+ 
1.11.91/ 2.0.0
 
 For installation instructions read INSTALL.
 
diff --git a/data/faq.html b/data/faq.html
index 5335436..3f44a7d 100644
--- a/data/faq.html
+++ b/data/faq.html
@@ -4,8 +4,8 @@
   meta charset=utf-8 /
   titlemidori:faq/title
 meta name=generator content=DokuWiki/
-meta name=robots content=index,follow/
-meta name=date content=2013-03-23T11:08:29+0100/
+meta name=robots content=noindex,nofollow/
+meta name=date content=2013-05-13T12:47:33+0200/
 meta name=keywords content=midori,faq/
 link rel=search type=application/opensearchdescription+xml 
href=/lib/exe/opensearch.php title=Xfce Wiki/
 link rel=start href=//
@@ -49,6 +49,7 @@
 li class=level2div class=lia href=#portable_modewin32Portable 
mode/ Win32/a/div/li
 li class=level2div class=lia href=#kiosk_modeKiosk 
mode/a/div/li
 li class=level2div class=lia 
href=#always_open_midori_in_fullscreenAlways open Midori in 
Fullscreen/a/div/li
+li class=level2div class=lia 
href=#overriding_settings_and_loading_extensionsOverriding settings and 
loading extensions/a/div/li
 /ul
 /li
 li class=level1div class=lia href=#proxy_serversProxy 
servers/a/div/li
@@ -306,6 +307,10 @@ nspluginwrapper is a program that runs Flash and other 
Netscape plugins in a sep
 span class=kw2sudo/span nspluginwrapper span class=re5-i/span 
span class=sy0//spanusrspan class=sy0//spanlibspan 
class=sy0//spanflashplugin-installerspan 
class=sy0//spanlibflashplayer.so
 nspluginwrapper span class=re5-v/span span class=re5-a/span span 
class=re5-n/span span class=re5-i/span/pre
 
+p
+Another remedy is using WebKit2 - starting with Midori 0.4.9 experimental 
support is available, a 
href=https://trac.webkit.org/wiki/WebKitGTK/WebKit2Roadmap; class=urlextern 
title=https://trac.webkit.org/wiki/WebKitGTK/WebKit2Roadmap;  
rel=nofollowprogress on WebKit2GTK+ can be seen in the WebKit wiki/a.
+/p
+
 /div
 
 h4 id=https_urls_won_t_loadHTTPS URLS won#039;t load/h4
@@ -584,12 +589,12 @@ Most settings listed at a 
href=http://webkitgtk.org/reference/webkitgtk/stable
 /p
 
 /div
-!-- EDIT5 SECTION Flash doesn't work [4387-12513] --
+!-- EDIT5 SECTION Flash doesn't work [4387-12724] --
 h1 class=sectionedit6 id=privacyPrivacy/h1
 div class=level1
 
 /div
-!-- EDIT6 SECTION Privacy [12514-12536] --
+!-- EDIT6 SECTION Privacy [12725-12747] --
 h2 class=sectionedit7 id=blacklist_cookiesBlacklist cookies/h2
 div class=level2
 
@@ -615,7 +620,7 @@ The feature is currently experimental and will change in 
future versions.
 /p
 
 /div
-!-- EDIT7

[Xfce4-commits] midori|0.5.1 Creating annotated tag 0.5.1

2013-05-16 Thread Christian Dywan
Updating annotated tag refs/tags/0.5.1
 as new annotated tag
 to bdfaf1afd51f52592e4ce3dc93b27fa0c830ffe6 (tag)
   succeeds 0.5.0-138-ge4ff0d3
  tagged by Christian Dywan christ...@twotoasts.de
 on 2013-05-16 23:05 +0200

Christian Dywan (1):
  Remove forgotten debugging aid blocking context menu with mouse gestures

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Call midori_extension_is_active on extension_item not the array

2013-05-15 Thread Christian Dywan
Updating branch refs/heads/master
 to f224fa090427ecc83b5e4a7befb10fe97d62c78b (commit)
   from 3432d24aaa9185e145f3c5e4616312cb2078ecf2 (commit)

commit f224fa090427ecc83b5e4a7befb10fe97d62c78b
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue May 14 23:38:18 2013 +0200

Call midori_extension_is_active on extension_item not the array

 midori/midori-extension.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index 7fd76c0..c84ee37 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -722,7 +722,7 @@ midori_extension_activate (GObject* extension,
 midori_extension_add_to_list (app, extension_item, 
filename);
 g_object_set_data_full (G_OBJECT (extension_item), 
filename, g_strdup (filename), g_free);
 }
-if (activate  !midori_extension_is_active (MIDORI_EXTENSION 
(extension))
+if (activate  !midori_extension_is_active (MIDORI_EXTENSION 
(extension_item))
   filename  strstr (filename, key))
 {
 g_signal_emit_by_name (extension_item, activate, app);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Insert new transfer items left-most in the toolbar

2013-05-15 Thread Christian Dywan
Updating branch refs/heads/master
 to e4ff0d36516e0ff035a5371d7b623f0aef7605f1 (commit)
   from f224fa090427ecc83b5e4a7befb10fe97d62c78b (commit)

commit e4ff0d36516e0ff035a5371d7b623f0aef7605f1
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed May 15 21:38:16 2013 +0200

Insert new transfer items left-most in the toolbar

 extensions/transfers.vala |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/extensions/transfers.vala b/extensions/transfers.vala
index e350745..e5c6a92 100644
--- a/extensions/transfers.vala
+++ b/extensions/transfers.vala
@@ -387,7 +387,8 @@ namespace Transfers {
 
 void transfer_added (GLib.Object item) {
 var transfer = item as Transfer;
-insert (new TransferButton (transfer), -1);
+/* Newest item on the left */
+insert (new TransferButton (transfer), 0);
 clear.sensitive = true;
 show ();
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Remove forgotten debugging aid blocking context menu with mouse gestures

2013-05-15 Thread Christian Dywan
Updating branch refs/heads/master
 to d0c884a7848a99b09c0e1f7c08137a6ae275d7a7 (commit)
   from e4ff0d36516e0ff035a5371d7b623f0aef7605f1 (commit)

commit d0c884a7848a99b09c0e1f7c08137a6ae275d7a7
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed May 15 21:53:38 2013 +0200

Remove forgotten debugging aid blocking context menu with mouse gestures

Fixes: https://bugs.launchpad.net/bugs/1179540

 extensions/mouse-gestures.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/extensions/mouse-gestures.c b/extensions/mouse-gestures.c
index 6339797..46c14c8 100644
--- a/extensions/mouse-gestures.c
+++ b/extensions/mouse-gestures.c
@@ -339,7 +339,7 @@ mouse_gestures_button_release_event_cb (GtkWidget*  
web_view,
 
 mouse_gesture_clear (gesture);
 
-if (MIDORI_EVENT_CONTEXT_MENU (event)  0)
+if (MIDORI_EVENT_CONTEXT_MENU (event))
 {
 GtkWidget* menu = gtk_menu_new ();
 midori_view_populate_popup (view, menu, TRUE);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix packing of the transferbar in the statusbar

2013-05-14 Thread Christian Dywan
Updating branch refs/heads/master
 to dfa76db581e5749af589c3fb2f72c3c67ca5cb74 (commit)
   from 390bf5b9d0fe8a4327b35a5ea3d7e2d45fa65782 (commit)

commit dfa76db581e5749af589c3fb2f72c3c67ca5cb74
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue May 14 19:51:11 2013 +0200

Fix packing of the transferbar in the statusbar

 extensions/transfers.vala |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/extensions/transfers.vala b/extensions/transfers.vala
index abe557a..e350745 100644
--- a/extensions/transfers.vala
+++ b/extensions/transfers.vala
@@ -480,9 +480,9 @@ namespace Transfers {
 widgets.append (viewable);
 var toolbar = new Toolbar (array);
 #if HAVE_GTK3
-browser.statusbar.pack_end (toolbar);
+browser.statusbar.pack_end (toolbar, false, false);
 #else
-browser.statusbar.pack_start (toolbar);
+browser.statusbar.pack_start (toolbar, false, false);
 #endif
 widgets.append (toolbar);
 // TODO: popover
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Drop unnecessary Clutter requirement from Granite build

2013-05-14 Thread Christian Dywan
Updating branch refs/heads/master
 to abd0957e7ed7657bd80cfcc08ad71c1988e8af6e (commit)
   from dfa76db581e5749af589c3fb2f72c3c67ca5cb74 (commit)

commit abd0957e7ed7657bd80cfcc08ad71c1988e8af6e
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue May 14 19:52:15 2013 +0200

Drop unnecessary Clutter requirement from Granite build

 extensions/wscript_build |4 ++--
 midori/wscript_build |4 ++--
 wscript  |1 -
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/extensions/wscript_build b/extensions/wscript_build
index 5b698bc..11d1ab4 100644
--- a/extensions/wscript_build
+++ b/extensions/wscript_build
@@ -35,7 +35,7 @@ for extension in extensions:
 obj.target = target
 obj.includes = '.. ../katze ../midori'
 obj.source = source
-obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML CLUTTER GRANITE'
+obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML GRANITE'
 if 'vala' in source:
 obj.env.append_value ('CCFLAGS', '-w')
 obj.vapi_dirs = '../midori ../katze'
@@ -49,7 +49,7 @@ for extension in extensions:
 else:
 obj.packages += ' webkitgtk-3.0'
 if bld.env['HAVE_GRANITE']:
-obj.packages += ' clutter-gtk-1.0 granite'
+obj.packages += ' granite'
 obj.install_path = '${LIBDIR}/midori'
 # See LINKFLAGS in wscript: w/ o it we get several undefined reference 
errors
 if bld.env['platform'] == 'win32':
diff --git a/midori/wscript_build b/midori/wscript_build
index e42462b..b5b6ef8 100644
--- a/midori/wscript_build
+++ b/midori/wscript_build
@@ -9,7 +9,7 @@ import os
 progressive = True
 libs = 'M UNIQUE LIBSOUP GMODULE GTHREAD LIBIDN GIO GTK SQLITE ' \
'LIBNOTIFY WEBKIT JAVASCRIPTCOREGTK LIBXML X11 XSS WS2_32 ' \
-   'GCR GRANITE CLUTTER ZEITGEIST'
+   'GCR GRANITE ZEITGEIST'
 
 if Options.commands['build'] or Options.commands['check']:
 blddir = str (bld.bldnode)[6:] # dir:// + absolute path
@@ -34,7 +34,7 @@ if progressive:
 else:
 obj.packages += ' gtk+-2.0'
 if bld.env['HAVE_GRANITE']:
-obj.packages += ' clutter-gtk-1.0 granite'
+obj.packages += ' granite'
 obj.install_path = None
 bld.add_group ()
 
diff --git a/wscript b/wscript
index 014af53..45ead39 100644
--- a/wscript
+++ b/wscript
@@ -208,7 +208,6 @@ def configure (conf):
 option_checkfatal ('granite', 'new notebook, pop-overs')
 conf.define ('GRANITE_VERSION', 'No')
 else:
-check_pkg ('clutter-gtk-1.0', '1.0')
 conf.env.append_value ('VALAFLAGS', '-D HAVE_GRANITE')
 else:
 conf.define ('GRANITE_VERSION', 'No')
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Always load Transfers extension in Private Browsing

2013-05-14 Thread Christian Dywan
Updating branch refs/heads/master
 to 0efebccc4812af9742108d1d47ce60b1f3d4dc4f (commit)
   from abd0957e7ed7657bd80cfcc08ad71c1988e8af6e (commit)

commit 0efebccc4812af9742108d1d47ce60b1f3d4dc4f
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue May 14 19:52:53 2013 +0200

Always load Transfers extension in Private Browsing

This matches behavior of previous versions.

 midori/midori-frontend.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/midori/midori-frontend.c b/midori/midori-frontend.c
index e05dde8..d021307 100644
--- a/midori/midori-frontend.c
+++ b/midori/midori-frontend.c
@@ -230,6 +230,11 @@ midori_private_app_new (const gchar* config,
 midori_browser_assert_action (browser, execute_commands[i]);
 midori_browser_activate_action (browser, execute_commands[i]);
 }
+
+/* FIXME need proper stock extension mechanism */
+midori_browser_activate_action (browser, libtransfers. G_MODULE_SUFFIX 
=true);
+g_assert (g_module_error () == NULL);
+
 return browser;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix --run command line switch by midori_paths_init

2013-05-14 Thread Christian Dywan
Updating branch refs/heads/master
 to 2258ab2cbc8fa3f23e8d5390ed74d29f209a6db9 (commit)
   from 0efebccc4812af9742108d1d47ce60b1f3d4dc4f (commit)

commit 2258ab2cbc8fa3f23e8d5390ed74d29f209a6db9
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue May 14 19:55:36 2013 +0200

Fix --run command line switch by midori_paths_init

 midori/main.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 0c53bdb..7c92ea7 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -352,6 +352,8 @@ main (intargc,
 
 if (g_file_get_contents (uris ? *uris : NULL, script, NULL, error))
 {
+midori_paths_init (MIDORI_RUNTIME_MODE_PRIVATE, config);
+
 MidoriBrowser* browser = midori_browser_new ();
 MidoriWebSettings* settings = midori_browser_get_settings 
(browser);
 #ifndef HAVE_WEBKIT2
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix tab/ web view mixup causing crash in internal view source

2013-05-14 Thread Christian Dywan
Updating branch refs/heads/master
 to 12b9198e7315668c4f843198fc8cdfe7ff6ee8a6 (commit)
   from 2258ab2cbc8fa3f23e8d5390ed74d29f209a6db9 (commit)

commit 12b9198e7315668c4f843198fc8cdfe7ff6ee8a6
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue May 14 20:03:41 2013 +0200

Fix tab/ web view mixup causing crash in internal view source

 midori/midori-browser.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 0f83c0d..b5ff23c 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3470,7 +3470,7 @@ _action_source_view_activate (GtkAction* action,
 
 source = midori_view_new_with_item (NULL, browser-settings);
 source_view = midori_view_get_web_view (MIDORI_VIEW (source));
-midori_tab_set_view_source (MIDORI_TAB (source_view), TRUE);
+midori_tab_set_view_source (MIDORI_TAB (source), TRUE);
 webkit_web_view_load_uri (WEBKIT_WEB_VIEW (source_view), source_uri);
 midori_browser_add_tab (browser, source);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Omit Transfers extension from array of all extensions

2013-05-07 Thread Christian Dywan
Updating branch refs/heads/master
 to 9fd03f325c45de86496dc1fe629dd479b010829c (commit)
   from c7ec6225878af3257f25594813f5814ff397fb82 (commit)

commit 9fd03f325c45de86496dc1fe629dd479b010829c
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed May 8 01:14:12 2013 +0200

Omit Transfers extension from array of all extensions

It shouldn't be de-activatable or show up in UI.

 midori/midori-extension.c |   12 +---
 midori/midori-extension.h |2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index c7ac5ca..7fd76c0 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -559,8 +559,8 @@ midori_extension_load_from_folder (MidoriApp* app,
 while (keys  (filename = keys[i++]))
 midori_extension_activate_gracefully (app, extension_path, 
filename, activate);
 /* FIXME need proper stock extension mechanism */
-midori_extension_activate_gracefully (app, extension_path, 
libtransfers. G_MODULE_SUFFIX, activate);
-g_assert (g_module_error () == NULL);
+GObject* extension = midori_extension_activate_gracefully (app, 
extension_path, libtransfers. G_MODULE_SUFFIX, activate);
+g_assert (extension != NULL);
 }
 else
 {
@@ -634,7 +634,7 @@ midori_extension_load_from_file (const gchar* 
extension_path,
 return extension;
 }
 
-void
+GObject*
 midori_extension_activate_gracefully (MidoriApp*   app,
   const gchar* extension_path,
   const gchar* filename,
@@ -654,7 +654,10 @@ midori_extension_activate_gracefully (MidoriApp*   app,
 katze_array_add_item (extensions, extension);
 g_object_unref (extensions);
 g_object_unref (extension);
+return NULL;
 }
+else
+return extension;
 }
 
 static void
@@ -668,6 +671,9 @@ midori_extension_add_to_list (MidoriApp*   app,
 g_return_if_fail (KATZE_IS_ARRAY (extensions));
 if (katze_array_get_item_index (extensions, extension) = 0)
 return;
+/* FIXME need proper stock extension mechanism */
+if (!strcmp (filename, libtransfers. G_MODULE_SUFFIX))
+return;
 
 katze_array_add_item (extensions, extension);
 g_object_unref (extensions);
diff --git a/midori/midori-extension.h b/midori/midori-extension.h
index adda774..5cf666b 100644
--- a/midori/midori-extension.h
+++ b/midori/midori-extension.h
@@ -60,7 +60,7 @@ midori_extension_activate   (GObject* extension,
  gboolean activate,
  MidoriApp*   app);
 
-void
+GObject*
 midori_extension_activate_gracefully (MidoriApp*   app,
   const gchar* extension_path,
   const gchar* filename,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix bug in size calculation for the history list popup

2013-05-07 Thread Christian Dywan
Updating branch refs/heads/master
 to a83342032df8456a74d4137d9d79d418b020ca01 (commit)
   from 9fd03f325c45de86496dc1fe629dd479b010829c (commit)

commit a83342032df8456a74d4137d9d79d418b020ca01
Author: André Stösel an...@stoesel.de
Date:   Mon May 6 01:27:38 2013 +0200

Fix bug in size calculation for the history list popup

with GTK3 it is necessary to show the widget before the get_preferred_size 
call

 extensions/history-list.vala |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/extensions/history-list.vala b/extensions/history-list.vala
index 8aaea2a..79253a6 100644
--- a/extensions/history-list.vala
+++ b/extensions/history-list.vala
@@ -136,13 +136,14 @@ namespace HistoryList {
 foreground-gdk, TabTreeCells.TREE_CELL_FG,
 cell-background-gdk, TabTreeCells.TREE_CELL_BG);
 
+this.show_all ();
+
 Requisition requisition;
 int height;
 int max_lines = 10;
 #if HAVE_GTK3
 requisition = Requisition();
-this.treeview.get_preferred_width(out requisition.width, null);
-this.treeview.get_preferred_height(out requisition.height, null);
+this.treeview.get_preferred_size(out requisition, null);
 #else
 this.treeview.size_request (out requisition);
 #endif
@@ -153,8 +154,6 @@ namespace HistoryList {
 height = requisition.height + 2;
 }
 sw.set_size_request (320, height);
-
-this.show_all ();
 }
 
 public override void make_update () {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Don't warn if certificate isn't pinned

2013-05-07 Thread Christian Dywan
Updating branch refs/heads/master
 to 71de7fbc96bb9a2a0391b6975950a8b10bee6fd5 (commit)
   from a83342032df8456a74d4137d9d79d418b020ca01 (commit)

commit 71de7fbc96bb9a2a0391b6975950a8b10bee6fd5
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed May 8 01:39:03 2013 +0200

Don't warn if certificate isn't pinned

This is indeed expected behavior. The condition changed.

 midori/midori-view.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index aa405d2..0d45de2 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -864,8 +864,6 @@ midori_view_web_view_navigation_decision_cb (WebKitWebView* 
web_view
 g_error_free (error);
 }
 }
-else
-g_warn_if_reached ();
 g_object_unref (gcr_cert);
 }
 if (tls_cert != NULL)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Use application name rather than literal Midori string

2013-05-07 Thread Christian Dywan
Updating branch refs/heads/master
 to c9962943157798075613db721d6f1d5d4112dc11 (commit)
   from 71de7fbc96bb9a2a0391b6975950a8b10bee6fd5 (commit)

commit c9962943157798075613db721d6f1d5d4112dc11
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed May 8 02:30:42 2013 +0200

Use application name rather than literal Midori string

 midori/midori-app.c  |2 +-
 midori/midori-view.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/midori/midori-app.c b/midori/midori-app.c
index f25c78a..25ba4c4 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -1456,7 +1456,7 @@ void
 midori_error (const gchar* format,
   ...)
 {
-g_printerr (%s - , _(Midori));
+g_printerr (%s - , g_get_application_name ());
 va_list args;
 va_start (args, format);
 g_vfprintf (stderr, format, args);
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 0d45de2..75b4fe4 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -4064,7 +4064,7 @@ midori_view_list_versions (GString* markup,
gboolean html)
 {
 midori_view_add_version (markup, html, g_strdup_printf (%s %s (%s),
-_(Midori), PACKAGE_VERSION, midori_app_get_name (NULL)));
+g_get_application_name (), PACKAGE_VERSION, midori_app_get_name 
(NULL)));
 midori_view_add_version (markup, html, g_strdup_printf (GTK+ %s 
(%u.%u.%u)\tGlib %s (%u.%u.%u),
 GTK_VERSION, gtk_major_version, gtk_minor_version, gtk_micro_version,
 GIO_VERSION, glib_major_version, glib_minor_version, 
glib_micro_version));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Document Midori.Tab.view_source as since 0.5.1

2013-05-07 Thread Christian Dywan
Updating branch refs/heads/master
 to c748228167ed05921b97ae1856f42a188cc324ad (commit)
   from c9962943157798075613db721d6f1d5d4112dc11 (commit)

commit c748228167ed05921b97ae1856f42a188cc324ad
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed May 8 02:31:23 2013 +0200

Document Midori.Tab.view_source as since 0.5.1

 midori/midori-tab.vala |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/midori/midori-tab.vala b/midori/midori-tab.vala
index 8f2a361..652db7f 100644
--- a/midori/midori-tab.vala
+++ b/midori/midori-tab.vala
@@ -138,6 +138,7 @@ namespace Midori {
 }
 
 #if HAVE_WEBKIT2
+/* Since: 0.5.1 */
 public bool view_source { get {
 return web_view.view_mode == WebKit.ViewMode.SOURCE;
 }
@@ -146,6 +147,7 @@ namespace Midori {
 }
 }
 #else
+/* Since: 0.5.1 */
 public bool view_source { get {
 return web_view.get_view_source_mode ();
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Guard browser delete-event against GTK+2/3 difference

2013-04-26 Thread Christian Dywan
Updating branch refs/heads/master
 to e5aba6e10f0e5482878be919cc9354f695d2c3f4 (commit)
   from 3325a70f607ab39091d8a61526efb8265a595864 (commit)

commit e5aba6e10f0e5482878be919cc9354f695d2c3f4
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 26 19:04:08 2013 +0200

Guard browser delete-event against GTK+2/3 difference

Fixes: https://bugs.launchpad.net/midori/+bug/1172538

 extensions/transfers.vala |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/extensions/transfers.vala b/extensions/transfers.vala
index adc948c..a4fcd4b 100644
--- a/extensions/transfers.vala
+++ b/extensions/transfers.vala
@@ -439,7 +439,11 @@ namespace Transfers {
 transfer.removed ();
 }
 
+#if HAVE_GTK3
 bool browser_closed (Gtk.Widget widget, Gdk.EventAny event) {
+#else
+bool browser_closed (Gtk.Widget widget, Gdk.Event event) {
+#endif
 var browser = widget as Midori.Browser;
 bool pending_downloads = false;
 foreach (GLib.Object item in array.get_items ()) {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Improve transfer statusbar/ clear visibility/ sensitivity

2013-04-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 3c9af53553fce48422db34ee5e4809e030398413 (commit)
   from e5aba6e10f0e5482878be919cc9354f695d2c3f4 (commit)

commit 3c9af53553fce48422db34ee5e4809e030398413
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 26 19:39:08 2013 +0200

Improve transfer statusbar/ clear visibility/ sensitivity

 extensions/transfers.vala |   26 +++---
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/extensions/transfers.vala b/extensions/transfers.vala
index a4fcd4b..d836a51 100644
--- a/extensions/transfers.vala
+++ b/extensions/transfers.vala
@@ -74,6 +74,15 @@ namespace Transfers {
 }
 }
 
+static bool pending_transfers (Katze.Array array) {
+foreach (GLib.Object item in array.get_items ()) {
+var transfer = item as Transfer;
+if (!transfer.finished)
+return true;
+}
+return false;
+}
+
 private class Sidebar : Gtk.VBox, Midori.Viewable {
 Gtk.Toolbar? toolbar = null;
 Gtk.ToolButton clear;
@@ -367,7 +376,8 @@ namespace Transfers {
 clear.clicked.connect (clear_clicked);
 clear.sensitive = !array.is_empty ();
 insert (clear, -1);
-show_all ();
+clear.show ();
+clear.sensitive = false;
 
 this.array = array;
 array.add_item.connect (transfer_added);
@@ -380,6 +390,7 @@ namespace Transfers {
 var transfer = item as Transfer;
 insert (new TransferButton (transfer), -1);
 clear.sensitive = true;
+show ();
 
 Gtk.Requisition req;
 Gtk.widget_size_request (parent, out req);
@@ -391,8 +402,9 @@ namespace Transfers {
 }
 
 void transfer_removed (GLib.Object item) {
+clear.sensitive = pending_transfers (array);
 if (array.is_empty ())
-clear.sensitive = false;
+hide ();
 }
 }
 
@@ -445,15 +457,7 @@ namespace Transfers {
 bool browser_closed (Gtk.Widget widget, Gdk.Event event) {
 #endif
 var browser = widget as Midori.Browser;
-bool pending_downloads = false;
-foreach (GLib.Object item in array.get_items ()) {
-var transfer = item as Transfer;
-if (!transfer.finished) {
-pending_downloads = true;
-break;
-}
-}
-if (pending_downloads) {
+if (pending_transfers (array)) {
 var dialog = new Gtk.MessageDialog (browser,
 Gtk.DialogFlags.DESTROY_WITH_PARENT,
 Gtk.MessageType.WARNING, Gtk.ButtonsType.NONE,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix transfers popup menu

2013-04-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 09518e771615c60d96efeed8ce8cabcf34fa0fe8 (commit)
   from 3c9af53553fce48422db34ee5e4809e030398413 (commit)

commit 09518e771615c60d96efeed8ce8cabcf34fa0fe8
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 26 20:04:35 2013 +0200

Fix transfers popup menu

 extensions/transfers.vala |3 +--
 katze/katze.vapi  |7 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/extensions/transfers.vala b/extensions/transfers.vala
index d836a51..abe557a 100644
--- a/extensions/transfers.vala
+++ b/extensions/transfers.vala
@@ -218,8 +218,7 @@ namespace Transfers {
 menuitem.image = new Gtk.Image.from_stock (Gtk.STOCK_COPY, 
Gtk.IconSize.MENU);
 menu.append (menuitem);
 menu.show_all ();
-// Katze.widget_popup (treeview, menu, null, 
Katze.MenuPosition.CURSOR);
-menu.popup (null, null, null, event != null ? event.button : 
0, event != null ? event.time : 0);
+Katze.widget_popup (treeview, menu, null, 
Katze.MenuPos.CURSOR);
 
 return true;
 }
diff --git a/katze/katze.vapi b/katze/katze.vapi
index 79ee32c..73eb663 100644
--- a/katze/katze.vapi
+++ b/katze/katze.vapi
@@ -5,6 +5,13 @@
 namespace Katze {
 static void assert_str_equal (string input, string result, string? 
expected);
 static unowned Gtk.Widget property_proxy (void* object, string property, 
string? hint);
+[CCode (cheader_filename = katze/katze.h, cprefix = 
KATZE_MENU_POSITION_)]
+enum MenuPos {
+CURSOR,
+LEFT,
+RIGHT
+}
+static void widget_popup (Gtk.Widget? widget, Gtk.Menu menu, 
Gdk.EventButton? event, MenuPos pos);
 
 [CCode (cheader_filename = katze/katze.h)]
 public class Array : Katze.Item {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Never emit 'activate' signal on active extensions

2013-04-26 Thread Christian Dywan
Updating branch refs/heads/master
 to a6396e4a2f613af9bec8087cfdfa18c2533bb7d4 (commit)
   from 09518e771615c60d96efeed8ce8cabcf34fa0fe8 (commit)

commit a6396e4a2f613af9bec8087cfdfa18c2533bb7d4
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 26 20:32:25 2013 +0200

Never emit 'activate' signal on active extensions

 midori/midori-extension.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index 4d5d63d..8541ddc 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -690,7 +690,7 @@ midori_extension_activate (GObject* extension,
 {
 if (filename != NULL)
 midori_extension_add_to_list (app, MIDORI_EXTENSION (extension), 
filename);
-if (activate)
+if (activate  !midori_extension_is_active (MIDORI_EXTENSION 
(extension)))
 g_signal_emit_by_name (extension, activate, app);
 }
 else if (KATZE_IS_ARRAY (extension))
@@ -713,7 +713,8 @@ midori_extension_activate (GObject* extension,
 midori_extension_add_to_list (app, extension_item, 
filename);
 g_object_set_data_full (G_OBJECT (extension_item), 
filename, g_strdup (filename), g_free);
 }
-if (activate  filename  strstr (filename, key))
+if (activate  !midori_extension_is_active (MIDORI_EXTENSION 
(extension))
+  filename  strstr (filename, key))
 {
 g_signal_emit_by_name (extension_item, activate, app);
 success = TRUE;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Always load Transfers extension

2013-04-26 Thread Christian Dywan
Updating branch refs/heads/master
 to 8c673bc4f32d0ff19cf83a019c8788b42d536b4a (commit)
   from a6396e4a2f613af9bec8087cfdfa18c2533bb7d4 (commit)

commit 8c673bc4f32d0ff19cf83a019c8788b42d536b4a
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 26 20:32:51 2013 +0200

Always load Transfers extension

 midori/midori-extension.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index 8541ddc..c7ac5ca 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -558,6 +558,9 @@ midori_extension_load_from_folder (MidoriApp* app,
 const gchar* filename;
 while (keys  (filename = keys[i++]))
 midori_extension_activate_gracefully (app, extension_path, 
filename, activate);
+/* FIXME need proper stock extension mechanism */
+midori_extension_activate_gracefully (app, extension_path, 
libtransfers. G_MODULE_SUFFIX, activate);
+g_assert (g_module_error () == NULL);
 }
 else
 {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Refactor computing background color for hostname into helper function.

2013-04-26 Thread Christian Dywan
Updating branch refs/heads/master
 to b6ba20b69ab9efbdaa586c4bcb89385b292ef603 (commit)
   from 8c673bc4f32d0ff19cf83a019c8788b42d536b4a (commit)

commit b6ba20b69ab9efbdaa586c4bcb89385b292ef603
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Sat Apr 20 21:04:23 2013 +0200

Refactor computing background color for hostname into helper function.

 extensions/colorful-tabs.c |  101 
 1 files changed, 55 insertions(+), 46 deletions(-)

diff --git a/extensions/colorful-tabs.c b/extensions/colorful-tabs.c
index 10cb9e4..058c439 100644
--- a/extensions/colorful-tabs.c
+++ b/extensions/colorful-tabs.c
@@ -12,53 +12,75 @@
 
 #include midori/midori.h
 
+static GdkColor
+view_get_bgcolor_for_hostname (MidoriView* view, gchar* hostname)
+{
+GdkColor color;
+GdkPixbuf* icon = midori_view_get_icon (view);
+if (icon != NULL)
+{
+GdkPixbuf* newpix;
+guchar* pixels;
+
+newpix = gdk_pixbuf_scale_simple (icon, 1, 1, GDK_INTERP_BILINEAR);
+pixels = gdk_pixbuf_get_pixels (newpix);
+color.red = pixels[0] * 255;
+color.green = pixels[1] * 255;
+color.blue = pixels[2] * 255;
+}
+else
+{
+gchar* hash, *colorstr;
+
+hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, hostname, 1);
+colorstr = g_strndup (hash, 6 + 1);
+colorstr[0] = '#';
+gdk_color_parse (colorstr, color);
+
+g_free (hash);
+g_free (colorstr);
+}
+
+if ((color.red35000)
+  (color.green  35000)
+  (color.blue   35000))
+{
+color.red   += 2;
+color.green += 2;
+color.blue  += 2;
+}
+
+if (color.red  1)
+color.red = 5000;
+else
+color.red -= 5000;
+if (color.blue  1)
+color.blue = 5000;
+else
+color.blue -= 5000;
+if (color.green  1)
+color.green = 5000;
+else
+color.green -= 5000;
+
+return color;
+}
+
 static void
 colorful_tabs_view_notify_uri_cb (MidoriView*  view,
   GParamSpec*  pspec,
   MidoriExtension* extension)
 {
 gchar* hostname;
-gchar* colorstr;
 GdkColor color;
 GdkColor fgcolor;
-GdkPixbuf* icon;
 
 if (!midori_uri_is_blank (midori_view_get_display_uri (view))
(hostname = midori_uri_parse_hostname (midori_view_get_display_uri 
(view), NULL))
midori_view_get_icon_uri (view) != NULL)
 {
-icon = midori_view_get_icon (view);
-if (icon != NULL)
-{
-GdkPixbuf* newpix;
-guchar* pixels;
-
-newpix = gdk_pixbuf_scale_simple (icon, 1, 1, GDK_INTERP_BILINEAR);
-g_return_if_fail (gdk_pixbuf_get_bits_per_sample (newpix) == 8);
-pixels = gdk_pixbuf_get_pixels (newpix);
-color.red = pixels[0] * 225;
-color.green = pixels[1] * 225;
-color.blue = pixels[2] * 225;
-}
-else
-{
-gchar* hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, 
hostname, 1);
-colorstr = g_strndup (hash, 6 + 1);
-g_free (hash);
-colorstr[0] = '#';
-gdk_color_parse (colorstr, color);
-}
+color = view_get_bgcolor_for_hostname (view, hostname);
 g_free (hostname);
-
-if ((color.red35000)
-  (color.green  35000)
-  (color.blue   35000))
-{
-color.red   += 2;
-color.green += 2;
-color.blue  += 2;
-}
-
 /* Ensure high contrast by enforcing black/ white text colour. */
 if ((color.red41000)
   (color.green  41000)
@@ -67,19 +89,6 @@ colorful_tabs_view_notify_uri_cb (MidoriView*  view,
 else
 gdk_color_parse (#000, fgcolor);
 
-if (color.red  1)
-color.red = 5000;
-else
-color.red -= 5000;
-if (color.blue  1)
-color.blue = 5000;
-else
-color.blue -= 5000;
-if (color.green  1)
-color.green = 5000;
-else
-color.green -= 5000;
-
 midori_view_set_colors (view, fgcolor, color);
 }
 else
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix race condition which causes a blank first tab

2013-04-25 Thread Christian Dywan
Updating branch refs/heads/master
 to 9865598e7f79092760ba9439c9a1e60118021546 (commit)
   from 0e1ffed52d4cfd28a52a3fe09872611563cfe6db (commit)

commit 9865598e7f79092760ba9439c9a1e60118021546
Author: André Stösel an...@stoesel.de
Date:   Thu Apr 25 19:52:58 2013 +0200

Fix race condition which causes a blank first tab

 extensions/delayed-load.vala |8 ++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/extensions/delayed-load.vala b/extensions/delayed-load.vala
index 9ea2c0f..21b6df3 100644
--- a/extensions/delayed-load.vala
+++ b/extensions/delayed-load.vala
@@ -1,5 +1,5 @@
 /*
-   Copyright (C) 2012 André Stösel an...@stoesel.de
+   Copyright (C) 2012-2013 André Stösel an...@stoesel.de
 
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -106,6 +106,7 @@ namespace DelayedLoad {
 
 private class Manager : Midori.Extension {
 private int timeout = 0;
+private bool initialized = false;
 private HashTableMidori.Browser, TabShaker tasks;
 
 public signal void preferences_changed ();
@@ -140,7 +141,7 @@ namespace DelayedLoad {
 item.ref();
 
 int64 delay = item.get_meta_integer (delay);
-if (delay == Midori.Delay.PENDING_UNDELAY  new_view.progress 
 1.0) {
+if (delay == Midori.Delay.PENDING_UNDELAY  new_view.progress 
 1.0  this.initialized) {
 this.schedule_reload (browser, new_view);
 }
 }
@@ -152,6 +153,7 @@ namespace DelayedLoad {
 Midori.View? view = browser.tab as Midori.View;
 
 if (view != null) {
+this.initialized = true;
 Katze.Item item = view.get_proxy_item ();
 item.ref();
 
@@ -189,6 +191,8 @@ namespace DelayedLoad {
 Midori.Browser? focused_browser = app.browser;
 if (focused_browser == null)
 Midori.Timeout.add (50, this.reload_first_tab);
+else
+this.initialized = true;
 
 foreach (Midori.Browser browser in app.get_browsers ()) {
 browser_added (browser);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master transfers: Add properties to Transfer and abstract away WebKit1/ 2

2013-04-23 Thread Christian Dywan
Updating branch refs/heads/master
 to c480c2539bdb531bc26ba02db378a5f9993addb6 (commit)
   from 86fa07f3a1a32d8fb88ab784a45317ffbcad0c1a (commit)

commit c480c2539bdb531bc26ba02db378a5f9993addb6
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Apr 23 19:35:52 2013 +0200

transfers: Add properties to Transfer and abstract away WebKit1/ 2

 extensions/transfers.vala |   64 ++--
 1 files changed, 49 insertions(+), 15 deletions(-)

diff --git a/extensions/transfers.vala b/extensions/transfers.vala
index 9d4d7c7..adc948c 100644
--- a/extensions/transfers.vala
+++ b/extensions/transfers.vala
@@ -26,10 +26,47 @@ namespace Transfers {
 internal signal void remove ();
 internal signal void removed ();
 
+internal int action { get {
+return Midori.Download.get_type (download);
+} }
+internal double progress { get {
+return Midori.Download.get_progress (download);
+} }
+#if HAVE_WEBKIT2
+public bool succeeded { get; protected set; default = false; }
+public bool finished { get; protected set; default = false; }
+internal string destination { get {
+return download.destination;
+} }
+#else
+internal bool succeeded { get {
+return download.status == WebKit.DownloadStatus.FINISHED;
+} }
+internal bool finished { get {
+return Midori.Download.is_finished (download);
+} }
+internal string destination { get {
+return download.destination_uri;
+} }
+#endif
+
 internal Transfer (WebKit.Download download) {
 this.download = download;
+#if HAVE_WEBKIT2
+download.notify[estimated-progress].connect (transfer_changed);
+download.finished.connect (() = {
+succeeded = finished = true;
+changed ();
+});
+download.failed.connect (() = {
+succeeded = false;
+finished = true;
+changed ();
+});
+#else
 download.notify[status].connect (transfer_changed);
 download.notify[progress].connect (transfer_changed);
+#endif
 }
 
 void transfer_changed (GLib.ParamSpec pspec) {
@@ -75,7 +112,7 @@ namespace Transfers {
 void clear_clicked () {
 foreach (GLib.Object item in array.get_items ()) {
 var transfer = item as Transfer;
-if (Midori.Download.is_finished (transfer.download))
+if (transfer.finished)
 transfer.remove ();
 }
 }
@@ -149,24 +186,23 @@ namespace Transfers {
 Transfer transfer;
 store.get (iter, 0, out transfer);
 
-bool finished = transfer.download.status == 
WebKit.DownloadStatus.FINISHED;
 var menu = new Gtk.Menu ();
 var menuitem = new Gtk.ImageMenuItem.from_stock 
(Gtk.STOCK_OPEN, null);
 menuitem.activate.connect (() = {
 Midori.Download.open (transfer.download, treeview);
 });
-menuitem.sensitive = finished;
+menuitem.sensitive = transfer.succeeded;
 menu.append (menuitem);
 menuitem = new Gtk.ImageMenuItem.with_mnemonic (_(Open 
Destination _Folder));
 menuitem.image = new Gtk.Image.from_stock 
(Gtk.STOCK_DIRECTORY, Gtk.IconSize.MENU);
 menuitem.activate.connect (() = {
-var folder = GLib.File.new_for_uri 
(transfer.download.destination_uri);
+var folder = GLib.File.new_for_uri (transfer.destination);
 Sokoke.show_uri (get_screen (), folder.get_parent 
().get_uri (), 0);
 });
 menu.append (menuitem);
 menuitem = new Gtk.ImageMenuItem.with_mnemonic (_(Copy Link 
Loc_ation));
 menuitem.activate.connect (() = {
-string uri = transfer.download.destination_uri;
+string uri = transfer.destination;
 get_clipboard (Gdk.SELECTION_PRIMARY).set_text (uri, -1);
 get_clipboard (Gdk.SELECTION_CLIPBOARD).set_text (uri, -1);
 });
@@ -185,7 +221,7 @@ namespace Transfers {
 Transfer transfer1, transfer2;
 model.get (a, 0, out transfer1);
 model.get (b, 0, out transfer2);
-return transfer1.download.status - transfer2.download.status;
+return (transfer1.finished ? 1 : 0) - (transfer2.finished ? 1 : 0);
 }
 
 void transfer_changed () {
@@ -238,9 +274,8 @@ namespace Transfers {
 Transfer transfer;
 model.get (iter, 0, out transfer);
 string tooltip = Midori.Download.get_tooltip (transfer.download

[Xfce4-commits] midori:master Ensure existence of the applications directory

2013-04-19 Thread Christian Dywan
Updating branch refs/heads/master
 to d74bee7bc88f9b36488a63a216f82b26ca4d953d (commit)
   from 33e562f96ddab048310a4ef83e6146f2ec6092c5 (commit)

commit d74bee7bc88f9b36488a63a216f82b26ca4d953d
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 20 02:18:23 2013 +0200

Ensure existence of the applications directory

 extensions/apps.vala |   11 ++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/extensions/apps.vala b/extensions/apps.vala
index f2b74db..7be0d2a 100644
--- a/extensions/apps.vala
+++ b/extensions/apps.vala
@@ -196,6 +196,14 @@ namespace Apps {
 var data_dir = File.new_for_path (Midori.Paths.get_user_data_dir 
());
 app_folder = data_dir.get_child (applications);
 try {
+try {
+app_folder.make_directory_with_parents (null);
+}
+catch (IOError folder_error) {
+if (!(folder_error is IOError.EXISTS))
+throw folder_error;
+}
+
 monitor = app_folder.monitor_directory (0, null);
 monitor.changed.connect (app_changed);
 
@@ -219,7 +227,8 @@ namespace Apps {
 }
 catch (Error io_error) {
 monitor = null;
-warning (Failed to list .desktop files: %s, 
io_error.message);
+warning (Failed to list .desktop files (%s): %s,
+ app_folder.get_path (), io_error.message);
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix feed panel default value crash

2013-04-19 Thread Christian Dywan
Updating branch refs/heads/master
 to 2fe50cc3131476118c58fd7affb1431ddf5e3524 (commit)
   from d74bee7bc88f9b36488a63a216f82b26ca4d953d (commit)

commit 2fe50cc3131476118c58fd7affb1431ddf5e3524
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 20 02:19:37 2013 +0200

Fix feed panel default value crash

 extensions/feed-panel/main.c |   17 -
 midori/midori-extension.c|3 +++
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/extensions/feed-panel/main.c b/extensions/feed-panel/main.c
index 7d8b89e..a578419 100644
--- a/extensions/feed-panel/main.c
+++ b/extensions/feed-panel/main.c
@@ -105,12 +105,6 @@ static KatzeArray*
 feed_add_item (KatzeArray*  feeds,
const gchar* uri)
 {
-KatzeArray* feed;
-
-feed = NULL;
-
-if (uri)
-{
 if (katze_array_find_token (feeds, uri))
 {
 GtkWidget* dialog;
@@ -124,22 +118,21 @@ feed_add_item (KatzeArray*  feeds,
 gtk_widget_show (dialog);
 g_signal_connect_swapped (dialog, response,
 G_CALLBACK (gtk_widget_destroy), dialog);
-
+return NULL;
 }
 else
 {
 KatzeArray* child;
 
-feed = katze_array_new (KATZE_TYPE_ARRAY);
+KatzeArray* feed = katze_array_new (KATZE_TYPE_ARRAY);
 child = katze_array_new (KATZE_TYPE_ITEM);
 katze_item_set_uri (KATZE_ITEM (feed), uri);
 katze_item_set_token (KATZE_ITEM (feed), uri);
 katze_item_set_uri (KATZE_ITEM (child), uri);
 katze_array_add_item (feeds, feed);
 katze_array_add_item (feed, child);
+return feed;
 }
-}
-return feed;
 }
 
 static void
@@ -503,7 +496,6 @@ MidoriExtension*
 extension_init (void)
 {
 MidoriExtension* extension;
-gchar* sfeed[2];
 
 extension = g_object_new (MIDORI_TYPE_EXTENSION,
 name, _(Feed Panel),
@@ -512,8 +504,7 @@ extension_init (void)
 authors, Dale Whittaker da...@users.sf.net,
 NULL);
 
-sfeed[0] = NULL;
-midori_extension_install_string_list (extension, feeds, sfeed, 1);
+midori_extension_install_string_list (extension, feeds, NULL, 0);
 
 g_signal_connect (extension, activate,
 G_CALLBACK (feed_activate_cb), NULL);
diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index b712c80..4d5d63d 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -389,7 +389,10 @@ midori_extension_activate_cb (MidoriExtension* extension,
 setting_-value = g_key_file_get_string_list 
(extension-priv-key_file,
 settings, setting-name, setting_-length, NULL);
 if (setting_-value == NULL)
+{
 setting_-value = g_strdupv (setting_-default_value);
+setting_-length = setting_-default_length;
+}
 }
 else
 setting_-value = g_strdupv (setting_-default_value);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Handle diagnostic dialog argument in running instance

2013-04-19 Thread Christian Dywan
Updating branch refs/heads/master
 to b9930ddc577a4876051e49e432c6455f2f27ea80 (commit)
   from 2fe50cc3131476118c58fd7affb1431ddf5e3524 (commit)

commit b9930ddc577a4876051e49e432c6455f2f27ea80
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 20 02:22:24 2013 +0200

Handle diagnostic dialog argument in running instance

Explicitly check all individual argument arrays.

Treat diagnostic dialog like a frozen instance instead of
ignoring it completely.

Mention bug URL in diagnostic dialog.

 midori/midori-frontend.c |   27 +++
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/midori/midori-frontend.c b/midori/midori-frontend.c
index b135ad7..02f58d5 100644
--- a/midori/midori-frontend.c
+++ b/midori/midori-frontend.c
@@ -334,9 +334,8 @@ midori_frontend_diagnostic_dialog (MidoriApp* app,
 
 dialog = gtk_message_dialog_new (
 NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
-_(Midori seems to have crashed the last time it was opened. 
-  If this happened repeatedly, try one of the following options 
-  to solve the problem.));
+_(Midori crashed the last time it was opened. You can report the 
problem at %s.),
+PACKAGE_BUGREPORT);
 gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), FALSE);
 gtk_window_set_title (GTK_WINDOW (dialog), g_get_application_name ());
 content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
@@ -442,15 +441,19 @@ midori_normal_app_new (const gchar* config,
 MidoriApp* app = midori_app_new (nickname);
 if (midori_app_instance_is_running (app))
 {
-gboolean result = FALSE;
-GtkWidget* dialog;
-
-if (execute_commands != NULL  midori_app_send_command (app, 
execute_commands))
-return NULL;
-if (open_uris != NULL  midori_app_instance_send_uris (app, 
open_uris))
-return NULL;
-if (!execute_commands  !open_uris  
midori_app_instance_send_new_browser (app))
-return NULL;
+/* It makes no sense to show a crash dialog while running */
+if (!diagnostic_dialog)
+{
+gboolean success = FALSE;
+if (execute_commands != NULL  midori_app_send_command (app, 
execute_commands))
+success = TRUE;
+if (open_uris != NULL  midori_app_instance_send_uris (app, 
open_uris))
+success = TRUE;
+if (!execute_commands  !open_uris  
midori_app_instance_send_new_browser (app))
+success = TRUE;
+if (success)
+return NULL;
+}
 
 /* FIXME: We mustn't lose the URL here; either instance is freezing or 
inside a crash dialog */
 sokoke_message_dialog (GTK_MESSAGE_INFO,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix previous feed panel fix and plug string list leak

2013-04-19 Thread Christian Dywan
Updating branch refs/heads/master
 to 6a1750ea8a59a75a84dbd56ca23e204fa6c3b892 (commit)
   from b9930ddc577a4876051e49e432c6455f2f27ea80 (commit)

commit 6a1750ea8a59a75a84dbd56ca23e204fa6c3b892
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 20 02:59:18 2013 +0200

Fix previous feed panel fix and plug string list leak

 extensions/feed-panel/main.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/extensions/feed-panel/main.c b/extensions/feed-panel/main.c
index a578419..797c6e3 100644
--- a/extensions/feed-panel/main.c
+++ b/extensions/feed-panel/main.c
@@ -448,8 +448,7 @@ feed_app_add_browser_cb (MidoriApp*   app,
 priv-parsers = g_slist_prepend (priv-parsers, rss_init_parser ());
 
 sfeeds = midori_extension_get_string_list (extension, feeds, n);
-g_assert (n == 0 || sfeeds);
-
+if (sfeeds != NULL)
 for (i = 0; i  n; i++)
 {
 if (sfeeds[i])
@@ -459,7 +458,6 @@ feed_app_add_browser_cb (MidoriApp*   app,
 update_feed (priv, KATZE_ITEM (feed));
 }
 }
-g_strdupv (sfeeds);
 action_group = midori_browser_get_action_group (browser);
 action = gtk_action_group_get_action (action_group, Location);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Plug leak listing video formats

2013-04-19 Thread Christian Dywan
Updating branch refs/heads/master
 to 82aa86333d8ff53236b04fa255fd9fe23460f7ce (commit)
   from 6a1750ea8a59a75a84dbd56ca23e204fa6c3b892 (commit)

commit 82aa86333d8ff53236b04fa255fd9fe23460f7ce
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 20 03:00:31 2013 +0200

Plug leak listing video formats

 midori/midori-view.c |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index bd1d287..3dc9710 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -4216,8 +4216,10 @@ list_geolocation (GString* markup)
 /script);
 }
 
-static gchar*
-list_video_formats (MidoriView* view)
+static void
+midori_view_list_video_formats (MidoriView* view,
+GString*formats,
+gbooleanhtml)
 {
 #ifndef HAVE_WEBKIT2
 WebKitWebFrame* web_frame = webkit_web_view_get_main_frame 
(WEBKIT_WEB_VIEW (view-web_view));
@@ -4234,9 +4236,8 @@ list_video_formats (MidoriView* view)
 ' nbsp; WebM [' + 
 supported('video/webm; codecs=\vp8, vorbis\') + ']' 
 , NULL);
-return value;
-#else
-return NULL;
+midori_view_add_version (formats, html, g_strdup_printf (Video Formats 
%s, value));
+g_free (value);
 #endif
 }
 
@@ -4466,10 +4467,9 @@ midori_view_set_uri (MidoriView*  view,
 platform, sys_name, architecture ? architecture : ));
 midori_view_add_version (tmp, TRUE, g_markup_printf_escaped 
(Identification %s,
 ident));
-midori_view_add_version (tmp, TRUE, g_strdup_printf (Video 
Formats %s,
-list_video_formats (view)));
-g_string_append (tmp, /tabletable);
+midori_view_list_video_formats (view, tmp, TRUE);
 
+g_string_append (tmp, /tabletable);
 midori_view_list_plugins (view, tmp, TRUE);
 g_string_append (tmp, /table);
 list_about_uris (tmp);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Use File.replace_instead of _contents to avoid bindings differences

2013-04-18 Thread Christian Dywan
Updating branch refs/heads/master
 to 04d0ebf0ac2db02fb91ceea8be09a888f734d5ea (commit)
   from 2b3d2fbfd0a719559dd737a1a90d18d0febca5fa (commit)

commit 04d0ebf0ac2db02fb91ceea8be09a888f734d5ea
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 19 01:08:37 2013 +0200

Use File.replace_instead of _contents to avoid bindings differences

 extensions/apps.vala |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/extensions/apps.vala b/extensions/apps.vala
index f37493b..f2b74db 100644
--- a/extensions/apps.vala
+++ b/extensions/apps.vala
@@ -38,7 +38,8 @@ namespace Apps {
 .printf (name, exec, PACKAGE_NAME, icon_name);
 var file = folder.get_child (filename);
 try {
-yield file.replace_contents_async (contents.data, null, false, 
GLib.FileCreateFlags.NONE, null, null);
+var stream = yield file.replace_async (null, false, 
GLib.FileCreateFlags.NONE);
+yield stream.write_async (contents.data);
 }
 catch (Error error) {
 // TODO GUI infobar
@@ -198,7 +199,7 @@ namespace Apps {
 monitor = app_folder.monitor_directory (0, null);
 monitor.changed.connect (app_changed);
 
-var enumerator = yield app_folder.enumerate_children_async 
(FileAttribute.STANDARD_NAME, 0);
+var enumerator = yield app_folder.enumerate_children_async 
(standard::name, 0);
 while (true) {
 var files = yield enumerator.next_files_async (10);
 if (files == null)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Don't assert if message_map lookup is negative

2013-04-18 Thread Christian Dywan
Updating branch refs/heads/master
 to ead6936425852ddd52c9093b75da661d5b4558ef (commit)
   from 04d0ebf0ac2db02fb91ceea8be09a888f734d5ea (commit)

commit ead6936425852ddd52c9093b75da661d5b4558ef
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 19 01:14:41 2013 +0200

Don't assert if message_map lookup is negative

 midori/midori-locationaction.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index d51e197..12e8f52 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1302,8 +1302,9 @@ midori_map_get_message (SoupMessage* message)
 if (message_map == NULL)
 message_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, 
g_object_unref);
 full = g_hash_table_lookup (message_map, uri-host);
-g_return_val_if_fail (full, message);
-return full;
+if (full != NULL)
+return full;
+return message;
 }
 #endif
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Only show tls error if flags 0

2013-04-18 Thread Christian Dywan
Updating branch refs/heads/master
 to 27ae3abc921f5a57fded2d2a2a89a0e2a0a18041 (commit)
   from ead6936425852ddd52c9093b75da661d5b4558ef (commit)

commit 27ae3abc921f5a57fded2d2a2a89a0e2a0a18041
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 19 01:15:51 2013 +0200

Only show tls error if flags  0

 midori/midori-locationaction.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index 12e8f52..01bda95 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1436,12 +1436,14 @@ midori_location_action_show_page_info (GtkWidget* 
widget,
 gtk_window_set_default_size (GTK_WINDOW (dialog), 250, 200);
 #endif
 #else
-const gchar* tls_error = midori_location_action_tls_flags_to_string 
(tls_flags);
-
 if (!g_tls_certificate_get_issuer (tls_cert))
 gtk_box_pack_start (box, gtk_label_new (_(Self-signed)), FALSE, 
FALSE, 0);
 
-gtk_box_pack_start (box, gtk_label_new (tls_error), FALSE, FALSE, 0);
+if (tls_flags  0)
+{
+const gchar* tls_error = midori_location_action_tls_flags_to_string 
(tls_flags);
+gtk_box_pack_start (box, gtk_label_new (tls_error), FALSE, FALSE, 0);
+}
 #endif
 
 g_object_unref (tls_cert);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Don't convey loading or progress on special pages

2013-04-17 Thread Christian Dywan
Updating branch refs/heads/master
 to 4eae1c0a660082906fb632a25b460d12e348c5dc (commit)
   from 7229dbd8f3c7670a4f504611a6d738d82ff7da59 (commit)

commit 4eae1c0a660082906fb632a25b460d12e348c5dc
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 18 00:43:35 2013 +0200

Don't convey loading or progress on special pages

Fixes: https://bugs.launchpad.net/midori/+bug/1090632

 midori/midori-tab.vala |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/midori/midori-tab.vala b/midori/midori-tab.vala
index 94a24ec..8f2a361 100644
--- a/midori/midori-tab.vala
+++ b/midori/midori-tab.vala
@@ -61,9 +61,10 @@ namespace Midori {
 public Gdk.Color? fg_color { get; protected set; default = null; }
 public Gdk.Color? bg_color { get; protected set; default = null; }
 
+/* Special pages don't convey progress */
 private double current_progress = 0.0;
 public double progress { get {
-return current_progress;
+return special ? 0.0 : current_progress;
 }
 protected set {
 /* When we are finished, we don't want to *see* progress anymore */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Integrate user interaction exploit demo in about:

2013-04-17 Thread Christian Dywan
Updating branch refs/heads/master
 to a5bb3bbe064146b642c45397339a642a95451f4c (commit)
   from 4eae1c0a660082906fb632a25b460d12e348c5dc (commit)

commit a5bb3bbe064146b642c45397339a642a95451f4c
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 18 00:45:47 2013 +0200

Integrate user interaction exploit demo in about:

See 
http://www.ush.it/team/ascii/hack-tricks_253C_CCC2008/wysinwyc/what_you_see_is_not_what_you_copy.txt
or http://heise.de/-1842691

 midori/midori-view.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index ad04e88..bd1d287 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -4452,11 +4452,12 @@ midori_view_set_uri (MidoriView*  view,
 
 g_string_append_printf (tmp,
 htmlheadtitleabout:version/title/head
-bodyh1about:version/h1
+bodyh1a%sbout:version/h1
 p%s/p
 img src=\res://logo-shade.png\ 
 style=\position: absolute; right: 15px; bottom: 15px; 
z-index: -9;\
 table,
+span style=\position: absolute; left: -1000px; top: 
-1000px\lias a=b; echo Copy carefully #/span,
 _(Version numbers in brackets show the version used at 
runtime.));
 midori_view_add_version (tmp, TRUE, g_markup_printf_escaped 
(Command line %s,
 command_line));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Drop get_n_columns assert from Apps extension

2013-04-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 36c96fb95786011c6801cca14a85f6f7c8a54aed (commit)
   from 2be9c42fe7390188c0b27d506bf85de7d23ff5f1 (commit)

commit 36c96fb95786011c6801cca14a85f6f7c8a54aed
Author: Christian Dywan christ...@twotoasts.de
Date:   Tue Apr 16 22:49:41 2013 +0200

Drop get_n_columns assert from Apps extension

It's not strictly needed and causing build failures on
older Vala versions.

 extensions/apps.vala |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/extensions/apps.vala b/extensions/apps.vala
index 6015d20..f37493b 100644
--- a/extensions/apps.vala
+++ b/extensions/apps.vala
@@ -114,7 +114,6 @@ namespace Apps {
 
 treeview.show ();
 pack_start (treeview, true, true, 0);
-assert (treeview.get_n_columns ()  0);;
 
 this.array = array;
 array.add_item.connect (launcher_added);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master No security window for blank pages, but a search icon

2013-04-16 Thread Christian Dywan
Updating branch refs/heads/master
 to d5b99b0d9bfd2807be4a0eee19ef7914d261a9b8 (commit)
   from 8a1d08d4f5488ec6e3399410e69726bcb446a39a (commit)

commit d5b99b0d9bfd2807be4a0eee19ef7914d261a9b8
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Apr 17 01:10:10 2013 +0200

No security window for blank pages, but a search icon

Fixes: https://bugs.launchpad.net/midori/+bug/1032320
Fixes: https://bugs.launchpad.net/midori/+bug/1107560

 midori/midori-browser.c|   13 +-
 midori/midori-locationaction.c |   88 ++--
 midori/midori-locationaction.h |5 ++
 3 files changed, 73 insertions(+), 33 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index c0d5563..4187f76 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -345,8 +345,17 @@ _midori_browser_update_interface (MidoriBrowser* browser,
 }
 
 action = _action_by_name (browser, Location);
-midori_location_action_set_security_hint (
-MIDORI_LOCATION_ACTION (action), midori_tab_get_security (MIDORI_TAB 
(view)));
+if (midori_tab_is_blank (MIDORI_TAB (view)))
+{
+gchar* icon_names[] = { edit-find-symbolic, edit-find, NULL };
+GIcon* icon = g_themed_icon_new_from_names (icon_names, -1);
+midori_location_action_set_primary_icon (
+MIDORI_LOCATION_ACTION (action), icon, _(Web Search…));
+g_object_unref (icon);
+}
+else
+midori_location_action_set_security_hint (
+MIDORI_LOCATION_ACTION (action), midori_tab_get_security 
(MIDORI_TAB (view)));
 midori_browser_update_secondary_icon (browser, view, action);
 }
 
diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index b1016c2..290c29b 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1380,7 +1380,7 @@ midori_location_action_tls_flags_to_string 
(GTlsCertificateFlags tls_flags)
 g_return_val_if_reached (Unknown GTLSCertificateFlags value);
 }
 
-void
+static void
 midori_location_action_show_page_info (GtkWidget* widget,
GtkBox*box,
GtkWidget* dialog)
@@ -1463,6 +1463,10 @@ midori_location_action_icon_released_cb (GtkWidget*  
 widget,
 
 if (icon_pos == GTK_ICON_ENTRY_PRIMARY)
 {
+/* No security window for blank pages */
+if (midori_uri_is_blank (MIDORI_LOCATION_ACTION (action)-text))
+return;
+
 const gchar* title = _(Security details);
 GtkWidget* content_area;
 GtkWidget* hbox;
@@ -1748,18 +1752,19 @@ midori_location_action_set_secondary_icon 
(MidoriLocationAction* location_action
 }
 
 /**
- * midori_location_action_set_security_hint:
+ * midori_location_action_primary_icon:
  * @location_action: a #MidoriLocationAction
- * @hint: a security hint
+ * @icon: a list of icon names, preferred icon first
+ * @tooltip: The tooltip to show
  *
- * Sets a security hint on the action, so that the security status
- * can be reflected visually.
+ * The primary icon is mutually exclusive with the security hint.
  *
- * Since: 0.2.5
+ * Since: 0.5.1
  **/
 void
-midori_location_action_set_security_hint (MidoriLocationAction* 
location_action,
-  MidoriSecurityhint)
+midori_location_action_set_primary_icon (MidoriLocationAction* location_action,
+ GIcon*icon,
+ const gchar*  tooltip)
 {
 GSList* proxies;
 
@@ -1771,29 +1776,50 @@ midori_location_action_set_security_hint 
(MidoriLocationAction* location_action,
 if (GTK_IS_TOOL_ITEM (proxies-data))
 {
 GtkWidget* entry = midori_location_action_entry_for_proxy 
(proxies-data);
+gtk_entry_set_icon_from_gicon (GTK_ENTRY (entry), 
GTK_ICON_ENTRY_PRIMARY, icon);
+gtk_icon_entry_set_tooltip (GTK_ICON_ENTRY (entry), 
GTK_ICON_ENTRY_PRIMARY, tooltip);
+}
+}
 
-if (hint == MIDORI_SECURITY_UNKNOWN)
-{
-gchar* icon_names[] = { channel-insecure-symbolic, 
lock-insecure, dialog-information, NULL };
-gtk_entry_set_icon_from_gicon (GTK_ENTRY (entry), 
GTK_ICON_ENTRY_PRIMARY,
-g_themed_icon_new_from_names (icon_names, -1));
-gtk_icon_entry_set_tooltip (GTK_ICON_ENTRY (entry),
-GTK_ICON_ENTRY_PRIMARY, _(Not verified));
-}
-else if (hint == MIDORI_SECURITY_TRUSTED)
-{
-gchar* icon_names[] = { channel-secure-symbolic, lock-secure, 
locked, NULL };
-gtk_entry_set_icon_from_gicon (GTK_ENTRY (entry), 
GTK_ICON_ENTRY_PRIMARY,
-g_themed_icon_new_from_names (icon_names, -1));
-gtk_icon_entry_set_tooltip (GTK_ICON_ENTRY (entry),
-GTK_ICON_ENTRY_PRIMARY, _(Verified and encrypted 
connection

[Xfce4-commits] midori:master katze_object_assign should return the same value

2013-04-16 Thread Christian Dywan
Updating branch refs/heads/master
 to be18f418e723e30547a2ad25006b86f7e567ad02 (commit)
   from 447929f72526839720e54ed569ecfd5e2fcaf90e (commit)

commit be18f418e723e30547a2ad25006b86f7e567ad02
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Apr 17 00:10:56 2013 +0200

katze_object_assign should return the same value

Fixes: https://bugs.launchpad.net/midori/+bug/1060341

 katze/katze-utils.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/katze/katze-utils.h b/katze/katze-utils.h
index 90a55f9..0460331 100644
--- a/katze/katze-utils.h
+++ b/katze/katze-utils.h
@@ -36,7 +36,7 @@ G_BEGIN_DECLS
  * Unrefs @lvalue if needed and assigns it the value of @rvalue.
  **/
 #define katze_object_assign(lvalue, rvalue) \
-lvalue = ((lvalue ? g_object_unref (lvalue) : lvalue), rvalue)
+lvalue = ((lvalue ? g_object_unref (lvalue) : (void)0), rvalue)
 
 /**
  * katze_strv_assign:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Ensure that download last-size is stored as a pointer

2013-04-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 8a1d08d4f5488ec6e3399410e69726bcb446a39a (commit)
   from be18f418e723e30547a2ad25006b86f7e567ad02 (commit)

commit 8a1d08d4f5488ec6e3399410e69726bcb446a39a
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Apr 17 00:14:38 2013 +0200

Ensure that download last-size is stored as a pointer

Fixes: https://bugs.launchpad.net/midori/+bug/1053386

 midori/midori-download.vala |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/midori/midori-download.vala b/midori/midori-download.vala
index 951332b..bbf485e 100644
--- a/midori/midori-download.vala
+++ b/midori/midori-download.vala
@@ -97,7 +97,7 @@ namespace Midori {
 }
 
 string speed = ;
-uint64 last_size = download.get_datauint64 (last-size);
+uint64? last_size = download.get_datauint64? (last-size);
 if (elapsed != last_time) {
 speed = format_size ((uint64)(
 (current_size - last_size) / (elapsed - last_time)));
@@ -110,7 +110,7 @@ namespace Midori {
 
 if (elapsed - last_time  5.0) {
 download.set_dataint (last-time, (int)elapsed);
-download.set_datauint64 (last-size, current_size);
+download.set_datauint64? (last-size, current_size);
 }
 
 return %s\n%s %s%s.printf (filename, size, speed, eta);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Address missing NULL checks and dead code found by clang

2013-04-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 4d388d735da227997c1be4b33a85249e39c6a85b (commit)
   from d5b99b0d9bfd2807be4a0eee19ef7914d261a9b8 (commit)

commit 4d388d735da227997c1be4b33a85249e39c6a85b
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Apr 17 01:16:24 2013 +0200

Address missing NULL checks and dead code found by clang

 extensions/addons.c|   14 ++
 extensions/feed-panel/feed-atom.c  |1 -
 extensions/feed-panel/feed-panel.c |1 -
 extensions/feed-panel/feed-parse.c |2 ++
 katze/katze-http-cookies.c |2 +-
 katze/katze-utils.c|4 ++--
 midori/midori-array.c  |2 --
 midori/midori-browser.c|5 ++---
 midori/midori-locationaction.c |6 ++
 midori/midori-platform.h   |6 +++---
 midori/midori-view.c   |2 +-
 panels/midori-history.c|1 -
 12 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/extensions/addons.c b/extensions/addons.c
index e157840..57770bc 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -929,10 +929,16 @@ js_metadata_from_file (const gchar* filename,
 /* We don't support these, so abort here */
 g_free (line);
 g_io_channel_shutdown (channel, false, 0);
-g_slist_free (*includes);
-g_slist_free (*excludes);
-*includes = NULL;
-*excludes = NULL;
+if (includes != NULL)
+{
+g_slist_free (*includes);
+*includes = NULL;
+}
+if (excludes != NULL)
+{
+g_slist_free (*excludes);
+*excludes = NULL;
+}
 return FALSE;
 }
  else if (includes  g_str_has_prefix (line, // @include))
diff --git a/extensions/feed-panel/feed-atom.c 
b/extensions/feed-panel/feed-atom.c
index 0cf14c3..7b4f537 100644
--- a/extensions/feed-panel/feed-atom.c
+++ b/extensions/feed-panel/feed-atom.c
@@ -95,7 +95,6 @@ atom_get_link (KatzeItem* item,
 gboolean newishtml;
 gboolean newlink;
 
-newlink = FALSE;
 oldtype = (gchar*)katze_item_get_meta_string (item, feedpanel:linktype);
 oldrel = (gchar*)katze_item_get_meta_string (item, feedpanel:linkrel);
 
diff --git a/extensions/feed-panel/feed-panel.c 
b/extensions/feed-panel/feed-panel.c
index a34a212..8a08107 100644
--- a/extensions/feed-panel/feed-panel.c
+++ b/extensions/feed-panel/feed-panel.c
@@ -705,7 +705,6 @@ feed_panel_get_toolbar (MidoriViewable* viewable)
 static void
 feed_panel_finalize (GObject* object)
 {
-FeedPanel* panel = FEED_PANEL (object);
 }
 
 static void
diff --git a/extensions/feed-panel/feed-parse.c 
b/extensions/feed-panel/feed-parse.c
index 9963d0e..c19f5c0 100644
--- a/extensions/feed-panel/feed-parse.c
+++ b/extensions/feed-panel/feed-parse.c
@@ -219,6 +219,8 @@ feed_parse_doc (xmlDocPtr   doc,
 feed_parse_node (fparser);
 }
 }
+else
+isvalid = FALSE;
 
 fparser-error = NULL;
 fparser-doc = NULL;
diff --git a/katze/katze-http-cookies.c b/katze/katze-http-cookies.c
index ac77130..5a2caad 100644
--- a/katze/katze-http-cookies.c
+++ b/katze/katze-http-cookies.c
@@ -267,7 +267,7 @@ katze_http_cookies_jar_changed_cb (SoupCookieJar*jar,
 if (!g_strcmp0 (g_getenv (MIDORI_DEBUG), cookies))
 http_cookies-counter++;
 
-if (!http_cookies-timeout  (old_cookie || new_cookie-expires))
+if (!http_cookies-timeout  (old_cookie || (new_cookie  
new_cookie-expires)))
 http_cookies-timeout = midori_timeout_add_seconds (
 5, (GSourceFunc)katze_http_cookies_update_jar, http_cookies, NULL);
 }
diff --git a/katze/katze-utils.c b/katze/katze-utils.c
index fa4b767..39f65e8 100644
--- a/katze/katze-utils.c
+++ b/katze/katze-utils.c
@@ -1230,10 +1230,10 @@ katze_uri_entry_changed_cb (GtkWidget* entry,
 valid = midori_uri_is_ip_address (uri);
 
 #if GTK_CHECK_VERSION (3, 2, 0)
-g_object_set_data (G_OBJECT (entry), invalid, GINT_TO_POINTER (*uri  
!valid));
+g_object_set_data (G_OBJECT (entry), invalid, GINT_TO_POINTER (uri  
*uri  !valid));
 gtk_widget_queue_draw (entry);
 #else
-if (*uri  !valid)
+if (uri  *uri  !valid)
 {
 GdkColor bg_color = { 0 };
 GdkColor fg_color = { 0 };
diff --git a/midori/midori-array.c b/midori/midori-array.c
index 4911c89..65d12cc 100644
--- a/midori/midori-array.c
+++ b/midori/midori-array.c
@@ -210,8 +210,6 @@ katze_array_from_xmlDocPtr (KatzeArray* array,
 xmlNodePtr cur;
 KatzeItem* item;
 
-cur = xmlDocGetRootElement (doc);
-
 if ((cur = xmlDocGetRootElement (doc)) == NULL)
 {
 /* Empty document */
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 4187f76..4ad67bf 100644

[Xfce4-commits] midori:master Drop unused midori_extension_is_deactivating

2013-04-16 Thread Christian Dywan
Updating branch refs/heads/master
 to 35c6fd5b776b6e609b28411f6a2c78cc1d56f6c4 (commit)
   from 4d388d735da227997c1be4b33a85249e39c6a85b (commit)

commit 35c6fd5b776b6e609b28411f6a2c78cc1d56f6c4
Author: Christian Dywan christ...@twotoasts.de
Date:   Wed Apr 17 01:17:30 2013 +0200

Drop unused midori_extension_is_deactivating

 midori/midori-extension.c |   24 
 midori/midori-extension.h |3 ---
 2 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/midori/midori-extension.c b/midori/midori-extension.c
index b8f27d6..b712c80 100644
--- a/midori/midori-extension.c
+++ b/midori/midori-extension.c
@@ -778,29 +778,6 @@ midori_extension_is_active (MidoriExtension* extension)
 }
 
 /**
- * midori_extension_is_deactivating:
- * @extension: a #MidoriExtension
- *
- * Determines if @extension is currently in the process of
- * being deactivated.
- *
- * Extensions remain fully functional even while being
- * deactivated, so you can for instance still save settings
- * but you may need to cleanup during deactivation.
- *
- * Return value: %TRUE if @extension is deactivating
- *
- * Since: 0.1.7
- **/
-gboolean
-midori_extension_is_deactivating (MidoriExtension* extension)
-{
-g_return_val_if_fail (MIDORI_IS_EXTENSION (extension), FALSE);
-
-return extension-priv-active == 2;
-}
-
-/**
  * midori_extension_deactivate:
  * @extension: a #MidoriExtension
  *
@@ -811,7 +788,6 @@ midori_extension_deactivate (MidoriExtension* extension)
 {
 g_return_if_fail (midori_extension_is_active (extension));
 
-extension-priv-active = 2;
 g_signal_emit (extension, signals[DEACTIVATE], 0);
 extension-priv-active = 0;
 katze_object_assign (extension-priv-app, NULL);
diff --git a/midori/midori-extension.h b/midori/midori-extension.h
index 5a98202..adda774 100644
--- a/midori/midori-extension.h
+++ b/midori/midori-extension.h
@@ -75,9 +75,6 @@ midori_extension_has_preferences (MidoriExtension* 
extension);
 gboolean
 midori_extension_is_active   (MidoriExtension* extension);
 
-gboolean
-midori_extension_is_deactivating (MidoriExtension* extension);
-
 void
 midori_extension_deactivate  (MidoriExtension* extension);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Add custom-title setting to override browser title

2013-04-11 Thread Christian Dywan
Updating branch refs/heads/master
 to a8cdf86cdca57e3b0672a9704d631b568952bdf9 (commit)
   from 5c02f89372df0ee8a6ea6bcbdf7383b7a35aad53 (commit)

commit a8cdf86cdca57e3b0672a9704d631b568952bdf9
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 11 22:33:43 2013 +0200

Add custom-title setting to override browser title

 midori/midori-browser.c |5 -
 midori/midori-settings.vala |8 
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 15be7a1..2e9dbba 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -726,7 +726,10 @@ static void
 midori_browser_set_title (MidoriBrowser* browser,
   const gchar*   title)
 {
-if (katze_object_get_boolean (browser-settings, 
enable-private-browsing))
+const gchar* custom_title = midori_settings_get_custom_title 
(MIDORI_SETTINGS (browser-settings));
+if (custom_title  *custom_title)
+gtk_window_set_title (GTK_WINDOW (browser), custom_title);
+else if (katze_object_get_boolean (browser-settings, 
enable-private-browsing))
 {
 gchar* window_title = g_strdup_printf (_(%s (Private Browsing)), 
title);
 gtk_window_set_title (GTK_WINDOW (browser), window_title);
diff --git a/midori/midori-settings.vala b/midori/midori-settings.vala
index b321132..aa4e61d 100644
--- a/midori/midori-settings.vala
+++ b/midori/midori-settings.vala
@@ -87,6 +87,14 @@ namespace Midori {
 #endif
 } }
 
+/**
+ * Overrides the browser window title if given.
+ * Examples are Help Viewer or L:D_N:application_ID:midori_O:URL
+ *
+ * Since: 0.5.1
+ **/
+public string? custom_title { get; set; default = null; }
+
 public string? location_entry_search { get; set; default = null; }
 /* Since: 0.1.7 */
 public int clear_private_data { get; set; default = 0; }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master get_tls_info: don't ref NULL, no error on tls_flags 0

2013-04-11 Thread Christian Dywan
Updating branch refs/heads/master
 to cdc01c0ad8be0202ee25d26ed58e9f95bd343d42 (commit)
   from a8cdf86cdca57e3b0672a9704d631b568952bdf9 (commit)

commit cdc01c0ad8be0202ee25d26ed58e9f95bd343d42
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 11 22:35:29 2013 +0200

get_tls_info: don't ref NULL, no error on tls_flags 0

 midori/midori-locationaction.c |   21 ++---
 midori/midori-view.c   |8 +---
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index c956fef..b1016c2 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1361,24 +1361,23 @@ midori_location_action_cert_response_cb (GtkWidget* 
 dialog,
 const gchar*
 midori_location_action_tls_flags_to_string (GTlsCertificateFlags tls_flags)
 {
-const gchar* tls_error;
 if (tls_flags  G_TLS_CERTIFICATE_UNKNOWN_CA)
-tls_error = _(The signing certificate authority is not known.);
+return _(The signing certificate authority is not known.);
 else if (tls_flags  G_TLS_CERTIFICATE_BAD_IDENTITY)
-tls_error = _(The certificate does not match the expected identity of 
the site that it was retrieved from.);
+return _(The certificate does not match the expected identity of the 
site that it was retrieved from.);
 else if(tls_flags  G_TLS_CERTIFICATE_NOT_ACTIVATED)
-tls_error = _(The certificate's activation time is still in the 
future.);
+return _(The certificate's activation time is still in the future.);
 else if (tls_flags  G_TLS_CERTIFICATE_EXPIRED)
-tls_error = _(The certificate has expired);
+return _(The certificate has expired);
 else if (tls_flags  G_TLS_CERTIFICATE_REVOKED)
-tls_error = _(The certificate has been revoked according to the 
GTlsConnection's certificate revocation list.);
+return _(The certificate has been revoked according to the 
GTlsConnection's certificate revocation list.);
 else if (tls_flags  G_TLS_CERTIFICATE_INSECURE)
-tls_error = _(The certificate's algorithm is considered insecure.);
+return _(The certificate's algorithm is considered insecure.);
 else if (tls_flags  G_TLS_CERTIFICATE_GENERIC_ERROR)
-tls_error = _(Some other error occurred validating the certificate.);
-else
-tls_error = Unknown GTLSCertificateFlags value;
-return tls_error;
+return _(Some other error occurred validating the certificate.);
+else if (tls_flags == 0)
+g_return_val_if_reached (GTLSCertificateFlags is 0);
+g_return_val_if_reached (Unknown GTLSCertificateFlags value);
 }
 
 void
diff --git a/midori/midori-view.c b/midori/midori-view.c
index f807fda..1d300c3 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -737,7 +737,8 @@ midori_view_get_tls_info (MidoriView*   view,
 WebKitWebView* web_view = WEBKIT_WEB_VIEW (view-web_view);
 *hostname = midori_uri_parse_hostname (webkit_web_view_get_uri (web_view), 
NULL);
 gboolean success = webkit_web_view_get_tls_info (web_view, tls_cert, 
tls_flags);
-g_object_ref (*tls_cert);
+if (*tls_cert != NULL)
+g_object_ref (*tls_cert);
 return success;
 #else
 SoupMessage* message = midori_map_get_message 
(webkit_network_request_get_message (request));
@@ -746,8 +747,9 @@ midori_view_get_tls_info (MidoriView*   view,
 SoupURI* uri = soup_message_get_uri (message);
 *hostname = uri ? g_strdup (uri-host) : NULL;
 g_object_get (message, tls-certificate, tls_cert, tls-errors, 
tls_flags, NULL);
-return tls_flags == 0
-  soup_message_get_flags (message)  
SOUP_MESSAGE_CERTIFICATE_TRUSTED;
+if (soup_message_get_flags (message)  
SOUP_MESSAGE_CERTIFICATE_TRUSTED)
+return TRUE;
+return tls_flags == 0;
 }
 *tls_cert = NULL;
 *tls_flags = 0;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix sokoke_prefetch_uri hanging forever with WebKit2

2013-04-11 Thread Christian Dywan
Updating branch refs/heads/master
 to 92c39ecd64bb547b35955665d249d4507af3c9c9 (commit)
   from cdc01c0ad8be0202ee25d26ed58e9f95bd343d42 (commit)

commit 92c39ecd64bb547b35955665d249d4507af3c9c9
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 11 22:38:19 2013 +0200

Fix sokoke_prefetch_uri hanging forever with WebKit2

 midori/sokoke.c |   16 +++-
 midori/sokoke.h |6 +-
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/midori/sokoke.c b/midori/sokoke.c
index 04940b3..c10ae02 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -457,7 +457,7 @@ sokoke_resolve_hostname (const gchar* hostname)
 gint host_resolved = 0;
 
 uri = g_strconcat (http://;, hostname, NULL);
-if (sokoke_prefetch_uri (NULL, uri, sokoke_resolve_hostname_cb,
+if (sokoke_prefetch_uri (NULL, uri, G_CALLBACK 
(sokoke_resolve_hostname_cb),
  host_resolved))
 {
 GTimer* timer = g_timer_new ();
@@ -954,11 +954,7 @@ sokoke_gtk_action_count_modifiers (GtkAction* action)
 gboolean
 sokoke_prefetch_uri (MidoriWebSettings*  settings,
  const char* uri,
-#ifndef HAVE_WEBKIT2
- SoupAddressCallback callback,
-#else
- void*   callback,
-#endif
+ GCallback   callback,
  gpointeruser_data)
 {
 #define MAXHOSTS 50
@@ -980,6 +976,8 @@ sokoke_prefetch_uri (MidoriWebSettings*  settings,
 #ifdef HAVE_WEBKIT2
 WebKitWebContext* context = webkit_web_context_get_default ();
 webkit_web_context_prefetch_dns (context, hostname);
+g_free (hostname);
+return FALSE;
 #else
 if (!hosts ||
 !g_regex_match_simple (hostname, hosts,
@@ -989,7 +987,7 @@ sokoke_prefetch_uri (MidoriWebSettings*  settings,
 gchar* new_hosts;
 
 address = soup_address_new (hostname, SOUP_ADDRESS_ANY_PORT);
-soup_address_resolve_async (address, 0, 0, callback, user_data);
+soup_address_resolve_async (address, 0, 0, 
(SoupAddressCallback)callback, user_data);
 g_object_unref (address);
 
 if (host_count  MAXHOSTS)
@@ -1002,10 +1000,10 @@ sokoke_prefetch_uri (MidoriWebSettings*  settings,
 katze_assign (hosts, new_hosts);
 }
 else if (callback)
-callback (NULL, SOUP_STATUS_OK, user_data);
-#endif
+((SoupAddressCallback)callback) (NULL, SOUP_STATUS_OK, user_data);
 g_free (hostname);
 return TRUE;
+#endif
 }
 
 /**
diff --git a/midori/sokoke.h b/midori/sokoke.h
index b7acae4..1b2f235 100644
--- a/midori/sokoke.h
+++ b/midori/sokoke.h
@@ -109,11 +109,7 @@ sokoke_gtk_action_count_modifiers   (GtkAction* 
action);
 gboolean
 sokoke_prefetch_uri (MidoriWebSettings*  settings,
  const char* uri,
-#ifndef HAVE_WEBKIT2
- SoupAddressCallback callback,
-#else
- void*   callback,
-#endif
+ GCallback   callback,
  gpointeruser_data);
 
 gboolean
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Require 1.11.91 aka 2.0.0 for WebKit2

2013-04-11 Thread Christian Dywan
Updating branch refs/heads/master
 to a18d036cba8e2601c5d0e7bc1a3b88fb2939b030 (commit)
   from 92c39ecd64bb547b35955665d249d4507af3c9c9 (commit)

commit a18d036cba8e2601c5d0e7bc1a3b88fb2939b030
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 11 23:06:41 2013 +0200

Require 1.11.91 aka 2.0.0 for WebKit2

 wscript |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/wscript b/wscript
index d5d145e..014af53 100644
--- a/wscript
+++ b/wscript
@@ -246,7 +246,8 @@ def configure (conf):
 check_pkg ('gtk+-3.0', '3.0.0', var='GTK', mandatory=False)
 check_pkg ('gcr-3', '2.32', mandatory=False)
 if option_enabled ('webkit2'):
-check_pkg ('webkit2gtk-3.0', '1.10.1', var='WEBKIT', 
mandatory=False)
+# 2.0.0 matches 1.11.91 API; 1.11.92  2.0.0
+check_pkg ('webkit2gtk-3.0', '1.11.91', var='WEBKIT', 
mandatory=False)
 if not conf.env['HAVE_WEBKIT']:
 Utils.pprint ('RED', 'WebKit2/ GTK+3 was not found.\n' \
 'Pass --disable-webkit2 to build without WebKit2.')
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Supersede AddDesktopShortcut by Web App Manager

2013-04-11 Thread Christian Dywan
Updating branch refs/heads/master
 to 67add99e7432e8199362056ecd065a3463be7c93 (commit)
   from a18d036cba8e2601c5d0e7bc1a3b88fb2939b030 (commit)

commit 67add99e7432e8199362056ecd065a3463be7c93
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 11 23:57:51 2013 +0200

Supersede AddDesktopShortcut by Web App Manager

Launchers can be created from websites, apps appear in a panel.

 extensions/apps.vala|  279 +++
 katze/katze.vapi|3 +-
 midori/midori-app.c |2 +-
 midori/midori-browser.c |   60 +--
 midori/midori-stock.h   |2 +-
 midori/midori-view.c|3 -
 midori/midori.vapi  |   11 ++-
 po/POTFILES.in  |1 +
 tests/app.vala  |2 -
 9 files changed, 297 insertions(+), 66 deletions(-)

diff --git a/extensions/apps.vala b/extensions/apps.vala
new file mode 100644
index 000..6015d20
--- /dev/null
+++ b/extensions/apps.vala
@@ -0,0 +1,279 @@
+/*
+   Copyright (C) 2013 Christian Dywan christ...@twotoasts.de
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   See the file COPYING for the full license text.
+*/
+
+namespace Apps {
+const string EXEC_PREFIX = PACKAGE_NAME +  -a ;
+
+private class Launcher : GLib.Object, GLib.Initable {
+internal GLib.File file;
+internal string name;
+internal string icon_name;
+internal string exec;
+internal string uri;
+
+internal static async void create (GLib.File folder, string uri, 
string title) {
+/* Strip LRE leading character and / */
+string filename = title.delimit (‪/, ' ') + .desktop;
+string exec = EXEC_PREFIX + uri;
+string name = title;
+// TODO: Midori.Paths.get_icon save to png
+string icon_name = Midori.Stock.WEB_BROWSER;
+string contents = 
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=%s
+Exec=%s
+TryExec=%s
+Icon=%s
+Categories=Network;
+.printf (name, exec, PACKAGE_NAME, icon_name);
+var file = folder.get_child (filename);
+try {
+yield file.replace_contents_async (contents.data, null, false, 
GLib.FileCreateFlags.NONE, null, null);
+}
+catch (Error error) {
+// TODO GUI infobar
+warning (Failed to create new launcher: %s, error.message);
+}
+}
+
+internal Launcher (GLib.File file) {
+this.file = file;
+}
+
+bool init (GLib.Cancellable? cancellable) throws GLib.Error {
+if (!file.get_basename ().has_suffix (.desktop))
+return false;
+
+var keyfile = new GLib.KeyFile ();
+keyfile.load_from_file (file.get_path (), GLib.KeyFileFlags.NONE);
+exec = keyfile.get_string (Desktop Entry, Exec);
+if (!exec.has_prefix (EXEC_PREFIX))
+return false;
+
+name = keyfile.get_string (Desktop Entry, Name);
+icon_name = keyfile.get_string (Desktop Entry, Icon);
+uri = exec.replace (EXEC_PREFIX, );
+return true;
+}
+}
+
+private class Sidebar : Gtk.VBox, Midori.Viewable {
+Gtk.Toolbar? toolbar = null;
+Gtk.ListStore store = new Gtk.ListStore (1, typeof (Launcher));
+Gtk.TreeView treeview;
+Katze.Array array;
+
+public unowned string get_stock_id () {
+return Midori.Stock.WEB_BROWSER;
+}
+
+public unowned string get_label () {
+return _(Applications);
+}
+
+public Gtk.Widget get_toolbar () {
+if (toolbar == null) {
+toolbar = new Gtk.Toolbar ();
+toolbar.set_icon_size (Gtk.IconSize.BUTTON);
+}
+return toolbar;
+}
+
+public Sidebar (Katze.Array array) {
+Gtk.TreeViewColumn column;
+
+treeview = new Gtk.TreeView.with_model (store);
+treeview.headers_visible = false;
+
+store.set_sort_column_id (0, Gtk.SortType.ASCENDING);
+store.set_sort_func (0, tree_sort_func);
+
+column = new Gtk.TreeViewColumn ();
+Gtk.CellRendererPixbuf renderer_icon = new Gtk.CellRendererPixbuf 
();
+column.pack_start (renderer_icon, false);
+column.set_cell_data_func (renderer_icon, on_render_icon);
+treeview.append_column (column);
+
+column = new Gtk.TreeViewColumn ();
+column.set_sizing (Gtk.TreeViewColumnSizing.AUTOSIZE

[Xfce4-commits] midori:master Make Delayed Load work with WebKit2

2013-04-08 Thread Christian Dywan
Updating branch refs/heads/master
 to df3ff7396ec18e612f3314a28e42f05711102143 (commit)
   from a97bf2ff3111795cb1e49787197e517a26af769f (commit)

commit df3ff7396ec18e612f3314a28e42f05711102143
Author: Christian Dywan christ...@twotoasts.de
Date:   Mon Apr 8 20:08:17 2013 +0200

Make Delayed Load work with WebKit2

 extensions/delayed-load.vala |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/extensions/delayed-load.vala b/extensions/delayed-load.vala
index 1ff2803..9ea2c0f 100644
--- a/extensions/delayed-load.vala
+++ b/extensions/delayed-load.vala
@@ -157,8 +157,7 @@ namespace DelayedLoad {
 
 int64 delay = item.get_meta_integer (delay);
 if (delay != Midori.Delay.DELAYED) {
-WebKit.LoadStatus load_status = view.web_view.load_status;
-if (load_status == WebKit.LoadStatus.FINISHED) {
+if (view.load_status == Midori.LoadStatus.FINISHED) {
 if (this.timeout != 0)
 this.tasks.set (browser, new TabShaker (browser));
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Make Feed Panel build with WebKit2 (not loading feeds)

2013-04-08 Thread Christian Dywan
Updating branch refs/heads/master
 to 2c1bce83272463737185eb094a178024eeaaf565 (commit)
   from df3ff7396ec18e612f3314a28e42f05711102143 (commit)

commit 2c1bce83272463737185eb094a178024eeaaf565
Author: Christian Dywan christ...@twotoasts.de
Date:   Mon Apr 8 20:11:54 2013 +0200

Make Feed Panel build with WebKit2 (not loading feeds)

 extensions/feed-panel/feed-panel.c |   19 ++-
 midori/midori-view.c   |   10 ++
 midori/midori-view.h   |6 ++
 midori/midori.vapi |2 ++
 4 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/extensions/feed-panel/feed-panel.c 
b/extensions/feed-panel/feed-panel.c
index dcb049f..a34a212 100644
--- a/extensions/feed-panel/feed-panel.c
+++ b/extensions/feed-panel/feed-panel.c
@@ -387,8 +387,7 @@ feed_panel_cursor_or_row_changed_cb (GtkTreeView* treeview,
 bodyh3%s/h3/body/html, katze_item_get_uri 
(KATZE_ITEM (parent)));
 }
 }
-webkit_web_view_load_html_string (
-WEBKIT_WEB_VIEW (panel-webview), text ? text : , uri);
+midori_view_set_html (MIDORI_VIEW (panel-webview), text ? text : 
, uri, NULL);
 g_free ((gchar*) text);
 
 sensitive = TRUE;
@@ -396,8 +395,7 @@ feed_panel_cursor_or_row_changed_cb (GtkTreeView* treeview,
 else
 {
 text = katze_item_get_text (item);
-webkit_web_view_load_html_string (
-WEBKIT_WEB_VIEW (panel-webview), text ? text : , uri);
+midori_view_set_html (MIDORI_VIEW (panel-webview), text ? text : 
, uri, NULL);
 }
 g_object_unref (item);
 }
@@ -600,6 +598,7 @@ webview_button_press_event_cb (GtkWidget*  widget,
 return MIDORI_EVENT_CONTEXT_MENU (event);
 }
 
+#ifndef HAVE_WEBKIT2
 static gboolean
 webview_navigation_request_cb (WebKitWebView* web_view,
WebKitWebFrame*frame,
@@ -622,6 +621,7 @@ webview_navigation_request_cb (WebKitWebView* 
web_view,
 
 return FALSE;
 }
+#endif
 
 static const gchar*
 feed_panel_get_label (MidoriViewable* viewable)
@@ -760,7 +760,7 @@ feed_panel_init (FeedPanel* panel)
 GtkIconFactory *factory;
 GtkIconSource *icon_source;
 GtkIconSet *icon_set;
-WebKitWebSettings* settings;
+MidoriWebSettings* settings;
 PangoFontDescription* font_desc;
 const gchar* family;
 gint size;
@@ -812,7 +812,6 @@ feed_panel_init (FeedPanel* panel)
   NULL);
 gtk_widget_show (treeview);
 
-webview = webkit_web_view_new ();
 #if GTK_CHECK_VERSION(3,0,0)
 font_desc = (PangoFontDescription*)gtk_style_context_get_font (
 gtk_widget_get_style_context (treeview), GTK_STATE_FLAG_NORMAL);
@@ -821,14 +820,16 @@ feed_panel_init (FeedPanel* panel)
 #endif
 family = pango_font_description_get_family (font_desc);
 size = pango_font_description_get_size (font_desc) / PANGO_SCALE;
-settings = webkit_web_settings_new ();
+settings = midori_web_settings_new ();
 g_object_set (settings, default-font-family, family,
 default-font-size, size, NULL);
-g_object_set (webview, settings, settings, NULL);
+webview = midori_view_new_with_item (NULL, settings);
 gtk_widget_set_size_request (webview, -1, 50);
-g_object_connect (webview,
+g_object_connect (midori_tab_get_web_view (MIDORI_TAB (webview)),
+  #ifndef HAVE_WEBKIT2
   signal::navigation-policy-decision-requested,
   webview_navigation_request_cb, panel,
+  #endif
   signal::button-press-event,
   webview_button_press_event_cb, NULL,
   signal::button-release-event,
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 3c99d62..f807fda 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1380,11 +1380,7 @@ void
 midori_view_set_html (MidoriView* view,
   const gchar*data,
   const gchar*uri,
-#ifndef HAVE_WEBKIT2
-  WebKitWebFrame* web_frame)
-#else
   void*   web_frame)
-#endif
 {
 g_return_if_fail (MIDORI_IS_VIEW (view));
 g_return_if_fail (data != NULL);
@@ -1392,13 +1388,11 @@ midori_view_set_html (MidoriView* view,
 WebKitWebView* web_view = WEBKIT_WEB_VIEW (view-web_view);
 if (!uri)
 uri = about:blank;
-#ifndef HAVE_WEBKIT2
-if (!web_frame)
-web_frame = webkit_web_view_get_main_frame (web_view);
-#endif
 katze_item_set_uri (view-item, uri);
 midori_tab_set_special (MIDORI_TAB (view), TRUE);
 #ifndef HAVE_WEBKIT2
+if (!web_frame)
+web_frame = webkit_web_view_get_main_frame (web_view);
 webkit_web_frame_load_alternate_string (
 web_frame, data, uri, uri);
 #else
diff

[Xfce4-commits] midori:master Implement spell checking and preferred languages with WebKit2

2013-04-08 Thread Christian Dywan
Updating branch refs/heads/master
 to 6d91a83fd973656db1f47c26e61aa46dc603199e (commit)
   from 2c1bce83272463737185eb094a178024eeaaf565 (commit)

commit 6d91a83fd973656db1f47c26e61aa46dc603199e
Author: Christian Dywan christ...@twotoasts.de
Date:   Mon Apr 8 20:35:37 2013 +0200

Implement spell checking and preferred languages with WebKit2

 midori/midori-session.c |7 +++
 midori/midori-settings.vala |7 ++-
 midori/midori-websettings.c |   14 --
 midori/midori-websettings.h |3 ---
 midori/webkit2gtk-3.0.vapi  |6 --
 5 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/midori/midori-session.c b/midori/midori-session.c
index 8e6c48a..d21b0f9 100644
--- a/midori/midori-session.c
+++ b/midori/midori-session.c
@@ -117,13 +117,20 @@ midori_soup_session_request_started_cb (SoupSession* 
session,
 }
 #endif
 
+#ifndef HAVE_WEBKIT2
+const gchar*
+midori_web_settings_get_accept_language(MidoriWebSettings* settings);
+#endif
+
 static void
 midori_soup_session_settings_accept_language_cb (SoupSession*   session,
  SoupMessage*   msg,
  MidoriWebSettings* settings)
 {
+#ifndef HAVE_WEBKIT2
 const gchar* accept = midori_web_settings_get_accept_language (settings);
 soup_message_headers_append (msg-request_headers, Accept-Language, 
accept);
+#endif
 
 if (katze_object_get_boolean (settings, strip-referer))
 {
diff --git a/midori/midori-settings.vala b/midori/midori-settings.vala
index 75c68f3..b321132 100644
--- a/midori/midori-settings.vala
+++ b/midori/midori-settings.vala
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2008-2012 Christian Dywan christ...@twotoasts.de
+ Copyright (C) 2008-2013 Christian Dywan christ...@twotoasts.de
  Copyright (C) 2011 Peter Hatina phat...@redhat.com
 
  This library is free software; you can redistribute it and/or
@@ -42,6 +42,11 @@ namespace Midori {
 } set {
 zoom_text_only = !value;
 } }
+public bool enable_spell_checking { get {
+return WebKit.WebContext.get_default ().get_spell_checking_enabled 
();
+} set {
+WebKit.WebContext.get_default ().set_spell_checking_enabled 
(value);
+} }
 #endif
 public bool remember_last_window_size { get; set; default = true; }
 public int last_window_width { get; set; default = 0; }
diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index 38aefeb..ed6d3d2 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -832,6 +832,7 @@ generate_ident_string (MidoriWebSettings* web_settings,
 }
 }
 
+#ifndef HAVE_WEBKIT2
 /* Provide a new way for SoupSession to assume an 'Accept-Language'
string automatically from the return value of g_get_language_names(),
properly formatted according to RFC2616.
@@ -946,6 +947,7 @@ midori_web_settings_get_accept_language (MidoriWebSettings* 
settings)
 midori_web_settings_update_accept_language (settings);
 return settings-accept;
 }
+#endif
 
 static void
 midori_web_settings_process_stylesheets (MidoriWebSettings* settings,
@@ -1048,11 +1050,19 @@ midori_web_settings_set_property (GObject*  object,
 break;
 case PROP_PREFERRED_LANGUAGES:
 katze_assign (web_settings-http_accept_language, g_value_dup_string 
(value));
-#ifndef HAVE_WEBKIT2
+#ifdef HAVE_WEBKIT2
+WebKitWebContext* context = webkit_web_context_get_default ();
+gchar** languages = web_settings-http_accept_language
+? g_strsplit_set (web_settings-http_accept_language, ,; , -1)
+: g_strdupv ((gchar**)g_get_language_names ());
+webkit_web_context_set_preferred_languages (context, (const gchar* 
const*)languages);
+webkit_web_context_set_spell_checking_languages (context, (const 
gchar* const*)languages);
+g_strfreev (languages);
+#else
 g_object_set (web_settings, spell-checking-languages,
   web_settings-http_accept_language, NULL);
-#endif
 midori_web_settings_update_accept_language (web_settings);
+#endif
 break;
 case PROP_SITE_DATA_RULES:
 katze_assign (web_settings-site_data_rules, g_value_dup_string 
(value));
diff --git a/midori/midori-websettings.h b/midori/midori-websettings.h
index 67c587b..cdc7264 100644
--- a/midori/midori-websettings.h
+++ b/midori/midori-websettings.h
@@ -190,9 +190,6 @@ MidoriSiteDataPolicy
 midori_web_settings_get_site_data_policy   (MidoriWebSettings* settings,
 const gchar*   uri);
 
-const gchar*
-midori_web_settings_get_accept_language(MidoriWebSettings* settings);
-
 MidoriWebSettings*
 midori_settings_new_full   (gchar***   extensions);
 
diff --git a/midori/webkit2gtk-3.0.vapi b/midori/webkit2gtk-3.0.vapi
index 0cb4757

[Xfce4-commits] midori:master Use hard-coded WebKit2 engine version in generate_ident_string

2013-04-08 Thread Christian Dywan
Updating branch refs/heads/master
 to f5ae6a8631e50abb3078d0c043c145a19f2f0fea (commit)
   from 6d91a83fd973656db1f47c26e61aa46dc603199e (commit)

commit f5ae6a8631e50abb3078d0c043c145a19f2f0fea
Author: Christian Dywan christ...@twotoasts.de
Date:   Mon Apr 8 20:40:02 2013 +0200

Use hard-coded WebKit2 engine version in generate_ident_string

The WebKit API version isn't correct here.

 midori/midori-websettings.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index ed6d3d2..fb7d0d8 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -794,8 +794,8 @@ generate_ident_string (MidoriWebSettings* web_settings,
 const int webcore_major = WEBKIT_USER_AGENT_MAJOR_VERSION;
 const int webcore_minor = WEBKIT_USER_AGENT_MINOR_VERSION;
 #else
-const int webcore_major = WEBKIT_MAJOR_VERSION;
-const int webcore_minor = WEBKIT_MINOR_VERSION;
+const int webcore_major = 537;
+const int webcore_minor = 32;
 #endif
 
 #if WEBKIT_CHECK_VERSION (1, 1, 18)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Flip WebKit2 ready extension list into a blacklist

2013-04-08 Thread Christian Dywan
Updating branch refs/heads/master
 to 5c02f89372df0ee8a6ea6bcbdf7383b7a35aad53 (commit)
   from f5ae6a8631e50abb3078d0c043c145a19f2f0fea (commit)

commit 5c02f89372df0ee8a6ea6bcbdf7383b7a35aad53
Author: Christian Dywan christ...@twotoasts.de
Date:   Mon Apr 8 20:41:45 2013 +0200

Flip WebKit2 ready extension list into a blacklist

 extensions/wscript_build |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/extensions/wscript_build b/extensions/wscript_build
index 8a15a78..5b698bc 100644
--- a/extensions/wscript_build
+++ b/extensions/wscript_build
@@ -28,7 +28,7 @@ for extension in extensions:
 source = extension
 
 # FIXME
-if bld.env['HAVE_WEBKIT2'] and target not in ['tab-panel', 
'statusbar-features', 'shortcuts', 'status-clock', 'tab-minimized', 
'toolbar-editor']:
+if bld.env['HAVE_WEBKIT2'] and target in ['external-download-manager', 
'nsplugin-manager', 'formhistory', 'adblock', 'cookie-permissions', 'addons', 
'cookie-manager']:
 continue
 
 obj = bld.new_task_gen ('cc', 'shlib')
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Move show_all for scrolled window out of WebKit2 guards

2013-04-07 Thread Christian Dywan
Updating branch refs/heads/master
 to 68b2b4fb66cfb651adf5e526fae03ca5c4d533a9 (commit)
   from ded6ef749fa736c293aff3886ab8bbc88fe29070 (commit)

commit 68b2b4fb66cfb651adf5e526fae03ca5c4d533a9
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Sun Apr 7 21:21:37 2013 +0200

Move show_all for scrolled window out of WebKit2 guards

 midori/midori-view.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index f55e470..93dd632 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -4027,7 +4027,6 @@ midori_view_constructor (GType  type,
 gtk_box_pack_start (GTK_BOX (view), view-scrolled_window, TRUE, TRUE, 0);
 #endif
 
-gtk_widget_show_all (view-scrolled_window);
 #ifndef HAVE_WEBKIT2
 gtk_container_add (GTK_CONTAINER (view-scrolled_window), view-web_view);
 
@@ -4045,6 +4044,7 @@ midori_view_constructor (GType  type,
   midori_view_web_inspector_close_window_cb, view,
   NULL);
 #endif
+gtk_widget_show_all (view-scrolled_window);
 return object;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master webkit_web_view_get_tls_info provides an unowned ref - so ref it

2013-04-07 Thread Christian Dywan
Updating branch refs/heads/master
 to e7e101038e12d2f1bf3bec610f2450ffcd4902bd (commit)
   from 68b2b4fb66cfb651adf5e526fae03ca5c4d533a9 (commit)

commit e7e101038e12d2f1bf3bec610f2450ffcd4902bd
Author: Christian Dywan christ...@twotoasts.de
Date:   Sun Apr 7 21:32:42 2013 +0200

webkit_web_view_get_tls_info provides an unowned ref - so ref it

 midori/midori-view.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 93dd632..90a0047 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -735,7 +735,9 @@ midori_view_get_tls_info (MidoriView*   view,
 #ifdef HAVE_WEBKIT2
 WebKitWebView* web_view = WEBKIT_WEB_VIEW (view-web_view);
 *hostname = midori_uri_parse_hostname (webkit_web_view_get_uri (web_view), 
NULL);
-return webkit_web_view_get_tls_info (web_view, tls_cert, tls_flags);
+gboolean success = webkit_web_view_get_tls_info (web_view, tls_cert, 
tls_flags);
+g_object_ref (*tls_cert);
+return success;
 #else
 SoupMessage* message = midori_map_get_message 
(webkit_network_request_get_message (request));
 if (message != NULL)
@@ -861,8 +863,9 @@ midori_view_web_view_navigation_decision_cb (WebKitWebView* 
web_view
 else
 g_warn_if_reached ();
 g_object_unref (gcr_cert);
-g_object_unref (tls_cert);
 }
+if (tls_cert != NULL)
+g_object_unref (tls_cert);
 g_free (hostname);
 }
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Consistently use PACKAGE_NAME instead of literal binary name

2013-04-07 Thread Christian Dywan
Updating branch refs/heads/master
 to 6fb2666083d96705794bb2578979fe8b35677f67 (commit)
   from e7e101038e12d2f1bf3bec610f2450ffcd4902bd (commit)

commit 6fb2666083d96705794bb2578979fe8b35677f67
Author: Christian Dywan christ...@twotoasts.de
Date:   Sun Apr 7 21:34:42 2013 +0200

Consistently use PACKAGE_NAME instead of literal binary name

 midori/midori-app.c  |2 +-
 midori/midori-browser.c  |2 +-
 midori/midori-speeddial.vala |2 +-
 midori/socket.c  |4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/midori/midori-app.c b/midori/midori-app.c
index 04f0d71..435f11b 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -794,7 +794,7 @@ midori_app_init (MidoriApp* app)
 app-instance = MidoriAppInstanceNull;
 
 #if HAVE_LIBNOTIFY
-notify_init (midori);
+notify_init (PACKAGE_NAME);
 #else
 app-program_notify_send = g_find_program_in_path (notify-send);
 #endif
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 367a25f..15be7a1 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2568,7 +2568,7 @@ _action_add_desktop_shortcut_activate (GtkAction* 
action,
 g_key_file_set_string (keyfile, Desktop Entry, Type, Application);
 g_key_file_set_string (keyfile, Desktop Entry, Name, app_name);
 g_key_file_set_string (keyfile, Desktop Entry, Exec, app_exec);
-g_key_file_set_string (keyfile, Desktop Entry, TryExec, midori);
+g_key_file_set_string (keyfile, Desktop Entry, TryExec, PACKAGE_NAME);
 g_key_file_set_string (keyfile, Desktop Entry, Icon, app_icon);
 g_key_file_set_string (keyfile, Desktop Entry, Categories, Network;);
 sokoke_key_file_save_to_file (keyfile, app_dir, NULL);
diff --git a/midori/midori-speeddial.vala b/midori/midori-speeddial.vala
index d8dc29a..ba27997 100644
--- a/midori/midori-speeddial.vala
+++ b/midori/midori-speeddial.vala
@@ -99,7 +99,7 @@ namespace Midori {
 Katze.mkdir_with_parents (
 Path.build_path (Path.DIR_SEPARATOR_S,
  Environment.get_user_cache_dir (),
- midori, thumbnails), 0700);
+ PACKAGE_NAME, thumbnails), 0700);
 
 foreach (string tile in keyfile.get_groups ()) {
 try {
diff --git a/midori/socket.c b/midori/socket.c
index a4d3c55..cd4c1bf 100644
--- a/midori/socket.c
+++ b/midori/socket.c
@@ -263,8 +263,8 @@ gint socket_init(const gchar *instance_name, const gchar 
*config_dir, gboolean *
 #else
*exists = FALSE;
if (socket_filename == NULL)
-   socket_filename = g_strdup_printf(%s%cmidori_socket_%s_%s,
-   config_dir, G_DIR_SEPARATOR, g_get_host_name(), 
instance_name);
+   socket_filename = g_strdup_printf(%s%c%s_socket_%s_%s,
+   config_dir, G_DIR_SEPARATOR, PACKAGE_NAME, 
g_get_host_name(), instance_name);
 
sock = fd_connect_unix(socket_filename);
if (sock  0)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Fix compilation guards for midori_map_get_message

2013-04-07 Thread Christian Dywan
Updating branch refs/heads/master
 to 3ff0a33bc1d4a2abfec7f7e4f90eb39aa4384eb8 (commit)
   from 6fb2666083d96705794bb2578979fe8b35677f67 (commit)

commit 3ff0a33bc1d4a2abfec7f7e4f90eb39aa4384eb8
Author: Christian Dywan christ...@twotoasts.de
Date:   Sun Apr 7 21:42:07 2013 +0200

Fix compilation guards for midori_map_get_message

 midori/midori-view.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 90a0047..3c99d62 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -29,12 +29,12 @@
 #ifdef HAVE_GCR
 #define GCR_API_SUBJECT_TO_CHANGE
 #include gcr/gcr.h
+#endif
 
-#ifndef HAVE_WEBKIT2
+#if !defined (HAVE_WEBKIT2)  defined (HAVE_LIBSOUP_2_29_91)
 SoupMessage*
 midori_map_get_message (SoupMessage* message);
 #endif
-#endif
 
 #include string.h
 #include stdlib.h
@@ -725,6 +725,7 @@ midori_view_update_load_status (MidoriView*  view,
 #endif
 }
 
+#if defined (HAVE_LIBSOUP_2_29_91)
 gboolean
 midori_view_get_tls_info (MidoriView*   view,
   void* request,
@@ -754,6 +755,7 @@ midori_view_get_tls_info (MidoriView*   view,
 return FALSE;
 #endif
 }
+#endif
 
 static gboolean
 midori_view_web_view_navigation_decision_cb (WebKitWebView* 
web_view,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Enable rudimentary cookie storage with WebKit2

2013-04-07 Thread Christian Dywan
Updating branch refs/heads/master
 to a97bf2ff3111795cb1e49787197e517a26af769f (commit)
   from 3ff0a33bc1d4a2abfec7f7e4f90eb39aa4384eb8 (commit)

commit a97bf2ff3111795cb1e49787197e517a26af769f
Author: Christian Dywan christ...@twotoasts.de
Date:   Sun Apr 7 21:54:36 2013 +0200

Enable rudimentary cookie storage with WebKit2

 katze/midori-paths.vala |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index 24b0e0a..2fbf64d 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -135,6 +135,11 @@ namespace Midori {
 WebKit.WebContext.get_default ().set_disk_cache_directory (
 Path.build_path (Path.DIR_SEPARATOR_S, cache_dir, web));
 #endif
+#if HAVE_WEBKIT2
+var cookie_manager = WebKit.WebContext.get_default 
().get_cookie_manager ();
+cookie_manager.set_persistent_storage (Path.build_filename 
(config, cookies.db),
+WebKit.CookiePersistentStorage.SQLITE);
+#endif
 tmp_dir = get_runtime_dir ();
 }
 #if HAVE_WEBKIT_1_3_13
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement clearing HTTP cache with WebKit2

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to cf1040dbcacee62a6099b33f5e54c9dc3f1fdd77 (commit)
   from 69355aecfca64ae3ac4bf198ca737b4ae0812196 (commit)

commit cf1040dbcacee62a6099b33f5e54c9dc3f1fdd77
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 21:58:39 2013 +0200

Implement clearing HTTP cache with WebKit2

HAVE_WEBKIT2_A is a placeholder for new API, yet to be
tied to a version.

 katze/midori-paths.vala |2 +-
 midori/midori-privatedata.c |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index b894b19..382440a 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -131,7 +131,7 @@ namespace Midori {
 cache_dir = Path.build_path (Path.DIR_SEPARATOR_S,
 Environment.get_user_cache_dir (), PACKAGE_NAME);
 user_data_dir = Environment.get_user_data_dir ();
-#if 0 // HAVE_WEBKIT2
+#if HAVE_WEBKIT2_A
 WebKit.WebContext.get_default ().set_disk_cache_directory (
 Path.build_path (Path.DIR_SEPARATOR_S, cache_dir, web));
 #endif
diff --git a/midori/midori-privatedata.c b/midori/midori-privatedata.c
index 35aca15..89cd37d 100644
--- a/midori/midori-privatedata.c
+++ b/midori/midori-privatedata.c
@@ -303,7 +303,9 @@ midori_clear_saved_logins_cb (void)
 static void
 midori_clear_web_cache_cb (void)
 {
-#ifndef HAVE_WEBKIT2
+#ifdef HAVE_WEBKIT2
+webkit_web_context_clear_cache (webkit_web_context_get_default ());
+#else
 SoupSession* session = webkit_get_default_session ();
 SoupSessionFeature* feature = soup_session_get_feature (session, 
SOUP_TYPE_CACHE);
 gchar* cache = g_build_filename (midori_paths_get_cache_dir (), web, 
NULL);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement printing with WebKit2

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to e9e7e7d39bcb30f653508c737d713768fa28d465 (commit)
   from cf1040dbcacee62a6099b33f5e54c9dc3f1fdd77 (commit)

commit e9e7e7d39bcb30f653508c737d713768fa28d465
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 22:01:14 2013 +0200

Implement printing with WebKit2

There's no 'Print backgrounds' option for now, there doesn't
seem to be API to hook into GtkPrintOperation.

 midori/midori-view.c |   22 ++
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index e6fdafc..fb03457 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -5559,6 +5559,7 @@ midori_view_get_next_page (MidoriView* view)
 return midori_view_get_related_page (view, next, _(next));
 }
 
+#ifndef HAVE_WEBKIT2
 static GtkWidget*
 midori_view_print_create_custom_widget_cb (GtkPrintOperation* operation,
MidoriView*view)
@@ -5576,6 +5577,7 @@ midori_view_print_create_custom_widget_cb 
(GtkPrintOperation* operation,
 
 return box;
 }
+#endif
 
 /**
  * midori_view_print
@@ -5586,22 +5588,26 @@ midori_view_print_create_custom_widget_cb 
(GtkPrintOperation* operation,
 void
 midori_view_print (MidoriView* view)
 {
-#ifndef HAVE_WEBKIT2
-WebKitWebFrame* frame;
-GtkPrintOperation* operation;
-GError* error;
-
 g_return_if_fail (MIDORI_IS_VIEW (view));
 
-frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view-web_view));
-operation = gtk_print_operation_new ();
+#ifdef HAVE_WEBKIT2
+WebKitPrintOperation* operation = webkit_print_operation_new 
(WEBKIT_WEB_VIEW (view-web_view));
+GtkPrintSettings* settings = gtk_print_settings_new ();
+webkit_print_operation_set_print_settings (operation, settings);
+g_object_unref (settings);
+webkit_print_operation_run_dialog (operation,
+GTK_WINDOW (midori_browser_get_for_widget (view-web_view)));
+g_object_unref (operation);
+#else
+WebKitWebFrame* frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW 
(view-web_view));
+GtkPrintOperation* operation = gtk_print_operation_new ();
 gtk_print_operation_set_custom_tab_label (operation, _(Features));
 #if GTK_CHECK_VERSION (2, 18, 0)
 gtk_print_operation_set_embed_page_setup (operation, TRUE);
 #endif
 g_signal_connect (operation, create-custom-widget,
 G_CALLBACK (midori_view_print_create_custom_widget_cb), view);
-error = NULL;
+GError* error = NULL;
 webkit_web_frame_print_full (frame, operation,
 GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, error);
 g_object_unref (operation);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Use sudo to install win32 build

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to afd7ceedb0b980ccee8b2d27de5d28850458e557 (commit)
   from e9e7e7d39bcb30f653508c737d713768fa28d465 (commit)

commit afd7ceedb0b980ccee8b2d27de5d28850458e557
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Sat Apr 6 22:06:12 2013 +0200

Use sudo to install win32 build

 win32/makedist/win32-release |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/win32/makedist/win32-release b/win32/makedist/win32-release
index 375f4b6..97a610e 100755
--- a/win32/makedist/win32-release
+++ b/win32/makedist/win32-release
@@ -20,7 +20,7 @@ eval `rpm --eval %{mingw32_env}`
 
 ./configure --prefix=$MINGW_PREFIX --enable-gtk3
 make clean
-make install
+sudo make install
 
 rpmquery -qa mingw32*  midori-${version}-deps-i686.txt
 rm -f midori-$version.sha1
@@ -32,7 +32,7 @@ mv -v Midori-${version}_setup.exe $dropbox_dir
 dropbox puburl $dropbox_dir/midori-${version}.7z   release_links.txt
 dropbox puburl $dropbox_dir/Midori-${version}_setup.exe  release_links.txt
 
-if [ $NO_64BIT !=  ]; then
+if [ $64BIT !=  ]; then
 # 64-bit build
 #mingw64-env
 export MINGW_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw
@@ -40,7 +40,7 @@ if [ $NO_64BIT !=  ]; then
 
 ./configure --prefix=$MINGW_PREFIX --enable-gtk3
 make clean
-make install
+sudo make install
 
 rpmquery -qa mingw64*  midori-${version}-deps-x86_64.txt
 MINGW_PREFIX=${MINGW_PREFIX} RELEASE=1 sh ./win32/makedist/makedist.midori 
x86_64-portable
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Simplify midori_view_web_view_get_snapshot code

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to be195cd043d9f686ec9c4d8167710f2caccc2d4c (commit)
   from ad3311960430538bf844d2f3f1934c3ac8a83f08 (commit)

commit be195cd043d9f686ec9c4d8167710f2caccc2d4c
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 22:14:21 2013 +0200

Simplify midori_view_web_view_get_snapshot code

 midori/midori-view.c |   71 +
 1 files changed, 19 insertions(+), 52 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index fb03457..b78dfbc 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -69,11 +69,6 @@ static void
 _midori_view_set_settings (MidoriView*view,
MidoriWebSettings* settings);
 
-static GdkPixbuf*
-midori_view_web_view_get_snapshot (GtkWidget* web_view,
-   gint   width,
-   gint   height);
-
 #ifdef HAVE_WEBKIT2
 static void
 midori_view_uri_scheme_res (WebKitURISchemeRequest* request,
@@ -5722,19 +5717,17 @@ midori_view_get_snapshot (MidoriView* view,
 {
 g_return_val_if_fail (MIDORI_IS_VIEW (view), NULL);
 
-return midori_view_web_view_get_snapshot ((GtkWidget*)view-web_view, 
width, height);
-}
-
-static GdkPixbuf*
-midori_view_web_view_get_snapshot (GtkWidget* web_view,
-   gint   width,
-   gint   height)
-{
+GdkPixbuf* pixbuf;
+#ifdef HAVE_WEBKIT2_A
+webkit_web_view_get_snapshot (WEBKIT_WEB_VIEW (view-web_view),
+WEBKIT_SNAPSHOT_REGION_VISIBLE, WEBKIT_SNAPSHOT_OPTIONS_NONE,
+NULL, midori_view_get_snapshot_cb, view);
+#else
 GtkAllocation allocation;
-gboolean fast;
-gint x, y, w, h;
+gint x, y;
 GdkRectangle rect;
 #if !GTK_CHECK_VERSION (3, 0, 0)
+gint w, h;
 GdkWindow* window;
 GdkPixmap* pixmap;
 GdkEvent event;
@@ -5744,28 +5737,10 @@ midori_view_web_view_get_snapshot (GtkWidget* web_view,
 cairo_surface_t* surface;
 cairo_t* cr;
 #endif
-GdkPixbuf* pixbuf;
-
-g_return_val_if_fail (WEBKIT_IS_WEB_VIEW (web_view), NULL);
 
-gtk_widget_get_allocation (web_view, allocation);
+gtk_widget_get_allocation (view-web_view, allocation);
 x = allocation.x;
 y = allocation.y;
-w = allocation.width;
-h = allocation.height;
-
-/* If width and height are both negative, we try to render faster at
-   the cost of correctness or beauty. Only a part of the page is
-   rendered which makes it a lot faster and scaling isn't as nice. */
-fast = FALSE;
-if (width  0  height  0)
-{
-width *= -1;
-height *= -1;
-w = w  320 ? 320 : w;
-h = h  240 ? 240 : h;
-fast = TRUE;
-}
 
 #if GTK_CHECK_VERSION (3, 0, 0)
 surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
@@ -5773,17 +5748,19 @@ midori_view_web_view_get_snapshot (GtkWidget* web_view,
 cr = cairo_create (surface);
 cairo_rectangle (cr, x, y, width, height);
 cairo_clip (cr);
-gtk_widget_draw (web_view, cr);
+gtk_widget_draw (view-web_view, cr);
 pixbuf = gdk_pixbuf_get_from_surface (surface, x, y, width, height);
 cairo_surface_destroy (surface);
 cairo_destroy (cr);
 #else
+w = allocation.width;
+h = allocation.height;
 rect.x = x;
 rect.y = y;
 rect.width = w;
 rect.height = h;
 
-window = gtk_widget_get_window (web_view);
+window = gtk_widget_get_window (view-web_view);
 g_return_val_if_fail (window != NULL, NULL);
 
 pixmap = gdk_pixmap_new (window, w, h, gdk_drawable_get_depth (window));
@@ -5797,29 +5774,19 @@ midori_view_web_view_get_snapshot (GtkWidget* web_view,
 event.expose.area.width, event.expose.area.height);
 event.expose.region = gdk_region_rectangle (event.expose.area);
 
-g_signal_emit_by_name (web_view, expose-event, event, result);
+g_signal_emit_by_name (view-web_view, expose-event, event, result);
 
 colormap = gdk_drawable_get_colormap (pixmap);
 pixbuf = gdk_pixbuf_get_from_drawable (NULL, pixmap, colormap, 0, 0,
0, 0, rect.width, rect.height);
 g_object_unref (pixmap);
 #endif
+#endif
 
-if (width || height)
-{
-GdkPixbuf* scaled;
-if (!width)
-width = rect.width;
-if (!height)
-height = rect.height;
-
-scaled = gdk_pixbuf_scale_simple (pixbuf, width, height,
-fast ? GDK_INTERP_NEAREST : GDK_INTERP_TILES);
-g_object_unref (pixbuf);
-return scaled;
-}
-
-return pixbuf;
+GdkPixbuf* scaled = gdk_pixbuf_scale_simple (pixbuf, width, height,
+GDK_INTERP_TILES);
+g_object_unref (pixbuf);
+return scaled;
 }
 
 /**
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4

[Xfce4-commits] midori:master Stub out web inspector de-/ attaching for WebKit2

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to 6ff427549112a18a19bf0719346278915d329d34 (commit)
   from be195cd043d9f686ec9c4d8167710f2caccc2d4c (commit)

commit 6ff427549112a18a19bf0719346278915d329d34
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 22:45:55 2013 +0200

Stub out web inspector de-/ attaching for WebKit2

 midori/midori-view.c |   50 --
 1 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index b78dfbc..7a41d66 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1984,18 +1984,6 @@ midori_view_web_view_button_release_event_cb 
(WebKitWebView*  web_view,
 return button_press_handled;
 }
 
-static gboolean
-midori_view_inspector_window_key_press_event_cb (GtkWidget*   window,
- GdkEventKey* event,
- gpointer user_data)
-{
-/* Close window on Ctrl+W */
-if (event-keyval == 'w'  (event-state  GDK_CONTROL_MASK))
-gtk_widget_destroy (window);
-
-return FALSE;
-}
-
 static void
 handle_link_hints (WebKitWebView* web_view,
GdkEventKey*   event,
@@ -3697,6 +3685,19 @@ midori_view_get_progress (MidoriView* view)
 return midori_tab_get_progress (MIDORI_TAB (view));
 }
 
+#ifndef HAVE_WEBKIT2
+static gboolean
+midori_view_inspector_window_key_press_event_cb (GtkWidget*   window,
+ GdkEventKey* event,
+ gpointer user_data)
+{
+/* Close window on Ctrl+W */
+if (event-keyval == 'w'  (event-state  GDK_CONTROL_MASK))
+gtk_widget_destroy (window);
+
+return FALSE;
+}
+
 static void
 midori_view_web_inspector_construct_window (gpointer   inspector,
 WebKitWebView* web_view,
@@ -3773,8 +3774,8 @@ static gboolean
 midori_view_web_inspector_show_window_cb (WebKitWebInspector* inspector,
   MidoriView* view)
 {
-WebKitWebView* inspector_view = webkit_web_inspector_get_web_view 
(inspector);
-GtkWidget* window = gtk_widget_get_toplevel (GTK_WIDGET (inspector_view));
+GtkWidget* inspector_view = GTK_WIDGET (webkit_web_inspector_get_web_view 
(inspector));
+GtkWidget* window = gtk_widget_get_toplevel (inspector_view);
 if (!window)
 return FALSE;
 if (katze_object_get_boolean (view-settings, last-inspector-attached))
@@ -3794,7 +3795,7 @@ static gboolean
 midori_view_web_inspector_attach_window_cb (gpointerinspector,
 MidoriView* view)
 {
-WebKitWebView* inspector_view = webkit_web_inspector_get_web_view 
(inspector);
+GtkWidget* inspector_view = GTK_WIDGET (webkit_web_inspector_get_web_view 
(inspector));
 g_signal_emit_by_name (view, attach-inspector, inspector_view);
 return TRUE;
 }
@@ -3803,15 +3804,15 @@ static gboolean
 midori_view_web_inspector_detach_window_cb (gpointerinspector,
 MidoriView* view)
 {
-WebKitWebView* inspector_view = webkit_web_inspector_get_web_view 
(inspector);
-GtkWidget* parent = gtk_widget_get_parent (GTK_WIDGET (inspector_view));
+GtkWidget* inspector_view = GTK_WIDGET (webkit_web_inspector_get_web_view 
(inspector));
+GtkWidget* parent = gtk_widget_get_parent (inspector_view);
 if (GTK_IS_WINDOW (parent))
 return FALSE;
 
 gtk_widget_hide (parent);
 g_signal_emit_by_name (view, detach-inspector, inspector_view);
 midori_view_web_inspector_construct_window (inspector,
-WEBKIT_WEB_VIEW (view-web_view), GTK_WIDGET (inspector_view), view);
+WEBKIT_WEB_VIEW (view-web_view), inspector_view, view);
 return TRUE;
 }
 
@@ -3819,13 +3820,18 @@ static gboolean
 midori_view_web_inspector_close_window_cb (gpointerinspector,
MidoriView* view)
 {
-WebKitWebView* inspector_view = webkit_web_inspector_get_web_view 
(inspector);
-GtkWidget* scrolled = gtk_widget_get_parent (GTK_WIDGET (inspector_view));
+GtkWidget* inspector_view = GTK_WIDGET (webkit_web_inspector_get_web_view 
(inspector));
+#ifdef HAVE_WEBKIT2
+GtkWidget* scrolled = inspector_view;
+#else
+GtkWidget* scrolled = gtk_widget_get_parent (inspector_view);
+#endif
 if (!scrolled)
 return FALSE;
 gtk_widget_hide (gtk_widget_get_parent (scrolled));
 return TRUE;
 }
+#endif
 
 static GObject*
 midori_view_constructor (GType  type,
@@ -3963,10 +3969,9 @@ midori_view_constructor (GType  type,
 gtk_box_pack_start (GTK_BOX (view), view-scrolled_window, TRUE, TRUE, 0);
 #endif
 
+gtk_widget_show_all (view-scrolled_window);
 #ifndef HAVE_WEBKIT2
 gtk_container_add (GTK_CONTAINER (view-scrolled_window

[Xfce4-commits] midori:master Unify certificate checks during load

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to 1f430e6eaa48832f384d6076b2c00f94e528cce9 (commit)
   from 6ff427549112a18a19bf0719346278915d329d34 (commit)

commit 1f430e6eaa48832f384d6076b2c00f94e528cce9
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 23:02:50 2013 +0200

Unify certificate checks during load

 midori/midori-locationaction.c |7 +++
 midori/midori-session.c|2 +-
 midori/midori-view.c   |   34 +-
 3 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index 63e8e83..c956fef 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1283,6 +1283,7 @@ midori_location_action_focus_out_event_cb (GtkWidget*   
widget,
 #endif
 
 #if defined (HAVE_LIBSOUP_2_34_0)
+#ifndef HAVE_WEBKIT2
 static GHashTable* message_map = NULL;
 void
 midori_map_add_message (SoupMessage* message)
@@ -1300,10 +1301,13 @@ midori_map_get_message (SoupMessage* message)
 SoupURI* uri = soup_message_get_uri (message);
 SoupMessage* full;
 g_return_val_if_fail (uri  uri-host, message);
+if (message_map == NULL)
+message_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, 
g_object_unref);
 full = g_hash_table_lookup (message_map, uri-host);
 g_return_val_if_fail (full, message);
 return full;
 }
+#endif
 
 #ifdef HAVE_GCR
 typedef enum {
@@ -1398,7 +1402,10 @@ midori_location_action_show_page_info (GtkWidget* widget,
 #endif
 midori_view_get_tls_info (view, request, tls_cert, tls_flags, hostname);
 if (tls_cert == NULL)
+{
+g_free (hostname);
 return;
+}
 
 #ifdef HAVE_GCR
 GByteArray* der_cert;
diff --git a/midori/midori-session.c b/midori/midori-session.c
index f485a21..8e6c48a 100644
--- a/midori/midori-session.c
+++ b/midori/midori-session.c
@@ -102,7 +102,7 @@ soup_session_settings_notify_first_party_cb 
(MidoriWebSettings* settings,
 }
 #endif
 
-#if defined (HAVE_LIBSOUP_2_34_0)
+#if !defined (HAVE_WEBKIT2)  defined (HAVE_LIBSOUP_2_34_0)
 /* Implemented in MidoriLocationAction */
 void
 midori_map_add_message (SoupMessage* message);
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 7a41d66..2ebffc4 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -30,9 +30,11 @@
 #define GCR_API_SUBJECT_TO_CHANGE
 #include gcr/gcr.h
 
+#ifndef HAVE_WEBKIT2
 SoupMessage*
 midori_map_get_message (SoupMessage* message);
 #endif
+#endif
 
 #include string.h
 #include stdlib.h
@@ -923,52 +925,50 @@ midori_view_load_committed (MidoriView* view)
 
 if (!strncmp (uri, https, 5))
 {
+#if defined (HAVE_LIBSOUP_2_29_91)
 #ifdef HAVE_WEBKIT2
-/* Not implemented */
-#elif defined (HAVE_LIBSOUP_2_29_91)
+void* request = NULL;
+#else
 WebKitWebFrame* web_frame = webkit_web_view_get_main_frame 
(WEBKIT_WEB_VIEW (view-web_view));
 WebKitWebDataSource* source = webkit_web_frame_get_data_source 
(web_frame);
 WebKitNetworkRequest* request = webkit_web_data_source_get_request 
(source);
-SoupMessage* message = webkit_network_request_get_message (request);
-
-if (message
-  soup_message_get_flags (message)  
SOUP_MESSAGE_CERTIFICATE_TRUSTED)
+#endif
+GTlsCertificate* tls_cert;
+GTlsCertificateFlags tls_flags;
+gchar* hostname; /* FIXME leak */
+if (midori_view_get_tls_info (view, request, tls_cert, tls_flags, 
hostname))
 midori_tab_set_security (MIDORI_TAB (view), 
MIDORI_SECURITY_TRUSTED);
 #ifdef HAVE_GCR
-else if (!midori_tab_get_special (MIDORI_TAB (view))  message != 
NULL)
+else if (!midori_tab_get_special (MIDORI_TAB (view))  tls_cert != 
NULL)
 {
-GTlsCertificate* tls_cert;
 GcrCertificate* gcr_cert;
 GByteArray* der_cert;
-SoupURI* soup_uri;
 
-message = midori_map_get_message (message);
-g_object_get (message, tls-certificate, tls_cert, NULL);
-g_return_if_fail (tls_cert != NULL);
 g_object_get (tls_cert, certificate, der_cert, NULL);
 gcr_cert = gcr_simple_certificate_new (der_cert-data, 
der_cert-len);
 g_byte_array_unref (der_cert);
-soup_uri = soup_message_get_uri (message);
-if (gcr_trust_is_certificate_pinned (gcr_cert, 
GCR_PURPOSE_SERVER_AUTH, soup_uri-host, NULL, NULL))
+if (gcr_trust_is_certificate_pinned (gcr_cert, 
GCR_PURPOSE_SERVER_AUTH, hostname, NULL, NULL))
 midori_tab_set_security (MIDORI_TAB (view), 
MIDORI_SECURITY_TRUSTED);
 else
 {
-GTlsCertificateFlags tls_flags;
 midori_tab_set_security (MIDORI_TAB (view), 
MIDORI_SECURITY_UNKNOWN);
-g_object_get (message, tls-errors, tls_flags, NULL

[Xfce4-commits] midori:master Make download dialog work and allow files to load

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to e97a57fbbbd7705e9e54bd1ed1cdf019b5034b13 (commit)
   from 1f430e6eaa48832f384d6076b2c00f94e528cce9 (commit)

commit e97a57fbbbd7705e9e54bd1ed1cdf019b5034b13
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 23:09:53 2013 +0200

Make download dialog work and allow files to load

 midori/midori-browser.c |   63 ++---
 midori/midori-view.c|   78 ++-
 2 files changed, 107 insertions(+), 34 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 33a147b..367a25f 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -1437,15 +1437,26 @@ midori_browser_download_status_cb (WebKitDownload*  
download,
 #endif
 }
 
+#ifdef HAVE_WEBKIT2
+static void
+midori_browser_close_tab_idle (GObject*  resource,
+   GAsyncResult* result,
+   gpointer  view)
+{
+guchar* data = webkit_web_resource_get_data_finish (WEBKIT_WEB_RESOURCE 
(resource),
+result, NULL, NULL);
+if (data != NULL)
+return;
+#else
 static gboolean
 midori_browser_close_tab_idle (gpointer view)
 {
-MidoriBrowser* browser;
-
-g_return_val_if_fail (GTK_IS_WIDGET (view), FALSE);
-browser = midori_browser_get_for_widget (GTK_WIDGET (view));
+#endif
+MidoriBrowser* browser = midori_browser_get_for_widget (GTK_WIDGET (view));
 midori_browser_close_tab (browser, GTK_WIDGET (view));
+#ifndef HAVE_WEBKIT2
 return G_SOURCE_REMOVE;
+#endif
 }
 
 static gboolean
@@ -1453,15 +1464,10 @@ midori_view_download_requested_cb (GtkWidget*  view,
WebKitDownload* download,
MidoriBrowser*  browser)
 {
-#ifndef HAVE_WEBKIT2
 MidoriDownloadType type = midori_download_get_type (download);
-GtkWidget* web_view;
-WebKitWebFrame* web_frame;
-WebKitWebDataSource* datasource;
-gboolean handled;
+gboolean handled = TRUE;
 
 g_return_val_if_fail (MIDORI_IS_VIEW (view), FALSE);
-handled = TRUE;
 if (type == MIDORI_DOWNLOAD_CANCEL)
 {
 handled = FALSE;
@@ -1474,9 +1480,15 @@ midori_view_download_requested_cb (GtkWidget*  view,
 g_signal_connect (download, notify::status,
 G_CALLBACK (midori_browser_download_status_cb), GTK_WIDGET 
(browser));
 g_free (destination_uri);
+#ifndef HAVE_WEBKIT2
 webkit_download_start (download);
+#endif
 }
+#ifdef HAVE_WEBKIT2
+else if (!webkit_download_get_destination (download))
+#else
 else if (!webkit_download_get_destination_uri (download))
+#endif
 {
 if (type == MIDORI_DOWNLOAD_SAVE_AS)
 {
@@ -1485,13 +1497,19 @@ midori_view_download_requested_cb (GtkWidget*  view,
 
 if (!dialog)
 {
+#ifdef HAVE_WEBKIT2
+const gchar* download_uri = webkit_uri_response_get_uri (
+webkit_download_get_response (download));
+#else
+const gchar* download_uri = webkit_download_get_uri (download);
+#endif
 gchar* folder;
 dialog = (GtkWidget*)midori_file_chooser_dialog_new (_(Save 
file),
 GTK_WINDOW (browser), GTK_FILE_CHOOSER_ACTION_SAVE);
 gtk_file_chooser_set_do_overwrite_confirmation (
 GTK_FILE_CHOOSER (dialog), TRUE);
 gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
-folder = midori_uri_get_folder (webkit_download_get_uri 
(download));
+folder = midori_uri_get_folder (download_uri);
 if (folder == NULL)
 folder = katze_object_get_string (browser-settings, 
download-folder);
 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER 
(dialog), folder);
@@ -1530,19 +1548,26 @@ midori_view_download_requested_cb (GtkWidget*  view,
 midori_browser_prepare_download (browser, download, 
destination_uri);
 g_free (destination_uri);
 }
+#ifndef HAVE_WEBKIT2
 webkit_download_start (download);
+#endif
 }
 
 /* Close empty tabs due to download links with a target */
-web_view = midori_view_get_web_view (MIDORI_VIEW (view));
-web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view));
-datasource = webkit_web_frame_get_data_source (web_frame);
-if (midori_view_is_blank (MIDORI_VIEW (view))  
webkit_web_data_source_get_data (datasource) == NULL)
-g_idle_add (midori_browser_close_tab_idle, view);
+if (midori_view_is_blank (MIDORI_VIEW (view)))
+{
+GtkWidget* web_view = midori_view_get_web_view (MIDORI_VIEW (view));
+#ifdef HAVE_WEBKIT2
+WebKitWebResource* resource = webkit_web_view_get_main_resource

[Xfce4-commits] midori:master Fix midori_view_get_for_widget behavior for WebKit2

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to 45ef6691c14e2eaf581bb4bc482ebbe88e3910aa (commit)
   from e97a57fbbbd7705e9e54bd1ed1cdf019b5034b13 (commit)

commit 45ef6691c14e2eaf581bb4bc482ebbe88e3910aa
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 23:12:15 2013 +0200

Fix midori_view_get_for_widget behavior for WebKit2

 midori/midori-view.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 56e5e58..8d9f1ab 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -5875,7 +5875,11 @@ midori_view_get_for_widget (GtkWidget* web_view)
 {
 g_return_val_if_fail (GTK_IS_WIDGET (web_view), NULL);
 
+#ifdef HAVE_WEBKIT2
+GtkWidget* scrolled = web_view;
+#else
 GtkWidget* scrolled = gtk_widget_get_parent (web_view);
+#endif
 #if GTK_CHECK_VERSION(3, 2, 0)
 GtkWidget* overlay = gtk_widget_get_parent (scrolled);
 GtkWidget* view = gtk_widget_get_parent (overlay);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Move remaining WebKi1-specific signals in Midori.View

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to 2a50de7911ca3a1a98876ca0161a7435eb3ffaa7 (commit)
   from 45ef6691c14e2eaf581bb4bc482ebbe88e3910aa (commit)

commit 2a50de7911ca3a1a98876ca0161a7435eb3ffaa7
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 23:15:00 2013 +0200

Move remaining WebKi1-specific signals in Midori.View

 midori/midori-view.c |   34 ++
 1 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 8d9f1ab..f55e470 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1276,7 +1276,19 @@ midori_view_add_info_bar (MidoriView*view,
 return infobar;
 }
 
-#ifndef HAVE_WEBKIT2
+#ifdef HAVE_WEBKIT2
+static gboolean
+midori_view_web_view_permission_request_cb (WebKitWebView*   web_view,
+WebKitPermissionRequest* decision,
+MidoriView*  view)
+{
+/* if (WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST (decision))
+{
+TODO: return TRUE;
+} */
+return FALSE;
+}
+#else
 static void
 midori_view_database_response_cb (GtkWidget* infobar,
   gint   response,
@@ -3254,6 +3266,7 @@ midori_view_download_requested_cb (GtkWidget*  
web_view,
 #endif
 }
 
+#ifndef HAVE_WEBKIT2
 static gboolean
 webkit_web_view_console_message_cb (GtkWidget*   web_view,
 const gchar* message,
@@ -3261,7 +3274,6 @@ webkit_web_view_console_message_cb (GtkWidget*   web_view,
 const gchar* source_id,
 MidoriView*  view)
 {
-#ifndef HAVE_WEBKIT2
 if (g_object_get_data (G_OBJECT (webkit_get_default_session ()),
pass-through-console))
 return FALSE;
@@ -3281,9 +3293,6 @@ webkit_web_view_console_message_cb (GtkWidget*   web_view,
 else
 g_signal_emit_by_name (view, console-message, message, line, 
source_id);
 return TRUE;
-#else
-return FALSE;
-#endif
 }
 
 static void
@@ -3294,7 +3303,6 @@ midori_view_script_response_cb (GtkWidget*  infobar,
 view-alerts--;
 }
 
-#ifndef HAVE_WEBKIT2
 static gboolean
 midori_view_web_view_script_alert_cb (GtkWidget*  web_view,
   WebKitWebFrame* web_frame,
@@ -3906,6 +3914,8 @@ midori_view_constructor (GType  type,
   webkit_web_view_hovering_over_link_cb, view,
   signal::decide-policy,
   midori_view_web_view_navigation_decision_cb, view,
+  signal::permission-request,
+  midori_view_web_view_permission_request_cb, view,
   #else
   signal::notify::load-status,
   midori_view_web_view_notify_load_status_cb, view,
@@ -3939,6 +3949,12 @@ midori_view_constructor (GType  type,
   #endif
   signal::hovering-over-link,
   webkit_web_view_hovering_over_link_cb, view,
+  signal::status-bar-text-changed,
+  webkit_web_view_statusbar_text_changed_cb, view,
+  signal::populate-popup,
+  webkit_web_view_populate_popup_cb, view,
+  signal::console-message,
+  webkit_web_view_console_message_cb, view,
   signal::download-requested,
   midori_view_download_requested_cb, view,
   #endif
@@ -3947,8 +3963,6 @@ midori_view_constructor (GType  type,
   webkit_web_view_notify_uri_cb, view,
   signal::notify::title,
   webkit_web_view_notify_title_cb, view,
-  signal::status-bar-text-changed,
-  webkit_web_view_statusbar_text_changed_cb, view,
   signal::leave-notify-event,
   midori_view_web_view_leave_notify_event_cb, view,
   signal::button-press-event,
@@ -3959,10 +3973,6 @@ midori_view_constructor (GType  type,
   gtk_widget_key_press_event_cb, view,
   signal::scroll-event,
   gtk_widget_scroll_event_cb, view,
-  signal::populate-popup,
-  webkit_web_view_populate_popup_cb, view,
-  signal::console-message,
-  webkit_web_view_console_message_cb, view,
   NULL);
 
 if (view-settings)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement WebKit2 code path of clearing page icons

2013-04-06 Thread Christian Dywan
Updating branch refs/heads/master
 to f0207c45c717f5acac5503f1be04513851908b2a (commit)
   from 2a50de7911ca3a1a98876ca0161a7435eb3ffaa7 (commit)

commit f0207c45c717f5acac5503f1be04513851908b2a
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 23:16:45 2013 +0200

Implement WebKit2 code path of clearing page icons

 katze/midori-paths.vala |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index 382440a..24b0e0a 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -404,13 +404,13 @@ namespace Midori {
 public static void clear_icons () {
 assert (cache_dir != null);
 assert (user_data_dir != null);
-#if !HAVE_WEBKIT2
-#if HAVE_WEBKIT_1_8_0
+#if HAVE_WEBKIT2
+WebKit.WebContext.get_default ().get_favicon_database ().clear ();
+#elif HAVE_WEBKIT_1_8_0
 WebKit.get_favicon_database ().clear ();
 #elif HAVE_WEBKIT_1_3_13
 WebKit.get_icon_database ().clear ();
 #endif
-#endif
 /* FIXME: Exclude search engine icons */
 remove_path (Path.build_filename (cache_dir, icons));
 remove_path (Path.build_filename (user_data_dir, webkit, 
icondatabase));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement view-based favicon handling for WebKit2

2013-04-05 Thread Christian Dywan
Updating branch refs/heads/master
 to 183747f06cd9e327b61360b20056a3f5f228cddb (commit)
   from 8d041d8a30fd40a70627fe806a42930c1a93f5f9 (commit)

commit 183747f06cd9e327b61360b20056a3f5f228cddb
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 5 23:28:30 2013 +0200

Implement view-based favicon handling for WebKit2

 katze/midori-paths.vala|   18 --
 midori/midori-view.c   |   23 ++-
 midori/webkit2gtk-3.0.vapi |   11 +++
 3 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index 6f5cd45..b894b19 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -131,20 +131,24 @@ namespace Midori {
 cache_dir = Path.build_path (Path.DIR_SEPARATOR_S,
 Environment.get_user_cache_dir (), PACKAGE_NAME);
 user_data_dir = Environment.get_user_data_dir ();
+#if 0 // HAVE_WEBKIT2
+WebKit.WebContext.get_default ().set_disk_cache_directory (
+Path.build_path (Path.DIR_SEPARATOR_S, cache_dir, web));
+#endif
 tmp_dir = get_runtime_dir ();
 }
-#if !HAVE_WEBKIT2
 #if HAVE_WEBKIT_1_3_13
 if (user_data_dir != null) {
 string folder = Path.build_filename (user_data_dir, webkit, 
icondatabase);
-#if HAVE_WEBKIT_1_8_0
+#if HAVE_WEBKIT2
+WebKit.WebContext.get_default 
().set_favicon_database_directory (folder);
+#elif HAVE_WEBKIT_1_8_0
 WebKit.get_favicon_database ().set_path (folder);
 #elif HAVE_WEBKIT_1_3_13
 WebKit.get_icon_database ().set_path (folder);
 #endif
 }
 #endif
-#endif
 if (strcmp (Environment.get_variable (MIDORI_DEBUG), paths) == 
0) {
 stdout.printf (config: %s\ncache: %s\nuser_data: %s\ntmp: 
%s\n,
config_dir, cache_dir, user_data_dir, tmp_dir);
@@ -419,8 +423,11 @@ namespace Midori {
 if (widget != null)
 Gtk.icon_size_lookup_for_settings (widget.get_settings (),
 Gtk.IconSize.MENU, out icon_width, out icon_height);
-#if !HAVE_WEBKIT2
-#if HAVE_WEBKIT_1_8_0
+#if HAVE_WEBKIT2
+/* TODO async
+var database = WebKit.WebContext.get_default 
().get_favicon_database ();
+database.get_favicon.begin (uri, null); */
+#elif HAVE_WEBKIT_1_8_0
 Gdk.Pixbuf? pixbuf = WebKit.get_favicon_database ()
 .try_get_favicon_pixbuf (uri, icon_width, icon_height);
 if (pixbuf != null)
@@ -448,7 +455,6 @@ namespace Midori {
 catch (GLib.Error error) { }
 }
 #endif
-#endif
 if (widget != null)
 return widget.render_icon (Gtk.STOCK_FILE, Gtk.IconSize.MENU, 
null);
 return null;
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 7fa0165..d81bb88 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -619,7 +619,17 @@ _midori_web_view_load_icon (MidoriView* view)
 gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU, 
icon_width, icon_height);
 GdkPixbuf* pixbuf = NULL;
 #ifdef HAVE_WEBKIT2
-/* FIXME */
+cairo_surface_t* surface = webkit_web_view_get_favicon (WEBKIT_WEB_VIEW 
(view-web_view));
+if (surface != NULL
+  (pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0,
+cairo_image_surface_get_width (surface),
+cairo_image_surface_get_height (surface
+{
+GdkPixbuf* pixbuf_scaled = gdk_pixbuf_scale_simple (pixbuf,
+icon_width, icon_height, GDK_INTERP_BILINEAR);
+g_object_unref (pixbuf);
+midori_view_apply_icon (view, pixbuf_scaled, view-icon_uri);
+}
 #elif WEBKIT_CHECK_VERSION (1, 8, 0)
 if ((pixbuf = webkit_web_view_try_get_favicon_pixbuf (
 WEBKIT_WEB_VIEW (view-web_view), icon_width, icon_height)))
@@ -1643,12 +1653,15 @@ midori_web_view_notify_icon_uri_cb (WebKitWebView* 
web_view,
 MidoriView*view)
 {
 #ifdef HAVE_WEBKIT2
-/* TODO */
+const gchar* uri = webkit_web_view_get_uri (web_view);
+WebKitWebContext* context = webkit_web_context_get_default ();
+WebKitFaviconDatabase* favicon_database = 
webkit_web_context_get_favicon_database (context);
+gchar* icon_uri = webkit_favicon_database_get_favicon_uri 
(favicon_database, uri);
 #else
-const gchar* icon_uri = webkit_web_view_get_icon_uri (web_view);
-katze_assign (view-icon_uri, g_strdup (icon_uri));
-_midori_web_view_load_icon (view);
+gchar* icon_uri = g_strdup (webkit_web_view_get_icon_uri (web_view));
 #endif
+katze_assign (view-icon_uri, icon_uri);
+_midori_web_view_load_icon (view);
 }
 #endif
 
diff --git a/midori/webkit2gtk-3.0.vapi b/midori/webkit2gtk-3.0.vapi
index 0279812..0cb4757 100644
--- a/midori/webkit2gtk-3.0.vapi
+++ b/midori/webkit2gtk-3.0.vapi

[Xfce4-commits] midori:master Add a Gtk.Entry to --plain mode for entering URLs

2013-04-05 Thread Christian Dywan
Updating branch refs/heads/master
 to 473e3087e9cd6dbc2768a3cdcb7abe4fa39884ac (commit)
   from 183747f06cd9e327b61360b20056a3f5f228cddb (commit)

commit 473e3087e9cd6dbc2768a3cdcb7abe4fa39884ac
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 5 23:31:40 2013 +0200

Add a Gtk.Entry to --plain mode for entering URLs

On Windows it's especially tedious to use a command line.

 midori/main.c |   25 +++--
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 9be9d4d..0c53bdb 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -30,6 +30,15 @@
 #include katze/katze.h
 #include sqlite3.h
 
+static void
+plain_entry_activate_cb (GtkWidget* entry,
+ GtkWidget* web_view)
+{
+gchar* uri = sokoke_magic_uri (gtk_entry_get_text (GTK_ENTRY (entry)), 
FALSE, TRUE);
+webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view), uri);
+g_free (uri);
+}
+
 #define HAVE_OFFSCREEN GTK_CHECK_VERSION (2, 20, 0)
 
 #ifndef HAVE_WEBKIT2
@@ -307,25 +316,29 @@ main (intargc,
 if (plain)
 {
 GtkWidget* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+GtkWidget* vbox = gtk_vbox_new (FALSE, 0);
+GtkWidget* entry = gtk_entry_new ();
 #ifndef HAVE_WEBKIT2
 GtkWidget* scrolled = gtk_scrolled_window_new (NULL, NULL);
 #endif
 GtkWidget* web_view = webkit_web_view_new ();
-gchar* uri = sokoke_magic_uri (
-(uris != NULL  uris[0]) ? uris[0] : http://www.example.com;, 
FALSE, TRUE);
 katze_window_set_sensible_default_size (GTK_WINDOW (window));
 
+gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
 #ifndef HAVE_WEBKIT2
-gtk_container_add (GTK_CONTAINER (window), scrolled);
+gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE, TRUE, 0);
 gtk_container_add (GTK_CONTAINER (scrolled), web_view);
 #else
-gtk_container_add (GTK_CONTAINER (window), web_view);
+gtk_box_pack_start (GTK_BOX (vbox), web_view, TRUE, TRUE, 0);
 #endif
+gtk_container_add (GTK_CONTAINER (window), vbox);
+gtk_entry_set_text (GTK_ENTRY (entry), uris  *uris ? *uris : 
http://www.example.com;);
+plain_entry_activate_cb (entry, web_view);
+g_signal_connect (entry, activate,
+G_CALLBACK (plain_entry_activate_cb), web_view);
 g_signal_connect (window, delete-event,
 G_CALLBACK (gtk_main_quit), window);
 gtk_widget_show_all (window);
-webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view), uri);
-g_free (uri);
 gtk_main ();
 return 0;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Mouse button handling with WebKit2 except URL paste

2013-04-05 Thread Christian Dywan
Updating branch refs/heads/master
 to 910547a6a3542bd1c9e9acca58b002d5851b51f4 (commit)
   from 473e3087e9cd6dbc2768a3cdcb7abe4fa39884ac (commit)

commit 910547a6a3542bd1c9e9acca58b002d5851b51f4
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 5 23:33:39 2013 +0200

Mouse button handling with WebKit2 except URL paste

 midori/midori-view.c |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index d81bb88..3c57423 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1713,7 +1713,10 @@ webkit_web_view_hovering_over_link_cb (WebKitWebView*
   web_view,
 {
 #ifdef HAVE_WEBKIT2
 if (!webkit_hit_test_result_context_is_link (hit_test_result))
+{
+katze_assign (view-link_uri, NULL);
 return;
+}
 const gchar* link_uri = webkit_hit_test_result_get_link_uri 
(hit_test_result);
 #endif
 
@@ -1783,7 +1786,6 @@ midori_view_web_view_button_press_event_cb 
(WebKitWebView*  web_view,
 GdkEventButton* event,
 MidoriView* view)
 {
-#ifndef HAVE_WEBKIT2
 GtkClipboard* clipboard;
 gchar* uri;
 gchar* new_uri;
@@ -1842,13 +1844,10 @@ midori_view_web_view_button_press_event_cb 
(WebKitWebView*  web_view,
 if (midori_settings_get_middle_click_opens_selection (MIDORI_SETTINGS 
(view-settings)))
 #endif
 {
-gboolean is_editable;
-WebKitHitTestResult* result;
-WebKitHitTestResultContext context;
-
-result = webkit_web_view_get_hit_test_result (web_view, event);
-context = katze_object_get_int (result, context);
-is_editable = context  WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
+#ifndef HAVE_WEBKIT2
+WebKitHitTestResult* result = webkit_web_view_get_hit_test_result 
(web_view, event);
+WebKitHitTestResultContext context = katze_object_get_int (result, 
context);
+gboolean is_editable = context  
WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE;
 g_object_unref (result);
 if (!is_editable)
 {
@@ -1900,6 +1899,7 @@ midori_view_web_view_button_press_event_cb 
(WebKitWebView*  web_view,
 }
 }
 }
+#endif
 }
 if (MIDORI_MOD_SCROLL (event-state))
 {
@@ -1943,7 +1943,6 @@ midori_view_web_view_button_press_event_cb 
(WebKitWebView*  web_view,
 
 /* We propagate the event, since it may otherwise be stuck in WebKit */
 g_signal_emit_by_name (view, event, event, background);
-#endif
 return FALSE;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement certificate handling with WebKit2

2013-04-05 Thread Christian Dywan
Updating branch refs/heads/master
 to 898da5f2bb2d14e271d5b0f2ad588c577fa5ebca (commit)
   from 910547a6a3542bd1c9e9acca58b002d5851b51f4 (commit)

commit 898da5f2bb2d14e271d5b0f2ad588c577fa5ebca
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 00:04:17 2013 +0200

Implement certificate handling with WebKit2

 midori/midori-locationaction.c |   23 -
 midori/midori-view.c   |   52 ---
 midori/midori-view.h   |7 +
 3 files changed, 60 insertions(+), 22 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index f39c1af..63e8e83 100644
--- a/midori/midori-locationaction.c
+++ b/midori/midori-locationaction.c
@@ -1382,20 +1382,21 @@ midori_location_action_show_page_info (GtkWidget* 
widget,
GtkBox*box,
GtkWidget* dialog)
 {
-#ifndef HAVE_WEBKIT2
+GTlsCertificate* tls_cert;
+GTlsCertificateFlags tls_flags;
+gchar* hostname;
+
 MidoriBrowser* browser = midori_browser_get_for_widget (widget);
 MidoriView* view = MIDORI_VIEW (midori_browser_get_current_tab (browser));
+#ifdef HAVE_WEBKIT2
+void* request = NULL;
+#else
 WebKitWebView* web_view = WEBKIT_WEB_VIEW (midori_view_get_web_view 
(view));
 WebKitWebFrame* web_frame = webkit_web_view_get_main_frame (web_view);
 WebKitWebDataSource* source = webkit_web_frame_get_data_source (web_frame);
 WebKitNetworkRequest* request = webkit_web_data_source_get_request 
(source);
-SoupMessage* message = midori_map_get_message 
(webkit_network_request_get_message (request));
-GTlsCertificate* tls_cert;
-GTlsCertificateFlags tls_flags;
-
-g_return_if_fail (message);
-g_object_get (message, tls-certificate, tls_cert, tls-errors, 
tls_flags, NULL);
-
+#endif
+midori_view_get_tls_info (view, request, tls_cert, tls_flags, hostname);
 if (tls_cert == NULL)
 return;
 
@@ -1403,7 +1404,6 @@ midori_location_action_show_page_info (GtkWidget* widget,
 GByteArray* der_cert;
 GcrCertificate* gcr_cert;
 GtkWidget* details;
-SoupURI* uri = soup_message_get_uri (message);
 
 g_object_get (tls_cert, certificate, der_cert, NULL);
 gcr_cert = gcr_simple_certificate_new (
@@ -1412,7 +1412,7 @@ midori_location_action_show_page_info (GtkWidget* widget,
 details = (GtkWidget*)gcr_certificate_details_widget_new (gcr_cert);
 gtk_widget_show (details);
 gtk_container_add (GTK_CONTAINER (box), details);
-if (gcr_trust_is_certificate_pinned (gcr_cert, GCR_PURPOSE_SERVER_AUTH, 
uri-host, NULL, NULL))
+if (gcr_trust_is_certificate_pinned (gcr_cert, GCR_PURPOSE_SERVER_AUTH, 
hostname, NULL, NULL))
 gtk_dialog_add_buttons (GTK_DIALOG (dialog),
 (_Don't trust this website), MIDORI_CERT_REVOKE, NULL);
 else if (tls_flags  0)
@@ -1422,7 +1422,7 @@ midori_location_action_show_page_info (GtkWidget* widget,
 gtk_dialog_add_button (GTK_DIALOG (dialog), _(_Export certificate), 
MIDORI_CERT_EXPORT),
 secondary, TRUE, NULL);
 
-g_object_set_data_full (G_OBJECT (gcr_cert), peer, g_strdup (uri-host), 
(GDestroyNotify)g_free);
+g_object_set_data_full (G_OBJECT (gcr_cert), peer, hostname, 
(GDestroyNotify)g_free);
 g_object_set_data_full (G_OBJECT (dialog), gcr-cert, gcr_cert, 
(GDestroyNotify)g_object_unref);
 g_signal_connect (dialog, response,
 G_CALLBACK (midori_location_action_cert_response_cb), gcr_cert);
@@ -1440,7 +1440,6 @@ midori_location_action_show_page_info (GtkWidget* widget,
 #endif
 
 g_object_unref (tls_cert);
-#endif
 }
 #endif
 
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 3c57423..c274f5a 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -721,6 +721,34 @@ midori_view_update_load_status (MidoriView*  view,
 #endif
 }
 
+gboolean
+midori_view_get_tls_info (MidoriView*   view,
+  void* request,
+  GTlsCertificate** tls_cert,
+  GTlsCertificateFlags* tls_flags,
+  gchar**   hostname)
+{
+#ifdef HAVE_WEBKIT2
+WebKitWebView* web_view = WEBKIT_WEB_VIEW (view-web_view);
+*hostname = midori_uri_parse_hostname (webkit_web_view_get_uri (web_view), 
NULL);
+return webkit_web_view_get_tls_info (web_view, tls_cert, tls_flags);
+#else
+SoupMessage* message = midori_map_get_message 
(webkit_network_request_get_message (request));
+if (message != NULL)
+{
+SoupURI* uri = soup_message_get_uri (message);
+*hostname = uri ? g_strdup (uri-host) : NULL;
+g_object_get (message, tls-certificate, tls_cert, tls-errors, 
tls_flags, NULL);
+return tls_flags == 0
+  soup_message_get_flags (message)  
SOUP_MESSAGE_CERTIFICATE_TRUSTED;
+}
+*tls_cert = NULL

[Xfce4-commits] midori:master Conditionally connect web-process-crashed

2013-04-05 Thread Christian Dywan
Updating branch refs/heads/master
 to 945a70bbf7addde3337a9f8ed32f2c7ca47c8ce4 (commit)
   from 898da5f2bb2d14e271d5b0f2ad588c577fa5ebca (commit)

commit 945a70bbf7addde3337a9f8ed32f2c7ca47c8ce4
Author: Christian Dywan christ...@twotoasts.de
Date:   Sat Apr 6 00:06:22 2013 +0200

Conditionally connect web-process-crashed

 midori/midori-view.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index c274f5a..e6fdafc 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -3845,8 +3845,6 @@ midori_view_constructor (GType  type,
 view-web_view = GTK_WIDGET (midori_tab_get_web_view (MIDORI_TAB (view)));
 g_object_connect (view-web_view,
   #ifdef HAVE_WEBKIT2
-  signal::web-process-crashed,
-  midori_view_web_view_crashed_cb, view,
   signal::load-failed,
   webkit_web_view_load_error_cb, view,
   signal::load-changed,
@@ -3928,6 +3926,9 @@ midori_view_constructor (GType  type,
 }
 
 #ifdef HAVE_WEBKIT2
+if (g_signal_lookup (web-process-crashed, WEBKIT_TYPE_WEB_VIEW))
+g_signal_connect (view-web_view, web-process-crashed,
+(GCallback)midori_view_web_view_crashed_cb, view);
 view-scrolled_window = view-web_view;
 #endif
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Unconditionally show Toolbar Style preference

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 863c8dff9042ca5d964a9c608ac5994198eeba65 (commit)
   from 5876dbfd1138b37ca2b61c8f711fcbbd4ea34e09 (commit)

commit 863c8dff9042ca5d964a9c608ac5994198eeba65
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 18:20:11 2013 +0200

Unconditionally show Toolbar Style preference

Apparently users like to tweak it for browsers despite some major
desktop environments not providing toolbar UI options.

 midori/midori-preferences.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c
index c54c25c..6415ac2 100644
--- a/midori/midori-preferences.c
+++ b/midori/midori-preferences.c
@@ -427,13 +427,10 @@ midori_preferences_set_settings (MidoriPreferences* 
preferences,
 
 /* Page Interface */
 PAGE_NEW (GTK_STOCK_CONVERT, _(Browsing));
-if (!g_getenv (DESKTOP_SESSION))
-{
 FRAME_NEW (NULL);
 INDENTED_ADD (gtk_label_new (_(Toolbar Style:)));
 button = katze_property_proxy (settings, toolbar-style, NULL);
 SPANNED_ADD (button);
-}
 FRAME_NEW (NULL);
 label = gtk_label_new (_(Open new pages in:));
 INDENTED_ADD (label);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Prevent overlay frame from being caught by show_all

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 102716cb3db86f3e6b5f469293039696ff3e24a4 (commit)
   from 863c8dff9042ca5d964a9c608ac5994198eeba65 (commit)

commit 102716cb3db86f3e6b5f469293039696ff3e24a4
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 18:25:31 2013 +0200

Prevent overlay frame from being caught by show_all

Otherwise an empty frame may show even when the statusbar is shown.

 midori/midori-view.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index a292e4c..13ef417 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -3834,6 +3834,7 @@ midori_view_constructor (GType  type,
 /* Overlays must be created before showing GtkOverlay as of GTK+ 3.2 */
 {
 GtkWidget* frame = gtk_frame_new (NULL);
+gtk_widget_set_no_show_all (frame, TRUE);
 view-overlay_label = gtk_label_new (NULL);
 gtk_widget_show (view-overlay_label);
 gtk_container_add (GTK_CONTAINER (frame), view-overlay_label);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master makedist: Don't append timestamp to archive name for release versions.

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 0d2ff336b5e552ced926ba0ef06564ba2c48c7c5 (commit)
   from 102716cb3db86f3e6b5f469293039696ff3e24a4 (commit)

commit 0d2ff336b5e552ced926ba0ef06564ba2c48c7c5
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 11:20:39 2013 +0200

makedist: Don't append timestamp to archive name for release versions.

 win32/makedist/makedist.midori |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index 38114a3..c363342 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -56,11 +56,17 @@ else
 version_tag=$version
 fi
 
-# generate unique filename
+if [ $RELEASE ==  ]; then
+ARCHIVE_FILENAME=midori-$version_tag-`date +%Y%m%d%H%M`
+else
+ARCHIVE_FILENAME=midori-$version_tag
+fi
+
+# generate archive filename
 if [ $have_7zip !=   ]; then
-ARCHIVE=midori-$version_tag-`date +%Y%m%d%H%M`.7z
+ARCHIVE=$ARCHIVE_FILENAME.7z
 else
-ARCHIVE=midori-$version_tag-`date +%Y%m%d%H%M`.zip
+ARCHIVE=$ARCHIVE_FILENAME.zip
 fi
 
 # function: dll-recursive list of exe and dll files ...
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Include gdb.exe in release builds and drop debug.bat

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to feb032138df5af9683e058bc67ca226a654979f6 (commit)
   from 0d2ff336b5e552ced926ba0ef06564ba2c48c7c5 (commit)

commit feb032138df5af9683e058bc67ca226a654979f6
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 18:30:02 2013 +0200

Include gdb.exe in release builds and drop debug.bat

 win32/makedist/makedist.midori |   19 +++
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index c363342..d20f9da 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -43,10 +43,6 @@ grep -q gtk-3.0 _build/config.log  GTK3_BUILD=1
 version=`grep PACKAGE_VERSION _build/default/config.h | awk '{ print $3 $4; }' 
| sed 's@(debug)@-debug@g'|sed 's@@@g'`
 
 if [ $1 !=  ]; then
-   if [ $1 == debug ]; then
-   DEBUG_BUILD=1
-   shift
-   fi
version_tag=$1
 fi
 
@@ -126,9 +122,11 @@ dll_recursive midori*.exe gspawn-*-helper*.exe 
libhunspell*.dll  $temp_dir/mido
 dll_recursive ../lib/gio/modules/*.dll  $temp_dir/midori.exe.lst
 dll_recursive iconv.dll  $temp_dir/midori.exe.lst
 dll_recursive ../lib/gstreamer-$GSTREAMER_API_VERSION/*.dll  
$temp_dir/midori.exe.lst
+# we ship gdb now for -g and diagnostic button
+dll_recursive gdb.exe  $temp_dir/midori.exe.lst
 
 if [ $DEBUG_BUILD !=  ]; then
-dll_recursive gdb.exe GtkLauncher.exe  $temp_dir/midori.exe.lst
+dll_recursive GtkLauncher.exe  $temp_dir/midori.exe.lst
 fi
 
 files=`ls | cat - $temp_dir/midori.exe.lst | sort | uniq -d`
@@ -209,17 +207,6 @@ if [ $DEBUG_BUILD ==  ];then
 pushd $workdir  /dev/null
 find -iname *.debug -exec rm {} \;
 popd  /dev/null
-else
-#add some gdb helper scripts
-cat  $workdir/bin/backtrace.gdb  _EOF
-set logging on debug.log
-run
-thread apply all bt
-quit
-_EOF
-
-echo 'gdb.exe --command=backtrace.gdb midori.exe'  $workdir/bin/debug.bat
-
 fi
 
 # copy locales for gtk
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master makedist: Don't try removing gtk_rc file, it will be overwritten.

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to a5442dd8557e0db8fce31e70ba64839cdd738201 (commit)
   from feb032138df5af9683e058bc67ca226a654979f6 (commit)

commit a5442dd8557e0db8fce31e70ba64839cdd738201
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 11:26:23 2013 +0200

makedist: Don't try removing gtk_rc file, it will be overwritten.

Gets rid of annoying warning if file was non-existent.
While at it adjust comment about icon theme used.

 win32/makedist/makedist.midori |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index d20f9da..c0e2b43 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -232,10 +232,8 @@ else
 fi
 
 mkdir -p $gtk_etc_dir
-rm $gtk_rc_file
 
-
-# Use small icons by default and Tango theme
+# Use small icons by default and Faenza icon theme
 if [ $GTK3_BUILD == 1 ]; then
 
 cat  $gtk_rc_file  _EOF
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master nsis: Request admin rights when installing.

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to cb3fd5be2e1cca69b598a0c21386a3e3ead8df89 (commit)
   from a5442dd8557e0db8fce31e70ba64839cdd738201 (commit)

commit cb3fd5be2e1cca69b598a0c21386a3e3ead8df89
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 14:37:37 2013 +0200

nsis: Request admin rights when installing.

 win32/makedist/midori.nsi |9 -
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/win32/makedist/midori.nsi b/win32/makedist/midori.nsi
index 4ba91de..a8d4715 100644
--- a/win32/makedist/midori.nsi
+++ b/win32/makedist/midori.nsi
@@ -15,7 +15,7 @@
 
 ; Do a Cyclic Redundancy Check to make sure the installer was not corrupted by 
the download
 CRCCheck force
-RequestExecutionLevel user ; set execution level for Windows Vista
+RequestExecutionLevel admin ; set execution level for Windows Vista
 
 ;;;
 ; helper defines  ;
@@ -523,10 +523,9 @@ Function .onInit
${if} $Answer == yes
SetShellVarContext all ; set that e.g. shortcuts will be 
created for all users
${else}
-   SetShellVarContext current
-   ; TODO is this really what we want? $PROGRAMFILES is not much 
better because
-   ; probably the unprivileged user can't write it anyways
-   StrCpy $INSTDIR $PROFILE\$(^Name)
+   MessageBox mb_iconstop Administrator rights required - use the 
portable release if that's not possible
+   SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
+   Quit
${endif}
 
; prevent running multiple instances of the installer
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master makedist: Support building nsis installer

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to e329ca3cb96665925412a56a9a119b7199f0171d (commit)
   from cb3fd5be2e1cca69b598a0c21386a3e3ead8df89 (commit)

commit e329ca3cb96665925412a56a9a119b7199f0171d
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 14:39:08 2013 +0200

makedist: Support building nsis installer

 win32/makedist/makedist.midori |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index c0e2b43..1022db0 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -65,6 +65,12 @@ else
 ARCHIVE=$ARCHIVE_FILENAME.zip
 fi
 
+if [ NSIS !=  ];then
+where_am_i=$PWD
+cp -a $where_am_i/win32/makedist/midori.nsi $temp_dir
+cp -a $where_am_i/win32/makedist/midori.ico $temp_dir
+fi
+
 # function: dll-recursive list of exe and dll files ...
 #
 # recursively search all dll dependencies of the input files.
@@ -275,6 +281,13 @@ if [ $have_7zip !=  ]; then
 else
 zip -rq $ARCHIVE midori-$version_tag
 fi
+
+if [ $NSIS !=  ];then
+nsis_file=Midori-${version}_setup.exe
+echo Creating $nsis_file
+makensis -NOCD -V2 ./midori.nsi
+mv $nsis_file $where_am_i
+fi
 popd  /dev/null
 
 echo * Cleaning up...
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master makedist: Compute sha1 checksum for generated files.

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 1ea0faf59fcc3907b2c1fb4ef785e41fd32371b1 (commit)
   from e329ca3cb96665925412a56a9a119b7199f0171d (commit)

commit 1ea0faf59fcc3907b2c1fb4ef785e41fd32371b1
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 19:10:32 2013 +0200

makedist: Compute sha1 checksum for generated files.

 win32/makedist/makedist.midori |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index 1022db0..dea247d 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -294,3 +294,15 @@ echo * Cleaning up...
 
 # remove working directory
 rm -r $temp_dir
+
+
+echo * Computing checksums...
+
+sum_file=midori-$version.sha1
+sha1sum $ARCHIVE  $sum_file
+
+if [ $NSIS !=  ]; then
+sha1sum $nsis_file  $sum_file
+fi
+
+cat $sum_file
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Store --execute arguments in string array

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 00bb2bcedb3fccd78d9744e8582fff0de9f95886 (commit)
   from 1ea0faf59fcc3907b2c1fb4ef785e41fd32371b1 (commit)

commit 00bb2bcedb3fccd78d9744e8582fff0de9f95886
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 19:35:27 2013 +0200

Store --execute arguments in string array

To allow passing any number of --execute and URLs at once.

 midori/main.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 4dcfcab..9be9d4d 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -78,7 +78,7 @@ main (intargc,
 gboolean debug = FALSE;
 gboolean run;
 gchar* snapshot;
-gboolean execute;
+gchar** execute;
 gboolean help_execute;
 gboolean version;
 gchar** uris;
@@ -106,7 +106,7 @@ main (intargc,
N_(Run the specified filename as javascript), NULL },
{ snapshot, 's', 0, G_OPTION_ARG_STRING, snapshot,
N_(Take a snapshot of the specified URI), NULL },
-   { execute, 'e', 0, G_OPTION_ARG_NONE, execute,
+   { execute, 'e', 0, G_OPTION_ARG_STRING_ARRAY, execute,
N_(Execute the specified command), NULL },
{ help-execute, 0, 0, G_OPTION_ARG_NONE, help_execute,
N_(List available commands to execute with -e/ --execute), NULL },
@@ -132,7 +132,7 @@ main (intargc,
 plain = FALSE;
 run = FALSE;
 snapshot = NULL;
-execute = FALSE;
+execute = NULL;
 help_execute = FALSE;
 version = FALSE;
 uris = NULL;
@@ -374,7 +374,7 @@ main (intargc,
 if (private)
 {
 MidoriBrowser* browser = midori_private_app_new (config, webapp,
-execute ? NULL : uris, execute ? uris : NULL, inactivity_reset, 
block_uris);
+uris, execute, inactivity_reset, block_uris);
 g_signal_connect (browser, destroy, G_CALLBACK (gtk_main_quit), 
NULL);
 g_signal_connect (browser, quit, G_CALLBACK (gtk_main_quit), NULL);
 gtk_main ();
@@ -384,7 +384,7 @@ main (intargc,
 if (webapp)
 {
 MidoriBrowser* browser = midori_web_app_new (config, webapp,
-execute ? NULL : uris, execute ? uris : NULL, inactivity_reset, 
block_uris);
+uris, execute, inactivity_reset, block_uris);
 g_signal_connect (browser, destroy, G_CALLBACK (gtk_main_quit), 
NULL);
 g_signal_connect (browser, quit, G_CALLBACK (gtk_main_quit), NULL);
 gtk_main ();
@@ -393,7 +393,7 @@ main (intargc,
 
 MidoriApp* app = midori_normal_app_new (config,
 portable ? portable : normal, diagnostic_dialog, webapp,
-execute ? NULL : uris, execute ? uris : NULL, inactivity_reset, 
block_uris);
+uris, execute, inactivity_reset, block_uris);
 if (app == NULL)
 return 0;
 if (app == (void*)0xdeadbeef)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master makedist: Don't include version_tag in archive main folder name.

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 7bb735edc8f53b2bad82b1ad4d259ab46d1b3c21 (commit)
   from 00bb2bcedb3fccd78d9744e8582fff0de9f95886 (commit)

commit 7bb735edc8f53b2bad82b1ad4d259ab46d1b3c21
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 19:29:27 2013 +0200

makedist: Don't include version_tag in archive main folder name.

 win32/makedist/makedist.midori |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/win32/makedist/makedist.midori b/win32/makedist/makedist.midori
index dea247d..0dd4129 100755
--- a/win32/makedist/makedist.midori
+++ b/win32/makedist/makedist.midori
@@ -47,7 +47,7 @@ if [ $1 !=  ]; then
 fi
 
 if [ $version_tag !=  ]; then
-version_tag=$version_tag-$version
+version_tag=$version-$version_tag
 else
 version_tag=$version
 fi
@@ -117,7 +117,7 @@ grab_files ()
 echo Creating $ARCHIVE
 
 # create destination folder
-workdir=$temp_dir/midori-$version_tag
+workdir=$temp_dir/midori-$version
 mkdir $workdir
 
 echo * Generating dll list...
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Add xvfb-based automated screenshot tool

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 9c89becb0d42254563067c18a74702aacbf1876d (commit)
   from 7bb735edc8f53b2bad82b1ad4d259ab46d1b3c21 (commit)

commit 9c89becb0d42254563067c18a74702aacbf1876d
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 21:10:10 2013 +0200

Add xvfb-based automated screenshot tool

 tools/screenshot |   83 ++
 1 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/tools/screenshot b/tools/screenshot
new file mode 100755
index 000..110b923
--- /dev/null
+++ b/tools/screenshot
@@ -0,0 +1,83 @@
+#! /bin/sh
+# Copyright (C) 2013 Christian Dywan christ...@twotoasts.de
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# See the file COPYING for the full license text.
+
+xvfbonce() {
+xvfb-run --server-args='-fbdir /tmp -screen 0 1024x768x16' \
+env LANGUAGE= UBUNTU_MENUPROXY= MOZ_PLUGIN_PATH=/ SCREENCHILD=42 $0 $1 
$2 21 | grep -v RANDR
+}
+
+if test $SCREENCHILD = 42; then
+(xfwm4 || metacity) 21 | grep -v XRandr | grep -v 'Fatal IO error' 
+sleep 2; kill -0 $! || exit $?
+if test $1 = midori; then
+echo Processing case $2
+CFG=/tmp/midori-scrn/$2
+PNG=$CFG.png
+test -d $CFG  rm -R $CFG; mkdir -p $CFG
+mkdir -p $CFG/midori
+mkdir -p $CFG/gtk-3.0
+echo '[Settings]'  $CFG/gtk-3.0/settings.ini
+test -n $GTK_THEME  echo gtk-theme-name=$GTK_THEME  
$CFG/gtk-3.0/settings.ini
+test -n $ICON_THEME  echo gtk-icon-theme-name=$ICON_THEME  
$CFG/gtk-3.0/settings.ini
+export XDG_CONFIG_HOME; XDG_CONFIG_HOME=$CFG
+echo '[settings]'  $CFG/midori/config
+echo 'last-window-state=MIDORI_WINDOW_MAXIMIZED'  $CFG/midori/config
+EXE=-e toolbar-style=MIDORI_TOOLBAR_ICONS
+URLS=http://.invalid about:version http://en.wikipedia.org/wiki/Cat;
+if test $2 = 1; then
+EXE=$EXE -e BookmarkAdd
+elif test $2 = 2; then
+EXE=$EXE $URLS -e Panel -e libtab-panel.so=true
+echo 'last-panel-page=3'  $CFG/config
+elif test $2 = 3; then
+EXE=$EXE -e Preferences
+elif test $2 = 4; then
+EXE=$EXE -e ClearPrivateData
+elif test $2 = 5; then
+EXE=$EXE -e Find
+elif test $2 = 6; then
+EXE=$EXE -e ManageSearchEngines
+fi
+_build/default/midori/midori $EXE 21 \
+| grep -v 'Theme parsing error' \
+| grep -E -v '\[[0-9]{3}:[0-9]{3}\]' \
+| grep -v 'Fatal IO error' \
+| uniq 
+elif test $1 = custom; then
+if test $2 = ; then
+echo 'Argument required'
+exit 1
+fi
+PNG=/tmp/screenshot-custom.png
+$2 
+else
+echo Unknown scenario $2
+exit 1
+fi
+sleep 2; kill -0 $! || exit $?
+sleep 14
+# test ! -f /tmp/Xvfb_screen0  echo Xvfb produced no memory image  
exit 1
+# convert /tmp/Xvfb_screen0 $PNG
+WINDOW=$(xprop -root | grep --color=never '_NET_ACTIVE_WINDOW(WINDOW)' | 
sed 's@_NET_ACTIVE_WINDOW(WINDOW): window id # @@g')
+import -frame -window $WINDOW $PNG || exit 1
+echo Screenshot $PNG saved
+exit 0
+elif test $1 = midori; then
+for i in 1 2 3 4 5 6; do
+xvfbonce $1 $i
+done
+elif test $1 = custom; then
+xvfbonce $1 $2
+else
+echo Usage:
+echo   $0 midori
+echo   $0 custom 'commandline --with -a rguments'
+fi
+
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Add helper script for building and uploading win32 releases

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to a7738f8cf3f0b8a6a7aea022a355c3727dfdd99e (commit)
   from 9c89becb0d42254563067c18a74702aacbf1876d (commit)

commit a7738f8cf3f0b8a6a7aea022a355c3727dfdd99e
Author: Paweł Forysiuk tuxa...@o2.pl
Date:   Thu Apr 4 21:01:43 2013 +0200

Add helper script for building and uploading win32 releases

 win32/makedist/win32-release |   59 ++
 1 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/win32/makedist/win32-release b/win32/makedist/win32-release
new file mode 100755
index 000..375f4b6
--- /dev/null
+++ b/win32/makedist/win32-release
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Copyright (C) 2013 Paweł Forysiuk tuxa...@o2.pl
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# See the file COPYING for the full license text.
+
+
+version=$(git describe --abbrev=0)
+dropbox_dir=$HOME/Dropbox/Public
+
+# 32-bit build
+#mingw32-env
+export MINGW_PREFIX=/usr/i686-w64-mingw32/sys-root/mingw
+eval `rpm --eval %{mingw32_env}`
+
+./configure --prefix=$MINGW_PREFIX --enable-gtk3
+make clean
+make install
+
+rpmquery -qa mingw32*  midori-${version}-deps-i686.txt
+rm -f midori-$version.sha1
+
+MINGW_PREFIX=${MINGW_PREFIX} RELEASE=1 NSIS=1 ./win32/makedist/makedist.midori
+mv -v midori-${version}.7z $dropbox_dir
+mv -v Midori-${version}_setup.exe $dropbox_dir
+
+dropbox puburl $dropbox_dir/midori-${version}.7z   release_links.txt
+dropbox puburl $dropbox_dir/Midori-${version}_setup.exe  release_links.txt
+
+if [ $NO_64BIT !=  ]; then
+# 64-bit build
+#mingw64-env
+export MINGW_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw
+eval `rpm --eval %{mingw64_env}`
+
+./configure --prefix=$MINGW_PREFIX --enable-gtk3
+make clean
+make install
+
+rpmquery -qa mingw64*  midori-${version}-deps-x86_64.txt
+MINGW_PREFIX=${MINGW_PREFIX} RELEASE=1 sh ./win32/makedist/makedist.midori 
x86_64-portable
+mv -v midori-${version}-x86_64-portable.7z $dropbox_dir
+dropbox puburl $dropbox_dir/midori-${version}-x86_64-portable.7z  
release_links.txt
+fi
+
+echo
+echo =
+echo Midori win32 release details:
+echo Download links:
+cat release_links.txt
+echo Checksums:
+cat midori-$version.sha1
+echo =
+echo
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Bump version to 0.5.0

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 901d547c40cc16d752765c475a0f55da20e2352f (commit)
   from a7738f8cf3f0b8a6a7aea022a355c3727dfdd99e (commit)

commit 901d547c40cc16d752765c475a0f55da20e2352f
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 22:31:20 2013 +0200

Bump version to 0.5.0

 ChangeLog |   42 ++
 data/faq.html |   45 +
 win32/makedist/midori.nsi |2 +-
 wscript   |2 +-
 4 files changed, 69 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4c34985..ccfb036 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,47 @@
 This file is licensed under the terms of the expat license, see the file EXPAT.
 
+v0.5.0:
+ Store --execute arguments in string array
+ Prevent overlay frame from being caught by show_all
+ Unconditionally show Toolbar Style preference
+ Duplicate current URI when reloading Midori.View
+ Update tabs being closable on setting change in Granite
+ Check default_search before setting SearchAction default
+ Populate application chooser button in idle
+ Bail out of completion resizing if cell height is 0
+ Pass proxy to bookmark dialog when editing via menu
+ Tweak bookmark dialog, button to buttons, toggles side by side
+ Move 'Flash windows' option into History List
+ Use light window for Clear Private Data with Granite
+ Use GtkFontButton with filter func with GTK+ 3.2
+ Implement 'Run in debugger' button in diagnostic dialog
+ Add Win32 work-around to History List for modifiers
+ Make toolbar drag/ drop work in GTK+3
+ Check if active form element is input before getting search text
+ Implement direction-based mouse gesture configuration
+ Implement mouse movement, load-failed, crashed, search in WebKit2
+ Add 'Show last crash log' button to diagnostic dialog
+ Make invalid actions fail; exit on error in new process only
+ Accept setting=value and extension=true/ false in --execute
+ Merged cookie permissions as of 2013-03-08
+ Gray out webGL preference if context is unavailable
+ Use browser API to Close Other in view menu item
+ Fix periods to ellipsis in Custom/ Customize Shortcuts
+ Support Colorful Tabs in History List
+ Add Midori.Tab.fg/ bg_color and Midori.View.set_colors
+ Fix word-wrap, #decription and #message in about.css
+ Set view scroll policy to Never to avoid flickering
+ Use XDG_RUNTIME_DIR for temporary files
+ Build Vala and C parts of core separately
+ Don't provide default value for enable-scripts
+ Respect Open new pages: window for Web Search and Open Image
+ enable-javascript in WebKit1/ 2, macro for (Web)Settings
+ Fix MIDORI_*_VERSION to be integers
+ Fix .desktop file validation unit test and fix errors
+ 'New tab behavior' preference: about:dial/ new/ search/ home alias URLs
+ Use stripped down XBEL variant for session and trash
+ Allow any proxies supported by libproxy; list supported types in preferences
+
 v0.4.9:
  Let non-Granite security window behave like a window
  Disable Contractor support in Granite for now
diff --git a/data/faq.html b/data/faq.html
index 4254966..5335436 100644
--- a/data/faq.html
+++ b/data/faq.html
@@ -5,7 +5,7 @@
   titlemidori:faq/title
 meta name=generator content=DokuWiki/
 meta name=robots content=index,follow/
-meta name=date content=2013-02-14T01:16:17+0100/
+meta name=date content=2013-03-23T11:08:29+0100/
 meta name=keywords content=midori,faq/
 link rel=search type=application/opensearchdescription+xml 
href=/lib/exe/opensearch.php title=Xfce Wiki/
 link rel=start href=//
@@ -240,7 +240,7 @@ Midori gt;= 0.4.7 automatically picks up the 
Strict-Transport-Security header a
 div class=level4
 
 p
-Midori gt;= 0.4.7 supports a href=/midori/gcr class=wikilink2 
title=midori:gcr rel=nofollowhttp://git.gnome.org/browse/gcr/tree/gcr/a 
for certificate display and management, you can click the lock in the urlbar to 
see detailed information. Earlier versions, or one without gcr will not handle 
certificates beyond the lock icon in the urlbar.
+Midori gt;= 0.4.7 supports a href=http://git.gnome.org/browse/gcr/tree/gcr; 
class=urlextern title=http://git.gnome.org/browse/gcr/tree/gcr;  
rel=nofollowgcr/a for certificate display and management, you can click 
the lock in the urlbar to see detailed information. Earlier versions, or one 
without gcr will not handle certificates beyond the lock icon in the urlbar.
 /p
 
 /div
@@ -299,9 +299,10 @@ You can either run that above line and run Midori in the 
same terminal afterward
 div class=level4
 
 p
-nspluginwrapper is a program that runs Flash and other Netscape plugins in a 
separate process. So a crash can#039;t cresh the whole browser and Flash, 
which is GTK+2 can run in GTK+3.
+nspluginwrapper is a program that runs Flash and other Netscape plugins in a 
separate process. So a crash can#039;t crash the whole browser and Flash, 
which is GTK+2 can run in GTK+3.
 /p
-pre class=code bashspan

[Xfce4-commits] midori|0.5.0 Creating annotated tag 0.5.0

2013-04-04 Thread Christian Dywan
Updating annotated tag refs/tags/0.5.0
 as new annotated tag
 to ef90e0e8e53b49246b7e8224a1a5b5cb29d00ce8 (tag)
   succeeds 0.4.9-174-ga7738f8
  tagged by Christian Dywan christ...@twotoasts.de
 on 2013-04-04 22:31 +0200

Christian Dywan (1):
  Bump version to 0.5.0

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Abstract view-source for WebKit1/ 2 in Midori.Tab

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to f8d82b437b0b2cd0ee0cb62d473940f9c340ce70 (commit)
   from 901d547c40cc16d752765c475a0f55da20e2352f (commit)

commit f8d82b437b0b2cd0ee0cb62d473940f9c340ce70
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:23:44 2013 +0200

Abstract view-source for WebKit1/ 2 in Midori.Tab

 extensions/addons.c|3 +--
 midori/midori-browser.c|4 +---
 midori/midori-tab.vala |   28 +---
 midori/midori-view.c   |4 +---
 midori/webkit2gtk-3.0.vapi |6 ++
 tests/tab.vala |   15 +++
 6 files changed, 33 insertions(+), 27 deletions(-)

diff --git a/extensions/addons.c b/extensions/addons.c
index 1ce19c4..e157840 100644
--- a/extensions/addons.c
+++ b/extensions/addons.c
@@ -243,9 +243,8 @@ addons_notify_load_status_cb (MidoriView*  view,
   MidoriExtension* extension)
 {
 const gchar* uri = midori_view_get_display_uri (view);
-WebKitWebView* web_view = WEBKIT_WEB_VIEW (midori_view_get_web_view 
(view));
 
-if (webkit_web_view_get_view_source_mode (web_view))
+if (midori_tab_get_view_source (MIDORI_TAB (view)))
 return;
 
 if (uri  *uri)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index a997f7f..3ceb8e3 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3505,9 +3505,7 @@ _action_source_view_activate (GtkAction* action,
 
 source = midori_view_new_with_item (NULL, browser-settings);
 source_view = midori_view_get_web_view (MIDORI_VIEW (source));
-#ifndef HAVE_WEBKIT2
-webkit_web_view_set_view_source_mode (WEBKIT_WEB_VIEW (source_view), 
TRUE);
-#endif
+midori_tab_set_view_source (MIDORI_TAB (source_view), TRUE);
 webkit_web_view_load_uri (WEBKIT_WEB_VIEW (source_view), source_uri);
 midori_browser_add_tab (browser, source);
 }
diff --git a/midori/midori-tab.vala b/midori/midori-tab.vala
index fd300e8..94a24ec 100644
--- a/midori/midori-tab.vala
+++ b/midori/midori-tab.vala
@@ -136,9 +136,26 @@ namespace Midori {
 #endif
 }
 
+#if HAVE_WEBKIT2
+public bool view_source { get {
+return web_view.view_mode == WebKit.ViewMode.SOURCE;
+}
+set {
+web_view.view_mode = value ? WebKit.ViewMode.SOURCE : 
WebKit.ViewMode.WEB;
+}
+}
+#else
+public bool view_source { get {
+return web_view.get_view_source_mode ();
+}
+set {
+web_view.set_view_source_mode (value);
+}
+}
+#endif
+
 public bool can_view_source () {
-#if !HAVE_WEBKIT2
-if (is_blank () || special || web_view.get_view_source_mode ())
+if (is_blank () || special || view_source)
 return false;
 string content_type = ContentType.from_mime_type (mime_type);
 #if HAVE_WIN32
@@ -148,9 +165,6 @@ namespace Midori {
 string text_type = ContentType.from_mime_type (text/plain);
 #endif
 return ContentType.is_a (content_type, text_type);
-#else
-return true;
-#endif
 }
 
 public static string get_display_title (string? title, string uri) {
@@ -191,11 +205,11 @@ namespace Midori {
 
 /* Since: 0.4.3 */
 public bool can_save () {
-#if !HAVE_WEBKIT2
 if (is_blank () || special)
 return false;
-if (web_view.get_view_source_mode ())
+if (view_source)
 return false;
+#if !HAVE_WEBKIT2
 if (web_view.get_main_frame ().get_data_source ().get_data () == 
null)
 return false;
 #endif
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 13ef417..7350023 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -4337,9 +4337,7 @@ midori_view_set_uri (MidoriView*  view,
 midori_tab_set_uri (MIDORI_TAB (view), uri);
 katze_item_set_uri (view-item, midori_tab_get_uri (MIDORI_TAB 
(view)));
 katze_assign (view-title, NULL);
-#ifndef HAVE_WEBKIT2
-webkit_web_view_set_view_source_mode (WEBKIT_WEB_VIEW 
(view-web_view), FALSE);
-#endif
+midori_tab_set_view_source (MIDORI_TAB (view), FALSE);
 webkit_web_view_load_uri (WEBKIT_WEB_VIEW (view-web_view), uri);
 }
 g_free (temporary_uri);
diff --git a/midori/webkit2gtk-3.0.vapi b/midori/webkit2gtk-3.0.vapi
index 34766bd..0279812 100644
--- a/midori/webkit2gtk-3.0.vapi
+++ b/midori/webkit2gtk-3.0.vapi
@@ -464,6 +464,11 @@ namespace WebKit {
public signal void received_data (uint64 data_length);
public signal void sent_request (WebKit.URIRequest request, 
WebKit.URIResponse redirected_response);
}
+   [CCode (cheader_filename = webkit2/webkit2.h, cprefix = 
WEBKIT_VIEW_MODE_)]
+   public enum ViewMode {
+   WEB,
+   SOURCE

[Xfce4-commits] midori:master Implement plugin listing for WebKit2 and abstract skip_plugin

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 0c0549f9efe0f00e3b3537b7a091ee36afeabf5a (commit)
   from f8d82b437b0b2cd0ee0cb62d473940f9c340ce70 (commit)

commit 0c0549f9efe0f00e3b3537b7a091ee36afeabf5a
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:31:07 2013 +0200

Implement plugin listing for WebKit2 and abstract skip_plugin

 extensions/nsplugin-manager.vala |2 +-
 midori/midori-view.c |   42 -
 midori/midori-websettings.c  |   13 +++
 midori/midori-websettings.h  |3 ++
 midori/midori.vapi   |1 +
 5 files changed, 50 insertions(+), 11 deletions(-)

diff --git a/extensions/nsplugin-manager.vala b/extensions/nsplugin-manager.vala
index 2d769f0..adebb77 100644
--- a/extensions/nsplugin-manager.vala
+++ b/extensions/nsplugin-manager.vala
@@ -65,7 +65,7 @@ public Katze.Array? extension_init () {
 SListWebKit.WebPlugin plugins = pdb.get_plugins ();
 
 foreach (WebKit.WebPlugin plugin in plugins) {
-if (plugin.get_path () == null || npwrapper. in plugin.get_path () 
|| plugins-wrapped in plugin.get_path())
+if (Midori.WebSettings.skip_plugin (plugin.get_path ()))
 continue;
 extensions.add_item (new NSPlugins.Extension (plugin));
 }
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 7350023..a9ac753 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -3919,12 +3919,23 @@ midori_view_list_versions (GString* markup,
 ));
 }
 
+#ifdef HAVE_WEBKIT2
+static void
+midori_view_get_plugins_cb (GObject*  object,
+GAsyncResult* result,
+MidoriView*   view)
+{
+GList* plugins = webkit_web_context_get_plugins_finish (WEBKIT_WEB_CONTEXT 
(object), result, NULL);
+g_object_set_data (object, nsplugins, plugins);
+midori_view_reload (view, FALSE);
+}
+#endif
+
 void
 midori_view_list_plugins (MidoriView* view,
   GString*ns_plugins,
   gbooleanhtml)
 {
-#ifndef HAVE_WEBKIT2
 if (!midori_web_settings_has_plugin_support ())
 return;
 
@@ -3933,14 +3944,29 @@ midori_view_list_plugins (MidoriView* view,
 else
 g_string_append_c (ns_plugins, '\n');
 
-#if WEBKIT_CHECK_VERSION (1, 3, 8)
+#ifdef HAVE_WEBKIT2
+WebKitWebContext* context = webkit_web_context_get_default ();
+GList* plugins = g_object_get_data (G_OBJECT (context), nsplugins);
+if (plugins == NULL)
+{
+midori_view_add_version (ns_plugins, html, g_strdup (…));
+webkit_web_context_get_plugins (context, NULL, 
(GAsyncReadyCallback)midori_view_get_plugins_cb, view);
+}
+else
+for (; plugins != NULL; plugins = g_list_next (plugins))
+{
+if (!midori_web_settings_skip_plugin (webkit_plugin_get_path 
(plugins-data)))
+midori_view_add_version (ns_plugins, html, g_strdup_printf 
(%s\t%s,
+webkit_plugin_get_name (plugins-data),
+html ? webkit_plugin_get_description (plugins-data) : 
));
+}
+#elif WEBKIT_CHECK_VERSION (1, 3, 8)
 WebKitWebPluginDatabase* pdb = webkit_get_web_plugin_database ();
 GSList* plugins = webkit_web_plugin_database_get_plugins (pdb);
 GSList* plugin = plugins;
 for (; plugin != NULL; plugin = g_slist_next (plugin))
 {
-const gchar* path = webkit_web_plugin_get_path (plugin-data);
-if (!path || strstr (path, npwrapper.) || strstr (path, 
plugins-wrapped))
+if (midori_web_settings_skip_plugin (webkit_web_plugin_get_path 
(plugin-data)))
 continue;
 midori_view_add_version (ns_plugins, html, g_strdup_printf (%s\t%s,
 webkit_web_plugin_get_name (plugin-data),
@@ -3965,9 +3991,8 @@ midori_view_list_plugins (MidoriView* view,
 while (items[i] != NULL)
 {
 gchar** parts = g_strsplit (items[i], |, 2);
-if (parts[0]
-  !strstr (parts[1], npwrapper.)  !strstr (parts[1], 
plugins-wrapped)
-  !g_str_equal (parts[1], undefined))
+if (parts[0]  !g_str_equal (parts[1], undefined)
+  !midori_web_settings_skip_plugin (parts[1]))
 midori_view_add_version (ns_plugins, html, g_strdup_printf 
(%s\t%s,
 parts[1], html ? parts[0] : ));
 g_strfreev (parts);
@@ -3979,9 +4004,6 @@ midori_view_list_plugins (MidoriView* view,
 g_strfreev (items);
 g_free (value);
 #endif
-#else
-return;
-#endif
 }
 
 static void
diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index 7f7385a..7bc820a 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -625,6 +625,19 @@ midori_web_settings_has_plugin_support (void)
 }
 
 /**
+ * midori_web_settings_skip_plugin:
+ *
+ * Returns: %TRUE if the passed plugin shouldn't be shown in UI

[Xfce4-commits] midori:master Use default-charset in both WebKit 1/ 2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 431e1b48022d7bc6e1c687ae0ff33a40ec5ca074 (commit)
   from 0c0549f9efe0f00e3b3537b7a091ee36afeabf5a (commit)

commit 431e1b48022d7bc6e1c687ae0ff33a40ec5ca074
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:34:29 2013 +0200

Use default-charset in both WebKit 1/ 2

 midori/midori-browser.c |   55 +--
 midori/midori-preferences.c |2 +-
 midori/midori-settings.vala |6 
 midori/midori-websettings.c |   20 
 4 files changed, 44 insertions(+), 39 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 3ceb8e3..30e814f 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3453,34 +3453,33 @@ _action_view_encoding_activate (GtkAction* action,
 MidoriBrowser* browser)
 {
 GtkWidget* view = midori_browser_get_current_tab (browser);
-const gchar* name;
-GtkWidget* web_view;
+const gchar* name = gtk_action_get_name (current);
+WebKitWebView* web_view = WEBKIT_WEB_VIEW (midori_view_get_web_view 
(MIDORI_VIEW (view)));
 
-name = gtk_action_get_name (current);
-web_view = midori_view_get_web_view (MIDORI_VIEW (view));
-if (!strcmp (name, EncodingAutomatic))
-g_object_set (web_view, custom-encoding, NULL, NULL);
-else
-{
-const gchar* encoding;
-if (!strcmp (name, EncodingChinese))
-encoding = BIG5;
-else if (!strcmp (name, EncodingChineseSimplified))
-encoding = GB18030;
-else if (!strcmp (name, EncodingJapanese))
-encoding = SHIFT_JIS;
-else if (!strcmp (name, EncodingKorean))
-encoding = EUC-KR;
-else if (!strcmp (name, EncodingRussian))
-encoding = KOI8-R;
-else if (!strcmp (name, EncodingUnicode))
-encoding = UTF-8;
-else if (!strcmp (name, EncodingWestern))
-encoding = ISO-8859-1;
-else
-g_assert_not_reached ();
-g_object_set (web_view, custom-encoding, encoding, NULL);
-}
+const gchar* encoding;
+if (!strcmp (name, EncodingAutomatic))
+encoding = NULL;
+else if (!strcmp (name, EncodingChinese))
+encoding = BIG5;
+else if (!strcmp (name, EncodingChineseSimplified))
+encoding = GB18030;
+else if (!strcmp (name, EncodingJapanese))
+encoding = SHIFT_JIS;
+else if (!strcmp (name, EncodingKorean))
+encoding = EUC-KR;
+else if (!strcmp (name, EncodingRussian))
+encoding = KOI8-R;
+else if (!strcmp (name, EncodingUnicode))
+encoding = UTF-8;
+else if (!strcmp (name, EncodingWestern))
+encoding = ISO-8859-1;
+else
+g_assert_not_reached ();
+#ifdef HAVE_WEBKIT2
+webkit_web_view_set_custom_charset (web_view, encoding);
+#else
+webkit_web_view_set_custom_encoding (web_view, encoding);
+#endif
 }
 
 static void
diff --git a/midori/midori-preferences.c b/midori/midori-preferences.c
index 6415ac2..0e30835 100644
--- a/midori/midori-preferences.c
+++ b/midori/midori-preferences.c
@@ -355,7 +355,7 @@ midori_preferences_set_settings (MidoriPreferences* 
preferences,
 label = gtk_label_new (_(Preferred Encoding));
 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
 INDENTED_ADD (label);
-button = katze_property_proxy (settings, preferred-encoding, 
custom-default-encoding);
+button = katze_property_proxy (settings, preferred-encoding, 
custom-default-charset);
 SPANNED_ADD (button);
 
 /* Page Behavior */
diff --git a/midori/midori-settings.vala b/midori/midori-settings.vala
index 018d0e7..32e379d 100644
--- a/midori/midori-settings.vala
+++ b/midori/midori-settings.vala
@@ -27,6 +27,12 @@ namespace Midori {
 } set {
 enable_scripts = value;
 } }
+/* Since: 0.5.1 */
+public string default_charset { owned get {
+return default_encoding;
+} set {
+default_encoding = value;
+} }
 #else
 public class Settings : WebKit.Settings {
 #endif
diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index 7bc820a..bcc3c62 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -532,7 +532,7 @@ notify_default_encoding_cb (GObject*object,
 
 web_settings = MIDORI_WEB_SETTINGS (object);
 
-g_object_get (object, default-encoding, string, NULL);
+g_object_get (object, pspec-name, string, NULL);
 encoding = string ? string : ;
 if (!strcmp (encoding, BIG5))
 web_settings-preferred_encoding = MIDORI_ENCODING_CHINESE;
@@ -581,7 +581,7 @@ midori_web_settings_init (MidoriWebSettings* web_settings)
  * { -webkit-appearance: none !important });
 #endif
 
-g_signal_connect

[Xfce4-commits] midori:master Implement URI prefetching for WebKit2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 489c3d951c41a12354c234c7b241d7a640dccc0d (commit)
   from 431e1b48022d7bc6e1c687ae0ff33a40ec5ca074 (commit)

commit 489c3d951c41a12354c234c7b241d7a640dccc0d
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:42:04 2013 +0200

Implement URI prefetching for WebKit2

 midori/sokoke.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/midori/sokoke.c b/midori/sokoke.c
index bcc3c24..04940b3 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -977,6 +977,10 @@ sokoke_prefetch_uri (MidoriWebSettings*  settings,
 return FALSE;
 }
 
+#ifdef HAVE_WEBKIT2
+WebKitWebContext* context = webkit_web_context_get_default ();
+webkit_web_context_prefetch_dns (context, hostname);
+#else
 if (!hosts ||
 !g_regex_match_simple (hostname, hosts,
G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY))
@@ -997,15 +1001,11 @@ sokoke_prefetch_uri (MidoriWebSettings*  settings,
 new_hosts = g_strdup_printf (%s|%s, hosts, hostname);
 katze_assign (hosts, new_hosts);
 }
-#ifndef HAVE_WEBKIT2
 else if (callback)
 callback (NULL, SOUP_STATUS_OK, user_data);
+#endif
 g_free (hostname);
 return TRUE;
-#else
-g_free (hostname);
-return FALSE;
-#endif
 }
 
 /**
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement Back and Forward actions in WebKit2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to c32b685289661ae1b83355c566120e8bd3437240 (commit)
   from 489c3d951c41a12354c234c7b241d7a640dccc0d (commit)

commit c32b685289661ae1b83355c566120e8bd3437240
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:47:37 2013 +0200

Implement Back and Forward actions in WebKit2

 midori/midori-browser.c |   43 ---
 1 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 30e814f..33a147b 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3601,14 +3601,11 @@ static void
 _action_scroll_somewhere_activate (GtkAction* action,
MidoriBrowser* browser)
 {
-GtkWidget* view;
-WebKitWebView* web_view;
-const gchar* name;
-
-view = midori_browser_get_current_tab (browser);
-web_view = WEBKIT_WEB_VIEW (midori_view_get_web_view (MIDORI_VIEW (view)));
-name = gtk_action_get_name (action);
 #ifndef HAVE_WEBKIT2
+GtkWidget* view = midori_browser_get_current_tab (browser);
+WebKitWebView* web_view = WEBKIT_WEB_VIEW (midori_view_get_web_view 
(MIDORI_VIEW (view)));
+const gchar* name = gtk_action_get_name (action);
+
 if (g_str_equal (name, ScrollLeft))
 webkit_web_view_move_cursor (web_view, GTK_MOVEMENT_VISUAL_POSITIONS, 
-1);
 else if (g_str_equal (name, ScrollDown))
@@ -3670,7 +3667,6 @@ static gboolean
 _action_navigation_activate (GtkAction* action,
  MidoriBrowser* browser)
 {
-#ifndef HAVE_WEBKIT2
 MidoriView* view;
 GtkWidget* tab;
 gchar* uri;
@@ -3701,11 +3697,16 @@ _action_navigation_activate (GtkAction* action,
 {
 if (middle_click)
 {
-GtkWidget* web_view = midori_view_get_web_view (view);
-WebKitWebBackForwardList* back_forward_list =
-webkit_web_view_get_back_forward_list (WEBKIT_WEB_VIEW 
(web_view));
-WebKitWebHistoryItem* back_item = 
webkit_web_back_forward_list_get_back_item (back_forward_list);
-const gchar* back_uri = webkit_web_history_item_get_uri 
(back_item);
+WebKitWebView* web_view = WEBKIT_WEB_VIEW 
(midori_view_get_web_view (view));
+#ifdef HAVE_WEBKIT2
+WebKitBackForwardList* list = 
webkit_web_view_get_back_forward_list (web_view);
+WebKitBackForwardListItem* item = 
webkit_back_forward_list_get_back_item (list);
+const gchar* back_uri = webkit_back_forward_list_item_get_uri 
(item);
+#else
+WebKitWebBackForwardList* list = 
webkit_web_view_get_back_forward_list (web_view);
+WebKitWebHistoryItem* item = 
webkit_web_back_forward_list_get_forward_item (list);
+const gchar* back_uri = webkit_web_history_item_get_uri (item);
+#endif
 GtkWidget* view = midori_browser_add_uri (browser, back_uri);
 midori_browser_set_current_tab_smartly (browser, view);
 }
@@ -3718,11 +3719,16 @@ _action_navigation_activate (GtkAction* action,
 {
 if (middle_click)
 {
-GtkWidget* web_view = midori_view_get_web_view (view);
-WebKitWebBackForwardList* back_forward_list =
-webkit_web_view_get_back_forward_list (WEBKIT_WEB_VIEW 
(web_view));
-WebKitWebHistoryItem* forward_item = 
webkit_web_back_forward_list_get_forward_item (back_forward_list);
-const gchar* forward_uri = webkit_web_history_item_get_uri 
(forward_item);
+WebKitWebView* web_view = WEBKIT_WEB_VIEW 
(midori_view_get_web_view (view));
+#ifdef HAVE_WEBKIT2
+WebKitBackForwardList* list = 
webkit_web_view_get_back_forward_list (web_view);
+WebKitBackForwardListItem* item = 
webkit_back_forward_list_get_forward_item (list);
+const gchar* forward_uri = webkit_back_forward_list_item_get_uri 
(item);
+#else
+WebKitWebBackForwardList* list = 
webkit_web_view_get_back_forward_list (web_view);
+WebKitWebHistoryItem* item = 
webkit_web_back_forward_list_get_forward_item (list);
+const gchar* forward_uri = webkit_web_history_item_get_uri (item);
+#endif
 GtkWidget* view = midori_browser_add_uri (browser, forward_uri);
 midori_browser_set_current_tab_smartly (browser, view);
 }
@@ -3775,7 +3781,6 @@ _action_navigation_activate (GtkAction* action,
 
 return TRUE;
 }
-#endif
 return FALSE;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master There's no spell-checking-languages setting in WebKit2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to b92a0df29f90dafa342832def455976d732531cc (commit)
   from 0f7baae1938a7d413ba77449f9d4b92844b98884 (commit)

commit b92a0df29f90dafa342832def455976d732531cc
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:53:36 2013 +0200

There's no spell-checking-languages setting in WebKit2

 midori/midori-websettings.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index 985dc42..cd80bec 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -1048,8 +1048,10 @@ midori_web_settings_set_property (GObject*  object,
 break;
 case PROP_PREFERRED_LANGUAGES:
 katze_assign (web_settings-http_accept_language, g_value_dup_string 
(value));
+#ifndef HAVE_WEBKIT2
 g_object_set (web_settings, spell-checking-languages,
   web_settings-http_accept_language, NULL);
+#endif
 midori_web_settings_update_accept_language (web_settings);
 break;
 case PROP_SITE_DATA_RULES:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master enable-java-applet becomes enable-java in WebKit2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 0f7baae1938a7d413ba77449f9d4b92844b98884 (commit)
   from c32b685289661ae1b83355c566120e8bd3437240 (commit)

commit 0f7baae1938a7d413ba77449f9d4b92844b98884
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:53:11 2013 +0200

enable-java-applet becomes enable-java in WebKit2

 midori/midori-websettings.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index bcc3c62..985dc42 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -1009,7 +1009,9 @@ midori_web_settings_set_property (GObject*  object,
 case PROP_ENABLE_PLUGINS:
 g_object_set (web_settings,
WEB_SETTINGS_STRING (enable-plugins), g_value_get_boolean (value),
-#if WEBKIT_CHECK_VERSION (1, 1, 22)
+#if HAVE_WEBKIT2
+enable-java, g_value_get_boolean (value),
+#elif WEBKIT_CHECK_VERSION (1, 1, 22)
 enable-java-applet, g_value_get_boolean (value),
 #endif
 NULL);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master There's no user-stylesheet-uri in WebKit2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 13d67c47ae8a1adb3c98737daa3a65ce91a84245 (commit)
   from b92a0df29f90dafa342832def455976d732531cc (commit)

commit 13d67c47ae8a1adb3c98737daa3a65ce91a84245
Author: Christian Dywan christ...@twotoasts.de
Date:   Thu Apr 4 23:54:12 2013 +0200

There's no user-stylesheet-uri in WebKit2

 midori/midori-websettings.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c
index cd80bec..38aefeb 100644
--- a/midori/midori-websettings.c
+++ b/midori/midori-websettings.c
@@ -1222,8 +1222,12 @@ midori_web_settings_get_property (GObject*object,
 WEB_SETTINGS_STRING (enable-fullscreen)));
 break;
 case PROP_USER_STYLESHEET_URI:
+#ifdef HAVE_WEBKIT2
+g_value_set_string (value, web_settings-user_stylesheet_uri);
+#else
 g_value_take_string (value, katze_object_get_string (web_settings,
 WEB_SETTINGS_STRING (user-stylesheet-uri)));
+#endif
 break;
 default:
 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1278,7 +1282,11 @@ midori_web_settings_process_stylesheets 
(MidoriWebSettings* settings,
 
 /* data: uri prefix from Source/WebCore/page/Page.cpp:700 in WebKit */
 encoded = g_strconcat (data:text/css;charset=utf-8;base64,, css-str, 
NULL);
+#ifdef HAVE_WEBKIT2
+/* TODO: webkit_web_view_group_add_user_style_sheet */
+#else
 g_object_set (settings, WEB_SETTINGS_STRING (user-stylesheet-uri), 
encoded, NULL);
+#endif
 g_free (encoded);
 g_string_free (css, TRUE);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement zoom_text_and_images for WebKit2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 9295eb8efd7870fcec255ff7ba6df684bd150fe2 (commit)
   from 13d67c47ae8a1adb3c98737daa3a65ce91a84245 (commit)

commit 9295eb8efd7870fcec255ff7ba6df684bd150fe2
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 5 00:38:16 2013 +0200

Implement zoom_text_and_images for WebKit2

 midori/midori-settings.vala |9 +++--
 midori/midori-view.c|   29 +
 2 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/midori/midori-settings.vala b/midori/midori-settings.vala
index 32e379d..946b72c 100644
--- a/midori/midori-settings.vala
+++ b/midori/midori-settings.vala
@@ -33,8 +33,15 @@ namespace Midori {
 } set {
 default_encoding = value;
 } }
+/* Since: 0.1.3 */
+public bool zoom_text_and_images { get; set; default = true; }
 #else
 public class Settings : WebKit.Settings {
+public bool zoom_text_and_images { get {
+return !zoom_text_only;
+} set {
+zoom_text_only = !value;
+} }
 #endif
 public bool remember_last_window_size { get; set; default = true; }
 public int last_window_width { get; set; default = 0; }
@@ -101,8 +108,6 @@ namespace Midori {
 public bool find_while_typing { get; set; default = false; }
 
 public bool open_popups_in_tabs { get; set; default = true; }
-/* Since: 0.1.3 */
-public bool zoom_text_and_images { get; set; default = true; }
 /* Since: 0.2.0 */
 // [Deprecated (since = 0.4.9)]
 public bool kinetic_scrolling { get; set; default = true; }
diff --git a/midori/midori-view.c b/midori/midori-view.c
index a9ac753..a3c497d 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -3432,10 +3432,11 @@ _midori_view_set_settings (MidoriView*view,
 open-tabs-in-the-background, view-open_tabs_in_the_background,
 NULL);
 
-g_object_set (view-web_view,
-  settings, settings,
-  full-content-zoom, zoom_text_and_images,
-  NULL);
+webkit_web_view_set_settings (WEBKIT_WEB_VIEW (view-web_view), 
(void*)settings);
+#ifndef HAVE_WEBKIT2
+webkit_web_view_set_full_content_zoom (WEBKIT_WEB_VIEW (view-web_view),
+zoom_text_and_images);
+#endif
 }
 
 /**
@@ -3506,12 +3507,16 @@ midori_view_settings_notify_cb (MidoriWebSettings* 
settings,
 g_value_init (value, pspec-value_type);
 g_object_get_property (G_OBJECT (view-settings), name, value);
 
-if (name == g_intern_string (zoom-text-and-images))
+if (name == g_intern_string (open-new-pages-in))
+view-open_new_pages_in = g_value_get_enum (value);
+#ifndef HAVE_WEBKIT2
+else if (name == g_intern_string (zoom-text-and-images))
 {
 if (view-web_view)
-g_object_set (view-web_view, full-content-zoom,
-  g_value_get_boolean (value), NULL);
+webkit_web_view_set_full_content_zoom (WEBKIT_WEB_VIEW 
(view-web_view),
+g_value_get_boolean (value));
 }
+#endif
 else if (name == g_intern_string (close-buttons-on-tabs))
 {
 view-close_buttons_on_tabs = g_value_get_boolean (value);
@@ -3520,8 +3525,6 @@ midori_view_settings_notify_cb (MidoriWebSettings* 
settings,
view-close_buttons_on_tabs);
 #endif
 }
-else if (name == g_intern_string (open-new-pages-in))
-view-open_new_pages_in = g_value_get_enum (value);
 else if (name == g_intern_string (middle-click-opens-selection))
 view-middle_click_opens_selection = g_value_get_boolean (value);
 else if (name == g_intern_string (open-tabs-in-the-background))
@@ -3807,9 +3810,11 @@ midori_view_constructor (GType  type,
 
 if (view-settings)
 {
-g_object_set (view-web_view, settings, view-settings,
-full-content-zoom, katze_object_get_boolean (view-settings,
-zoom-text-and-images), NULL);
+webkit_web_view_set_settings (WEBKIT_WEB_VIEW (view-web_view), 
(void*)view-settings);
+#ifndef HAVE_WEBKIT2
+webkit_web_view_set_full_content_zoom (WEBKIT_WEB_VIEW 
(view-web_view),
+katze_object_get_boolean (view-settings, zoom-text-and-images));
+#endif
 }
 
 #ifdef HAVE_WEBKIT2
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Deprecate middle_click_opens_selection in favour of gtk-enable-primary-paste

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to 2673578d883029dbb13700df99d71b2167df1de6 (commit)
   from 9295eb8efd7870fcec255ff7ba6df684bd150fe2 (commit)

commit 2673578d883029dbb13700df99d71b2167df1de6
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 5 00:46:03 2013 +0200

Deprecate middle_click_opens_selection in favour of gtk-enable-primary-paste

 midori/midori-settings.vala |1 +
 midori/midori-view.c|   10 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/midori/midori-settings.vala b/midori/midori-settings.vala
index 946b72c..75c68f3 100644
--- a/midori/midori-settings.vala
+++ b/midori/midori-settings.vala
@@ -111,6 +111,7 @@ namespace Midori {
 /* Since: 0.2.0 */
 // [Deprecated (since = 0.4.9)]
 public bool kinetic_scrolling { get; set; default = true; }
+// [Deprecated (since = 0.5.0)]
 public bool middle_click_opens_selection { get; set; default = true; }
 public bool flash_window_on_new_bg_tabs { get; set; default = false; }
 
diff --git a/midori/midori-view.c b/midori/midori-view.c
index a3c497d..b4d2d30 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -104,7 +104,6 @@ struct _MidoriView
 GtkWidget* web_view;
 KatzeArray* news_feeds;
 
-gboolean middle_click_opens_selection;
 gboolean open_tabs_in_the_background;
 gboolean close_buttons_on_tabs;
 MidoriNewPage open_new_pages_in;
@@ -1760,7 +1759,11 @@ midori_view_web_view_button_press_event_cb 
(WebKitWebView*  web_view,
 view-button_press_handled = TRUE;
 return TRUE;
 }
-if (view-middle_click_opens_selection)
+#if GTK_CHECK_VERSION (3, 4, 0)
+if (katze_object_get_boolean (gtk_widget_get_settings 
(view-web_view), gtk-enable-primary-paste))
+#else
+if (midori_settings_get_middle_click_opens_selection (MIDORI_SETTINGS 
(view-settings)))
+#endif
 {
 gboolean is_editable;
 WebKitHitTestResult* result;
@@ -3428,7 +3431,6 @@ _midori_view_set_settings (MidoriView*view,
 zoom-text-and-images, zoom_text_and_images,
 close-buttons-on-tabs, view-close_buttons_on_tabs,
 open-new-pages-in, view-open_new_pages_in,
-middle-click-opens-selection, view-middle_click_opens_selection,
 open-tabs-in-the-background, view-open_tabs_in_the_background,
 NULL);
 
@@ -3525,8 +3527,6 @@ midori_view_settings_notify_cb (MidoriWebSettings* 
settings,
view-close_buttons_on_tabs);
 #endif
 }
-else if (name == g_intern_string (middle-click-opens-selection))
-view-middle_click_opens_selection = g_value_get_boolean (value);
 else if (name == g_intern_string (open-tabs-in-the-background))
 view-open_tabs_in_the_background = g_value_get_boolean (value);
 else if (name == g_intern_string (enable-javascript))
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master Implement res:// and stock:// in WebKit2

2013-04-04 Thread Christian Dywan
Updating branch refs/heads/master
 to f33299b41b0fd3f7aa5cb1edd7c6e65a960907b7 (commit)
   from 2673578d883029dbb13700df99d71b2167df1de6 (commit)

commit f33299b41b0fd3f7aa5cb1edd7c6e65a960907b7
Author: Christian Dywan christ...@twotoasts.de
Date:   Fri Apr 5 00:56:40 2013 +0200

Implement res:// and stock:// in WebKit2

 midori/midori-view.c |   57 ++---
 1 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index b4d2d30..336d42c 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -74,6 +74,12 @@ midori_view_web_view_get_snapshot (GtkWidget* web_view,
gint   width,
gint   height);
 
+#ifdef HAVE_WEBKIT2
+static void
+midori_view_uri_scheme_res (WebKitURISchemeRequest* request,
+gpointeruser_data);
+#endif
+
 static gboolean
 midori_view_display_error (MidoriView* view,
const gchar*uri,
@@ -383,6 +389,14 @@ midori_view_class_init (MidoriViewClass* class)
  The associated settings,
  MIDORI_TYPE_WEB_SETTINGS,
  G_PARAM_READWRITE | 
G_PARAM_STATIC_STRINGS));
+
+#ifdef HAVE_WEBKIT2
+WebKitWebContext* context = webkit_web_context_get_default ();
+webkit_web_context_register_uri_scheme (context,
+res, midori_view_uri_scheme_res, NULL, NULL);
+webkit_web_context_register_uri_scheme (context,
+stock, midori_view_uri_scheme_res, NULL, NULL);
+#endif
 }
 
 static void
@@ -922,7 +936,15 @@ webkit_web_view_progress_changed_cb (WebKitWebView* 
web_view,
 midori_tab_set_progress (MIDORI_TAB (view), progress);
 }
 
-#ifndef HAVE_WEBKIT2
+#ifdef HAVE_WEBKIT2
+static void
+midori_view_uri_scheme_res (WebKitURISchemeRequest* request,
+gpointeruser_data)
+{
+const gchar* uri = webkit_uri_scheme_request_get_uri (request);
+WebKitWebView* web_view = webkit_uri_scheme_request_get_web_view (request);
+MidoriView* view = midori_view_get_for_widget (GTK_WIDGET (web_view));
+#else
 static void
 midori_view_web_view_resource_request_cb (WebKitWebView* web_view,
   WebKitWebFrame*web_frame,
@@ -932,6 +954,7 @@ midori_view_web_view_resource_request_cb (WebKitWebView*
 web_view,
   MidoriView*view)
 {
 const gchar* uri = webkit_network_request_get_uri (request);
+#endif
 
 /* Only apply custom URIs to special pages for security purposes */
 if (!midori_tab_get_special (MIDORI_TAB (view)))
@@ -940,10 +963,25 @@ midori_view_web_view_resource_request_cb (WebKitWebView*  
   web_view,
 if (g_str_has_prefix (uri, res://))
 {
 gchar* filepath = midori_paths_get_res_filename (uri[6]);
+#ifdef HAVE_WEBKIT2
+gchar* contents;
+gsize length;
+if (g_file_get_contents (filepath, contents, length, NULL))
+{
+gchar* content_type = g_content_type_guess (filepath, 
(guchar*)contents, length, NULL);
+gchar* mime_type = g_content_type_get_mime_type (content_type);
+GInputStream* stream = g_memory_input_stream_new_from_data 
(contents, -1, g_free);
+webkit_uri_scheme_request_finish (request, stream, -1, mime_type);
+g_object_unref (stream);
+g_free (mime_type);
+g_free (content_type);
+}
+#else
 gchar* file_uri = g_filename_to_uri (filepath, NULL, NULL);
-g_free (filepath);
 webkit_network_request_set_uri (request, file_uri);
 g_free (file_uri);
+#endif
+g_free (filepath);
 }
 else if (g_str_has_prefix (uri, stock://))
 {
@@ -992,12 +1030,18 @@ midori_view_web_view_resource_request_cb (WebKitWebView* 
web_view,
 gsize buffer_size;
 if (g_file_get_contents (icon_filename, buffer, buffer_size, 
NULL))
 {
+#ifdef HAVE_WEBKIT2
+GInputStream* stream = g_memory_input_stream_new_from_data 
(buffer, buffer_size, g_free);
+webkit_uri_scheme_request_finish (request, stream, -1, 
image/svg+xml);
+g_object_unref (stream);
+#else
 gchar* encoded = g_base64_encode ((guchar*)buffer, 
buffer_size);
 gchar* data_uri = g_strconcat (data:image/svg+xml;base64,, 
encoded, NULL);
 g_free (buffer);
 g_free (encoded);
 webkit_network_request_set_uri (request, data_uri);
 g_free (data_uri);
+#endif
 return;
 }
 }
@@ -1021,16 +1065,21 @@ midori_view_web_view_resource_request_cb

  1   2   3   4   5   6   7   8   9   10   >