diff -Nru midori-0.5.5/ChangeLog midori-0.5.8/ChangeLog
--- midori-0.5.5/ChangeLog 2013-08-14 18:32:02.000000000 +0000
+++ midori-0.5.8/ChangeLog 2014-04-03 21:23:17.000000000 +0000
@@ -1,5 +1,176 @@
This file is licensed under the terms of the expat license, see the file EXPAT.
+v0.5.8
+ Use png icon instead of svg in set_status
+ We must not pass a Cancellable to FaviconDatabase.get_favicon_pixbuf
+ Retain spelling suggestion menu items from WebKit
+ Properly guard usage of gtk3 get_style_context
+ Mimic the look of Granite.DynamicNotebook when compiled with --enable-granite.
+ Fix X11 lib underlink in midori-core
+ Fix bookmarkbar bookmark click not opening links
+ Use sanitized app URI as wm_classname/ StartupWMClass
+ Make trunk build with WebKit2 again
+ Fix for incorrect tstamp for background tabs
+ Don't declare sorting doubles are nullable and print values when database tracing is enabled
+ Correctly apply saved entry state and treat urlbar as a regular editable item
+ Add missing conditional includes for granite flavoured build
+ Open URIs dragged on tab label or new tab button
+ Small adblock bugfixes
+ Work around GTK3's hard-coded minimum stackswitcher button width
+ Fix building with mingw packages from fedora 18
+ Set page title as basis for print filename
+ Rename notes inline
+ Use EXTRA_WARNINGS option when building for windows
+ Drop forgotten clutter init and obsolete header declarations
+ Rework history-step handling and make it work again
+ Port Tabby to DatabaseStatement API
+ Replace bookmark stracing with generic profiling in Midori.Database
+ Port autocompleter test to async job
+ Finishing touches for Adblock
+ Add filters and defaults
+ Implement and use ContextAction.escaped
+ printf URI in show_message_dialog for download error
+ Improve docs and GIR annotations for KatzeItem, KatzeArray, and MidoriWebSettings
+ Drop redundant TabNew from compact menu and put button in Tab Panel
+ Fix loading file:// pages
+ Implement Send Page Link by Email
+ Use GtkStackSwitcher with GTK+ >= 3.10
+ Implements context popup menu on menu entries of bookmark bar and bookmark menu.
+ Fix building with newer mingw versions
+ Display locationbar suggestions in the correct order
+ Don't bother adblocking internal pages and favicons
+ Don't use trailing comma on last list element in Adblock tests
+ Rewrite Adblock more modularly, add Whitelist support
+ Add support of DragonFlyBSD
+ Change tooltips of Reload and ReloadStop actions while shift modifier is pressed
+ Implement Midori.Database.attach method
+ Allow :memory: as folder to make schema detection work
+ More robust app/ profile creation
+ Add helper callbacks to modify bookmark's tree store with unneded access to bookmarks db
+ Implement more flexible fallback behavior for Cookie Permissions
+
+v0.5.7:
+ Modify actions and internal items in browser without changing settings
+ Delay tab loading after Midori crashed
+ Uncomment failing assertions about view_source in tab test
+ Fallback to about:home if startup is anything but blank
+ Don't try to create formhistory database if config_dir is NULL
+ Handle url arguments for blank sessions
+ Execute commands given at start time
+ Introduce high-level prepare/ DatabaseStatement API
+ Drop unused GraniteClutter-based animation support
+ Drop uncommented contractor support
+ Drop deprecated StaticNotebook used in KatzePreferences
+ Introduce notebook class converging separate implementations
+ Work around symbol relocation issue old version of gcc present on Ubuntu LTS
+ NULL-check treeview in midori_search_action_get_editor
+ Adjust CMakeList .ico check to not skip nojs icons
+ Enable sidepanel in private mode
+ Move Preferences menu entry above About
+ Set minimum value of 0 on spin button for maximum cache size
+ Give NextForward its own label for toolbar editor
+ Correctly disable favicon database in app and private mode
+ Change preferences to refer to proxy address as a "URI" (not "hostname")
+ Add close tabs to right feature
+ Allow printing without confirmation dialog on kiosk setups
+
+v0.5.6:
+ instead of creating devpet status icon on extension load, create it only to show new messages
+ Open speed dial or homepage according to preference
+ handle tab duplication
+ Add copyright note to appdata file
+ Tweak searching for resources when running from build folder
+ Swap NULL-check with main frame check
+ Use correct signal when clearing the trash
+ Hide WEbGL preference if it is unavailable
+ Remove stored popup sessions from the database
+ Check all browsers for opened sessions and whether they're popups
+ removed unused preference dialog and related code
+ Fix check for found valac and mention VALAC variable
+ Fix autoscrolling if page contains a frame with our custom error page
+ Don't use context-menu signal in WebKitGTK+ < 1.10.0
+ Fix building on Ubuntu 12.04
+ Reset item ids when re-importing bookmarks
+ Check path being NULL in export before trying to inspect it
+ restore the last closed sessions if no session is opened
+ Cast WebKitDOMHtmlElement for getting source content
+ Use font-set signal and font family for GTK+ 3.2 font chooser
+ add function to view dom source
+ remove unused variable
+ Resolve compiler warnings in current trunk
+ Update win32-release script for cmake, move unused docs/scripts to old folder
+ Try to handle previous runs of cmake in configure wrapper
+ Correct view source assertions in tab unit test
+ Build fix: found undeclared in midori_bookmarks_db_remove_item_recursive
+ Cache bookmark items to avoid their recreation on database reads
+ allow "view source" on about pages
+ Enable old target policy on cmake < 2.8.8
+ Re-arrange data file installing to be more explicit
+ option to modify the number of tabs which will be restored in each idle callback
+ Implement MidoriBookmarksDatabase class by inheritence from MidoriDatabase
+ Ensure tab spinners update as often as the menubar spinner to avoid desync
+ Use tabby sorting increment when importing session.xbel tabs
+ Only install config files to /etc if prefix equals /usr
+ handle urls as argument when starting midori
+ Make tabby compile with Webkit2
+ Drop waf build system and provide cmake-based "configure" script
+ midori_panel_action_activate_cb forgot to update the action group
+ Fixes bug where certificate Security overlay failed to close
+ handle tab movement
+ add tab sorting
+ Untangle implicit GTK+3 for Granite and WebKit2
+ Allow running test under debug tools with cmake
+ Install config files to /etc when install prefix is /usr
+ Add missing PO_FILES argument to GETTEXT_PROCESS_PO_FILES
+ Add USE_APIDOCS to build API docs with CMake
+ Rasterize SVG to PNG with rsvg-convert
+ fix bookmarks test regression after fix-1179200-4
+ Add CMakeLists.txt for config directory
+ Install mo files in locale dir
+ don't change uri/title if the tab isn't loaded
+ use a separate signal to store the tab title
+ Check if execinfo.h header exists on BSD
+ fix endless loop in Midori.Database.init
+ Use destructive-action style class in ClearPrivateData
+ Initialize priv->element to avoid crash when freeing
+ Introduces KatzeArray::update-item to handle metadata changes
+ Refactor excuting schema from file into a function
+ Use stock as string in liststore
+ Drop needless (and wrong) HAVE_LIBNOTIFY in preferences
+ Flip horizontal position of the overlay when hit by the mouse
+ Add Midori.URI.get_base_domain and use it in NoJS
+ Introduce Midori.Database and use for history and tabby
+ ctrl+shift+w should trigger a delete-event
+ Implement dialog windows opened via javascript
+ Make get_res_filename work with different hierarchies
+ fix check for new database
+ Speed up session import
+ Import tab title from old sessions
+ Separate CFLAGS for C and add missing HAVE_
+ Install top-level text files and FAQ html/ css to doc dir
+ Provide and install .appdata.xml file for app stores
+ Move bookmarks db handling to midori-bookmarks-db
+ Add XSS to OPTS_LIBRARIES
+ Update condition for UBUNTU_MENUPROXY to work on Saucy
+ Introduce tabby, the new session manager
+ Fix typo in katze_item_set_meta_integer call
+ Allow bookmark bar update on additions resulting from imports
+ Re-work midori_array_query_recursive to not include folder items twice
+ Fix syntax of icon sizes passed to foreach
+ Add bzr revision number to version if available
+ Unify nojs and cookie policy dialogs, make policy changeable within the list
+ Drop all G_ENABLE_DEBUG guards
+ Add -g to CFLAGS to enable debugging symbols
+ Adjust cmake build for Win32
+ Implement CMake build setup
+ Port MidoriApp from Unique/ sockets to GApplication
+ New signal about-content to provide content for about uris
+ Check if browser is NULL in midori_view_get_tab_menu to prevent a crash. Fixes bug #1215652.
+ Ensure proxy setting widgets callbacks don't outlive the widgets themselves
+ Fix webkit2 build error
+ Show the bookmarks import location combobox.
+ Rename internal completion URLs to avoid confusion
+
v0.5.5:
Fix name and text fields inversion in XBEL folder import
Correct packing of cookie and nojs permission dialog.
diff -Nru midori-0.5.5/cmake/ContainTest.cmake midori-0.5.8/cmake/ContainTest.cmake
--- midori-0.5.5/cmake/ContainTest.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/ContainTest.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,42 @@
+# Copyright (C) 2013 Christian Dywan
+
+include(ParseArguments)
+
+macro(contain_test test_name)
+ parse_arguments(ARGS "TEST" "" ${ARGN})
+ set(TEST_ENV "")
+ foreach(VARIABLE XDG_DATA_HOME XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_RUNTIME_DIR TMPDIR)
+ set(CONTAINER "${CMAKE_CURRENT_BINARY_DIR}/${test_name}-folders/${VARIABLE}")
+ file(REMOVE_RECURSE ${CONTAINER})
+ file(MAKE_DIRECTORY ${CONTAINER})
+ set(TEST_ENV "${TEST_ENV}${VARIABLE}=${CONTAINER};")
+ endforeach()
+ set_tests_properties(${test_name} PROPERTIES
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ TIMEOUT 42
+ ENVIRONMENT "${TEST_ENV}"
+ )
+
+ add_custom_target("gdb-${test_name}"
+ COMMAND env ${TEST_ENV} gdb
+ --batch -ex 'set print thread-events off'
+ -ex 'run' -ex 'bt'
+ ${CMAKE_BINARY_DIR}/tests/${UNIT}
+ )
+
+ add_custom_target("valgrind-${test_name}"
+ COMMAND env ${TEST_ENV} valgrind
+ -q --leak-check=no --num-callers=4
+ --show-possibly-lost=no
+ --undef-value-errors=yes
+ --track-origins=yes
+ ${CMAKE_BINARY_DIR}/tests/${UNIT}
+ )
+
+ add_custom_target("callgrind-${test_name}"
+ COMMAND env ${TEST_ENV} valgrind
+ --tool=callgrind
+ --callgrind-out-file=${UNIT}.callgrind
+ ${CMAKE_BINARY_DIR}/tests/${UNIT}
+ )
+endmacro(contain_test)
diff -Nru midori-0.5.5/cmake/FindConvert.cmake midori-0.5.8/cmake/FindConvert.cmake
--- midori-0.5.5/cmake/FindConvert.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/FindConvert.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,19 @@
+# Copyright (C) 2013 Christian Dywan
+# Copyright (C) 2013 Olivier Duchateau
+
+find_program (RSVG_CONVERT rsvg-convert)
+
+if (RSVG_CONVERT)
+ set (CONVERT_FOUND TRUE)
+ macro (SVG2PNG filename install_destination)
+ string(REPLACE "/" "_" target ${filename})
+ file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${filename}")
+ add_custom_target ("${target}.png" ALL
+ ${RSVG_CONVERT} --keep-aspect-ratio --format=png "${CMAKE_CURRENT_SOURCE_DIR}/${filename}.svg"
+ --output "${CMAKE_CURRENT_BINARY_DIR}/${filename}.png"
+ )
+ install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${filename}.png"
+ DESTINATION ${install_destination})
+ endmacro (SVG2PNG filename)
+endif ()
+
diff -Nru midori-0.5.5/cmake/FindIntltool.cmake midori-0.5.8/cmake/FindIntltool.cmake
--- midori-0.5.5/cmake/FindIntltool.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/FindIntltool.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,38 @@
+# FindIntltool.cmake
+#
+# Jim Nelson
+# Copyright 2012-2013 Yorba Foundation
+# Copyright (C) 2013 Christian Dywan
+
+find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge)
+find_program (INTLTOOL_UPDATE_EXECUTABLE intltool-update)
+
+if (INTLTOOL_MERGE_EXECUTABLE)
+ set (INTLTOOL_MERGE_FOUND TRUE)
+ macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
+ add_custom_target ("${desktop_id}.desktop" ALL
+ ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop
+ )
+ install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${desktop_id}.desktop"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
+ endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
+ macro (INTLTOOL_MERGE_APPDATA desktop_id po_dir)
+ add_custom_target ("${desktop_id}.appdata.xml" ALL
+ ${INTLTOOL_MERGE_EXECUTABLE} --xml-style ${CMAKE_SOURCE_DIR}/${po_dir}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.appdata.xml.in ${desktop_id}.appdata.xml
+ )
+ install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${desktop_id}.appdata.xml"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/appdata")
+ endmacro (INTLTOOL_MERGE_APPDATA desktop_id po_dir)
+endif ()
+
+if (INTLTOOL_UPDATE_EXECUTABLE)
+ set (INTLTOOL_UPDATE_FOUND TRUE)
+ add_custom_target (pot
+ COMMAND ${INTLTOOL_UPDATE_EXECUTABLE} "-p" "-g" ${GETTEXT_PACKAGE}
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/po"
+ )
+endif ()
+
+
diff -Nru midori-0.5.5/cmake/FindVala.cmake midori-0.5.8/cmake/FindVala.cmake
--- midori-0.5.5/cmake/FindVala.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/FindVala.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,18 @@
+# Copyright (C) 2013 Christian Dywan
+
+find_program(VALA_EXECUTABLE NAMES $ENV{VALAC} valac)
+if (VALA_EXECUTABLE)
+ execute_process(COMMAND ${VALA_EXECUTABLE} "--version" OUTPUT_VARIABLE "VALA_VERSION")
+ string(REPLACE "Vala " "" VALA_VERSION ${VALA_VERSION})
+ string(STRIP ${VALA_VERSION} VALA_VERSION)
+else ()
+ message(FATAL_ERROR "valac not found - install Vala compiler or specify compiler name eg. VALAC=valac-0.20")
+endif ()
+
+macro(vala_require VALA_REQUIRED)
+ if (${VALA_VERSION} VERSION_GREATER ${VALA_REQUIRED} OR ${VALA_VERSION} VERSION_EQUAL ${VALA_REQUIRED})
+ message(STATUS "valac ${VALA_VERSION} found")
+ else ()
+ message(FATAL_ERROR "valac >= ${VALA_REQUIRED} or later required")
+ endif ()
+endmacro(vala_require)
diff -Nru midori-0.5.5/cmake/GIR.cmake midori-0.5.8/cmake/GIR.cmake
--- midori-0.5.5/cmake/GIR.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/GIR.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,31 @@
+# GIR.cmake
+#
+# Macros for building Gobject Introspection bindings for Midori API
+find_program (GIR_SCANNER_BIN g-ir-scanner)
+find_program (GIR_COMPILER_BIN g-ir-compiler)
+
+if (GIR_SCANNER_BIN AND GIR_COMPILER_BIN)
+
+ set (GIR_FOUND TRUE)
+ set (GIR_VERSION "${MIDORI_MAJOR_VERSION}.${MIDORI_MINOR_VERSION}")
+ macro (gir_build module namespace)
+ add_custom_target ("g-ir-scanner_${module}" ALL
+ ${GIR_SCANNER_BIN} -Imidori -I${CMAKE_SOURCE_DIR}/ -I${CMAKE_BINARY_DIR}/midori -I${CMAKE_SOURCE_DIR}/${module} -I${CMAKE_SOURCE_DIR}/toolbars -I.
+ --header-only -n ${namespace} --identifier-prefix ${namespace}
+ ${CMAKE_SOURCE_DIR}/${module}/${module}-*.c ${CMAKE_SOURCE_DIR}/${module}/${module}-*.h
+ --pkg gtk+-2.0 --pkg webkit-1.0 --pkg gio-2.0 --pkg gobject-2.0
+ --warn-all -iGObject-2.0 -iGLib-2.0 -iGtk-2.0
+ --nsversion ${GIR_VERSION}
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${namespace}-${GIR_VERSION}.gir
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+ DEPENDS ${CMAKE_PROJECT_NAME})
+
+ endmacro (gir_build module namespace)
+
+ macro (gir module namespace)
+ gir_build (${module} ${namespace})
+
+ install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${namespace}-${GIR_VERSION}.gir"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/gir-1.0/")
+ endmacro (gir module)
+endif ()
diff -Nru midori-0.5.5/cmake/GLibHelpers.cmake midori-0.5.8/cmake/GLibHelpers.cmake
--- midori-0.5.5/cmake/GLibHelpers.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/GLibHelpers.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,71 @@
+# Copyright (C) 2010 David Sansome
+cmake_minimum_required(VERSION 2.6)
+if(POLICY CMP0011)
+ cmake_policy(SET CMP0011 NEW)
+endif(POLICY CMP0011)
+
+find_program(GLIB_MKENUMS glib-mkenums)
+find_program(GLIB_GENMARSHAL glib-genmarshal)
+
+macro(add_glib_marshal outfiles name prefix otherinclude)
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.h"
+ COMMAND ${GLIB_GENMARSHAL} --header "--prefix=${prefix}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list"
+ > "${CMAKE_CURRENT_BINARY_DIR}/${name}.h"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list"
+ )
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.c"
+ COMMAND echo "\\#include \\\"${otherinclude}\\\"" > "${CMAKE_CURRENT_BINARY_DIR}/${name}.c"
+ COMMAND echo "\\#include \\\"glib-object.h\\\"" >> "${CMAKE_CURRENT_BINARY_DIR}/${name}.c"
+ COMMAND echo "\\#include \\\"${name}.h\\\"" >> "${CMAKE_CURRENT_BINARY_DIR}/${name}.c"
+ COMMAND ${GLIB_GENMARSHAL} --body "--prefix=${prefix}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list"
+ >> "${CMAKE_CURRENT_BINARY_DIR}/${name}.c"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${name}.list"
+ "${CMAKE_CURRENT_BINARY_DIR}/${name}.h"
+ )
+ list(APPEND ${outfiles} "${CMAKE_CURRENT_BINARY_DIR}/${name}.c")
+endmacro(add_glib_marshal)
+
+macro(add_glib_enumtypes_t outfiles name htemplate ctemplate)
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.h"
+ COMMAND ${GLIB_MKENUMS}
+ --template "${htemplate}"
+ ${ARGN} > "${CMAKE_CURRENT_BINARY_DIR}/${name}.h"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${ARGN} "${htemplate}"
+ )
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.c"
+ COMMAND ${GLIB_MKENUMS}
+ --template "${ctemplate}"
+ ${ARGN} > "${CMAKE_CURRENT_BINARY_DIR}/${name}.c"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ${ARGN} ${ctemplate}
+ "${CMAKE_CURRENT_BINARY_DIR}/${name}.h"
+ )
+ list(APPEND ${outfiles} "${CMAKE_CURRENT_BINARY_DIR}/${name}.c")
+endmacro(add_glib_enumtypes_t)
+
+macro(add_glib_enumtypes outfiles name includeguard)
+ set(htemplate "${CMAKE_CURRENT_BINARY_DIR}/${name}.h.template")
+ set(ctemplate "${CMAKE_CURRENT_BINARY_DIR}/${name}.c.template")
+
+ # Write the .h template
+ add_custom_command(
+ OUTPUT ${htemplate} ${ctemplate}
+ COMMAND ${CMAKE_COMMAND}
+ "-Dctemplate=${ctemplate}"
+ "-Dhtemplate=${htemplate}"
+ "-Dname=${name}"
+ "-Dincludeguard=${includeguard}"
+ "\"-Dheaders=${ARGN}\""
+ -P "${CMAKE_SOURCE_DIR}/CMake/MakeGLibEnumTemplates.cmake"
+ DEPENDS "${CMAKE_SOURCE_DIR}/CMake/MakeGLibEnumTemplates.cmake" ${headers}
+ )
+
+ add_glib_enumtypes_t(${outfiles} ${name} ${htemplate} ${ctemplate} ${ARGN})
+endmacro(add_glib_enumtypes)
diff -Nru midori-0.5.5/cmake/GtkDoc.cmake midori-0.5.8/cmake/GtkDoc.cmake
--- midori-0.5.5/cmake/GtkDoc.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/GtkDoc.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,61 @@
+# GtkDoc.cmake
+#
+# Macros for building Midori API documentation.
+# Copyright (C) 2013 Olivier Duchateau
+
+find_program (GTKDOC_SCAN_BIN gtkdoc-scan)
+find_program (GTKDOC_MKDB_BIN gtkdoc-mkdb)
+find_program (GTKDOC_MKHTML_BIN gtkdoc-mkhtml)
+find_program (GTKDOC_MKTMPL_BIN gtkdoc-mktmpl)
+
+if (GTKDOC_SCAN_BIN AND GTKDOC_MKTMPL_BIN AND GTKDOC_MKDB_BIN
+ AND GTKDOC_MKHTML_BIN)
+
+ set (GTKDOC_FOUND TRUE)
+
+ macro (gtkdoc_build module)
+ message("gtkdoc: module ${module}")
+ # file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}")
+ add_custom_target ("gtkdoc-scan_${module}" ALL
+ ${GTKDOC_SCAN_BIN} --module=${module}
+ --source-dir="${CMAKE_SOURCE_DIR}/${module}"
+ --output-dir="${CMAKE_CURRENT_BINARY_DIR}/${module}"
+ --rebuild-sections --rebuild-types
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+
+ add_custom_target ("gtkdoc-tmpl_${module}" ALL
+ ${GTKDOC_MKTMPL_BIN} --module=${module}
+ --output-dir="${CMAKE_CURRENT_BINARY_DIR}"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}"
+ DEPENDS "gtkdoc-scan_${module}")
+
+ add_custom_target ("gtkdoc-docbook_${module}" ALL
+ ${GTKDOC_MKDB_BIN} --module=${module}
+ --output-dir="xml"
+ --source-dir="${CMAKE_SOURCE_DIR}/${module}"
+ --source-suffixes=c,h --output-format=xml
+ --default-includes=${module}/${module}.h
+ --sgml-mode --main-sgml-file=${module}.sgml
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}"
+ DEPENDS "gtkdoc-tmpl_${module}")
+
+ # Keep this target alone, otherwise build fails
+ add_custom_target ("gtkdoc-html_${module}" ALL
+ ${GTKDOC_MKHTML_BIN} ${module}
+ "${CMAKE_CURRENT_BINARY_DIR}/${module}/${module}.sgml"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html"
+ DEPENDS "gtkdoc-docbook_${module}")
+
+ endmacro (gtkdoc_build module)
+
+ macro (gtkdoc module)
+ file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html")
+ gtkdoc_build (${module})
+
+ set (DOC_DIR "html/midori-${MIDORI_MAJOR_VERSION}-${MIDORI_MINOR_VERSION}")
+ install (DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html/"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/gtk-doc/${DOC_DIR}/${module}"
+ PATTERN "html/*"
+ PATTERN "index.sgml" EXCLUDE)
+ endmacro (gtkdoc module)
+endif ()
diff -Nru midori-0.5.5/cmake/ParseArguments.cmake midori-0.5.8/cmake/ParseArguments.cmake
--- midori-0.5.5/cmake/ParseArguments.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/ParseArguments.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,36 @@
+##
+# This is a helper Macro to parse optional arguments in Macros/Functions
+# It has been taken from the public CMake wiki.
+# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and
+# licensing.
+##
+macro(parse_arguments prefix arg_names option_names)
+ set(DEFAULT_ARGS)
+ foreach(arg_name ${arg_names})
+ set(${prefix}_${arg_name})
+ endforeach(arg_name)
+ foreach(option ${option_names})
+ set(${prefix}_${option} FALSE)
+ endforeach(option)
+
+ set(current_arg_name DEFAULT_ARGS)
+ set(current_arg_list)
+ foreach(arg ${ARGN})
+ set(larg_names ${arg_names})
+ list(FIND larg_names "${arg}" is_arg_name)
+ if(is_arg_name GREATER -1)
+ set(${prefix}_${current_arg_name} ${current_arg_list})
+ set(current_arg_name ${arg})
+ set(current_arg_list)
+ else(is_arg_name GREATER -1)
+ set(loption_names ${option_names})
+ list(FIND loption_names "${arg}" is_option)
+ if(is_option GREATER -1)
+ set(${prefix}_${arg} TRUE)
+ else(is_option GREATER -1)
+ set(current_arg_list ${current_arg_list} ${arg})
+ endif(is_option GREATER -1)
+ endif(is_arg_name GREATER -1)
+ endforeach(arg)
+ set(${prefix}_${current_arg_name} ${current_arg_list})
+endmacro(parse_arguments)
diff -Nru midori-0.5.5/cmake/ValaPrecompile.cmake midori-0.5.8/cmake/ValaPrecompile.cmake
--- midori-0.5.5/cmake/ValaPrecompile.cmake 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/cmake/ValaPrecompile.cmake 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,236 @@
+##
+# Copyright 2009-2010 Jakob Westhoff. All rights reserved.
+# Copyright 2012 elementary.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY JAKOB WESTHOFF ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL JAKOB WESTHOFF OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# The views and conclusions contained in the software and documentation are those
+# of the authors and should not be interpreted as representing official policies,
+# either expressed or implied, of Jakob Westhoff
+##
+
+include(ParseArguments)
+find_package(Vala REQUIRED)
+
+##
+# Compile vala files to their c equivalents for further processing.
+#
+# The "vala_precompile" macro takes care of calling the valac executable on the
+# given source to produce c files which can then be processed further using
+# default cmake functions.
+#
+# The first parameter provided is a variable, which will be filled with a list
+# of c files outputted by the vala compiler. This list can than be used in
+# conjuction with functions like "add_executable" or others to create the
+# neccessary compile rules with CMake.
+#
+# The initial variable is followed by a list of .vala files to be compiled.
+# Please take care to add every vala file belonging to the currently compiled
+# project or library as Vala will otherwise not be able to resolve all
+# dependencies.
+#
+# The following sections may be specified afterwards to provide certain options
+# to the vala compiler:
+#
+# PACKAGES
+# A list of vala packages/libraries to be used during the compile cycle. The
+# package names are exactly the same, as they would be passed to the valac
+# "--pkg=" option.
+#
+# OPTIONS
+# A list of optional options to be passed to the valac executable. This can be
+# used to pass "--thread" for example to enable multi-threading support.
+#
+# CUSTOM_VAPIS
+# A list of custom vapi files to be included for compilation. This can be
+# useful to include freshly created vala libraries without having to install
+# them in the system.
+#
+# GENERATE_VAPI
+# Pass all the needed flags to the compiler to create an internal vapi for
+# the compiled library. The provided name will be used for this and a
+# .vapi file will be created.
+#
+# GENERATE_HEADER
+# Let the compiler generate a header file for the compiled code. There will
+# be a header file as well as an internal header file being generated called
+# .h and _internal.h
+#
+# GENERATE_GIR
+# Have the compiler generate a GObject-Introspection repository file with
+# name: .gir. This can be later used to create a binary typelib
+# using the GI compiler.
+#
+# GENERATE_SYMBOLS
+# Output a .symbols file containing all the exported symbols.
+#
+# The following call is a simple example to the vala_precompile macro showing
+# an example to every of the optional sections:
+#
+# vala_precompile(VALA_C mytargetname
+# source1.vala
+# source2.vala
+# source3.vala
+# PACKAGES
+# gtk+-2.0
+# gio-1.0
+# posix
+# DIRECTORY
+# gen
+# OPTIONS
+# --thread
+# CUSTOM_VAPIS
+# some_vapi.vapi
+# GENERATE_VAPI
+# myvapi
+# GENERATE_HEADER
+# myheader
+# GENERATE_GIR
+# mygir
+# GENERATE_SYMBOLS
+# mysymbols
+# )
+#
+# Most important is the variable VALA_C which will contain all the generated c
+# file names after the call.
+##
+
+macro(vala_precompile output target_name)
+ parse_arguments(ARGS "TARGET;PACKAGES;OPTIONS;DIRECTORY;GENERATE_GIR;GENERATE_SYMBOLS;GENERATE_HEADER;GENERATE_VAPI;CUSTOM_VAPIS" "" ${ARGN})
+
+ if(ARGS_DIRECTORY)
+ set(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGS_DIRECTORY})
+ else(ARGS_DIRECTORY)
+ set(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ endif(ARGS_DIRECTORY)
+ include_directories(${DIRECTORY})
+ set(vala_pkg_opts "")
+ foreach(pkg ${ARGS_PACKAGES})
+ list(APPEND vala_pkg_opts "--pkg=${pkg}")
+ endforeach(pkg ${ARGS_PACKAGES})
+ set(in_files "")
+ set(out_files "")
+ set(out_files_display "")
+ set(${output} "")
+
+ foreach(src ${ARGS_DEFAULT_ARGS})
+ string(REGEX MATCH "^/" IS_MATCHED ${src})
+ if(${IS_MATCHED} MATCHES "/")
+ set(src_file_path ${src})
+ else()
+ set(src_file_path ${CMAKE_CURRENT_SOURCE_DIR}/${src})
+ endif()
+ list(APPEND in_files ${src_file_path})
+ string(REPLACE ".vala" ".c" src ${src})
+ string(REPLACE ".gs" ".c" src ${src})
+ if(${IS_MATCHED} MATCHES "/")
+ get_filename_component(VALA_FILE_NAME ${src} NAME)
+ set(out_file "${CMAKE_CURRENT_BINARY_DIR}/${VALA_FILE_NAME}")
+ list(APPEND out_files "${CMAKE_CURRENT_BINARY_DIR}/${VALA_FILE_NAME}")
+ else()
+ set(out_file "${DIRECTORY}/${src}")
+ list(APPEND out_files "${DIRECTORY}/${src}")
+ endif()
+ list(APPEND ${output} ${out_file})
+ list(APPEND out_files_display "${src}")
+ endforeach(src ${ARGS_DEFAULT_ARGS})
+
+ set(custom_vapi_arguments "")
+ if(ARGS_CUSTOM_VAPIS)
+ foreach(vapi ${ARGS_CUSTOM_VAPIS})
+ if(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR})
+ list(APPEND custom_vapi_arguments ${vapi})
+ else (${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR})
+ list(APPEND custom_vapi_arguments ${CMAKE_CURRENT_SOURCE_DIR}/${vapi})
+ endif(${vapi} MATCHES ${CMAKE_SOURCE_DIR} OR ${vapi} MATCHES ${CMAKE_BINARY_DIR})
+ endforeach(vapi ${ARGS_CUSTOM_VAPIS})
+ endif(ARGS_CUSTOM_VAPIS)
+
+ set(vapi_arguments "")
+ if(ARGS_GENERATE_VAPI)
+ list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_VAPI}.vapi")
+ list(APPEND out_files_display "${ARGS_GENERATE_VAPI}.vapi")
+ set(vapi_arguments "--library=${ARGS_GENERATE_VAPI}" "--vapi=${ARGS_GENERATE_VAPI}.vapi")
+
+ # Header and internal header is needed to generate internal vapi
+ if (NOT ARGS_GENERATE_HEADER)
+ set(ARGS_GENERATE_HEADER ${ARGS_GENERATE_VAPI})
+ endif(NOT ARGS_GENERATE_HEADER)
+ endif(ARGS_GENERATE_VAPI)
+
+ set(header_arguments "")
+ if(ARGS_GENERATE_HEADER)
+ list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_HEADER}.h")
+ list(APPEND out_files_display "${ARGS_GENERATE_HEADER}.h")
+ list(APPEND header_arguments "--header=${ARGS_GENERATE_HEADER}.h")
+ endif(ARGS_GENERATE_HEADER)
+
+ set(gir_arguments "")
+ if(ARGS_GENERATE_GIR)
+ list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_GIR}.gir")
+ list(APPEND out_files_display "${ARGS_GENERATE_GIR}.gir")
+ set(gir_arguments "--gir=${ARGS_GENERATE_GIR}.gir")
+ endif(ARGS_GENERATE_GIR)
+
+ set(symbols_arguments "")
+ if(ARGS_GENERATE_SYMBOLS)
+ list(APPEND out_files "${DIRECTORY}/${ARGS_GENERATE_SYMBOLS}.symbols")
+ list(APPEND out_files_display "${ARGS_GENERATE_SYMBOLS}.symbols")
+ set(symbols_arguments "--symbols=${ARGS_GENERATE_SYMBOLS}.symbols")
+ endif(ARGS_GENERATE_SYMBOLS)
+
+ # Workaround for a bug that would make valac run twice. This file is written
+ # after the vala compiler generates C source code.
+ set(OUTPUT_STAMP ${CMAKE_CURRENT_BINARY_DIR}/${target_name}_valac.stamp)
+
+ add_custom_command(
+ OUTPUT
+ ${OUTPUT_STAMP}
+ COMMAND
+ ${VALA_EXECUTABLE}
+ ARGS
+ "-C"
+ ${header_arguments}
+ ${vapi_arguments}
+ ${gir_arguments}
+ ${symbols_arguments}
+ "-b" ${CMAKE_CURRENT_SOURCE_DIR}
+ "-d" ${DIRECTORY}
+ ${vala_pkg_opts}
+ ${ARGS_OPTIONS}
+ ${in_files}
+ ${custom_vapi_arguments}
+ COMMAND
+ touch
+ ARGS
+ ${OUTPUT_STAMP}
+ DEPENDS
+ ${in_files}
+ ${ARGS_CUSTOM_VAPIS}
+ COMMENT
+ "Generating ${out_files_display}"
+ )
+
+ # This command will be run twice for some reason (pass a non-empty string to COMMENT
+ # in order to see it). Since valac is not executed from here, this won't be a problem.
+ add_custom_command(OUTPUT ${out_files} DEPENDS ${OUTPUT_STAMP} COMMENT "")
+endmacro(vala_precompile)
diff -Nru midori-0.5.5/CMakeLists.txt midori-0.5.8/CMakeLists.txt
--- midori-0.5.5/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/CMakeLists.txt 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,297 @@
+# Copyright (C) 2013 Christian Dywan
+
+cmake_minimum_required(VERSION 2.6)
+cmake_policy(VERSION 2.6)
+# Work-around a bug in the included FindGettext fixed with 2.8.8
+# See http://www.cmake.org/pipermail/cmake-commits/2012-February/012117.html
+if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.8")
+ cmake_policy(SET CMP0002 OLD)
+endif ()
+project(midori C)
+add_definitions("-DPACKAGE_NAME=\"${CMAKE_PROJECT_NAME}\"")
+add_definitions("-DPACKAGE_BUGREPORT=\"https://bugs.launchpad.net/midori\"")
+
+set(VERSION 0.5.8)
+add_definitions("-DMIDORI_VERSION_SUFFIX=\"${VERSION}\"")
+
+string(REPLACE "." ";" VERSION_LIST ${VERSION})
+LIST(GET VERSION_LIST 0 MIDORI_MAJOR_VERSION)
+add_definitions("-DMIDORI_MAJOR_VERSION=${MIDORI_MAJOR_VERSION}")
+LIST(GET VERSION_LIST 1 MIDORI_MINOR_VERSION)
+add_definitions("-DMIDORI_MINOR_VERSION=${MIDORI_MINOR_VERSION}")
+LIST(GET VERSION_LIST 2 MIDORI_MICRO_VERSION)
+add_definitions("-DMIDORI_MICRO_VERSION=${MIDORI_MICRO_VERSION}")
+
+execute_process(COMMAND "bzr" "revno"
+ OUTPUT_VARIABLE REVISION
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+if (REVISION)
+ set(VERSION "${VERSION}~r${REVISION}")
+ # All warnings are errors in development builds
+ set(VALAFLAGS ${VALAFLAGS} --fatal-warnings)
+ set(CFLAGS "${CFLAGS}")
+endif ()
+add_definitions("-DPACKAGE_VERSION=\"${VERSION}\"")
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+# Disallow building during install to avoid permission problems
+set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY 1)
+
+find_package(Vala REQUIRED)
+vala_require("0.16.0")
+set(VALAFLAGS ${VALAFLAGS}
+ --enable-deprecated
+ --debug
+ )
+
+include(GNUInstallDirs)
+set(DATADIR ${CMAKE_INSTALL_FULL_DATADIR})
+add_definitions("-DMDATADIR=\"${DATADIR}\"")
+add_definitions("-DSYSCONFDIR=\"${CMAKE_INSTALL_FULL_SYSCONFDIR}\"")
+add_definitions("-DLIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\"")
+add_definitions("-DDOCDIR=\"${CMAKE_INSTALL_FULL_DOCDIR}\"")
+
+add_definitions("-DENABLE_NLS=1")
+add_definitions("-DLOCALEDIR=\"${CMAKE_INSTALL_FULL_LOCALEDIR}\"")
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "/* # generated file (stub) */")
+add_definitions("-DHAVE_CONFIG_H=1")
+
+find_file (UNISTD unistd.h)
+if (UNISTD)
+ add_definitions("-DHAVE_UNISTD_H")
+endif ()
+
+if (UNIX)
+ find_file (SIGNAL signal.h)
+ if (SIGNAL)
+ add_definitions("-DHAVE_SIGNAL_H")
+ endif ()
+endif ()
+
+find_library (X11 X11)
+if (X11)
+ # Pass /usr/X11R6/include for OpenBSD
+ find_file (SCRNSAVER X11/extensions/scrnsaver.h /usr/X11R6/include)
+ find_library (XSS Xss /usr/lib/X11R6/lib)
+ if (SCRNSAVER AND XSS)
+ add_definitions("-DHAVE_X11_EXTENSIONS_SCRNSAVER_H")
+ set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${XSS};${X11}")
+ endif ()
+endif ()
+
+if (WIN32)
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_WIN32)
+endif ()
+
+if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_FREEBSD)
+endif ()
+
+if (${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_DRAGONFLY)
+ set(DFLY 1)
+endif ()
+
+if (APPLE)
+ add_definitions("-DHAVE_OSX=1")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_OSX)
+else ()
+ add_definitions("-DHAVE_OSX=0")
+endif ()
+
+# Check if execinfo.h header exists
+string(FIND ${CMAKE_SYSTEM_NAME} "BSD" BEGIN)
+if (${BEGIN} GREATER 0)
+ string(SUBSTRING ${CMAKE_SYSTEM_NAME} ${BEGIN} 3 BSD)
+else()
+ set(BSD 0)
+endif()
+if (UNIX AND NOT BSD AND NOT DFLY)
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_EXECINFO_H)
+endif ()
+
+find_package(PkgConfig)
+pkg_check_modules(DEPS REQUIRED
+ libxml-2.0>=2.6
+ sqlite3>=3.6.19
+ gmodule-2.0
+ gio-2.0>=2.32.3
+ libsoup-gnome-2.4>=2.27.90
+ )
+add_definitions("-DHAVE_LIBXML")
+add_definitions("-DGIO_VERSION=\"${DEPS_gio-2.0_VERSION}\"")
+add_definitions("-DLIBSOUP_VERSION=\"${DEPS_libsoup-gnome-2.4_VERSION}\"")
+set(PKGS posix linux libxml-2.0 sqlite3 gmodule-2.0 gio-2.0 libsoup-2.4)
+if (${DEPS_libsoup-gnome-2.4_VERSION} VERSION_GREATER "2.29.91")
+ add_definitions("-DHAVE_LIBSOUP_2_29_91")
+endif ()
+if (${DEPS_libsoup-gnome-2.4_VERSION} VERSION_GREATER "2.34.0")
+ add_definitions("-DHAVE_LIBSOUP_2_34_0")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_LIBSOUP_2_34_0)
+endif ()
+if (${DEPS_libsoup-gnome-2.4_VERSION} VERSION_GREATER "2.37.1")
+ add_definitions("-DHAVE_LIBSOUP_2_37_1")
+endif ()
+if (${DEPS_libsoup-gnome-2.4_VERSION} VERSION_GREATER "2.40.0")
+ # valac 0.16 didn't have the bindings yet
+ # For consistency we need to ensure C code makes the same assumptions
+ if (${VALA_VERSION} VERSION_GREATER "0.17.0")
+ add_definitions("-DHAVE_LIBSOUP_2_40_0")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_LIBSOUP_2_40_0)
+ endif ()
+endif ()
+
+if (WIN32)
+ add_definitions("-DLIBNOTIFY_VERSION=\"No\"")
+else ()
+ pkg_check_modules(NOTIFY REQUIRED libnotify)
+ add_definitions("-DLIBNOTIFY_VERSION=\"${NOTIFY_VERSION}\"")
+ add_definitions("-DHAVE_LIBNOTIFY")
+ set(OPTS_INCLUDE_DIRS "${OPTS_INCLUDE_DIRS};${NOTIFY_INCLUDE_DIRS}")
+ set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${NOTIFY_LIBRARIES}")
+ set(PKGS ${PKGS} libnotify)
+endif ()
+
+option(USE_GTK3 "Use GTK+3" OFF)
+option(HALF_BRO_INCOM_WEBKIT2 "Serve as a guniea pig" OFF)
+option(USE_ZEITGEIST "Zeitgeist history integration" ON)
+option(USE_GRANITE "Fancy notebook and pop-overs" OFF)
+option(USE_APIDOCS "API documentation" OFF)
+option(USE_GIR "Generate GObject Introspection bindings" OFF)
+option(EXTRA_WARNINGS "Additional compiler warnings" OFF)
+
+# GTK+3 is implied here, whether set or not
+if (USE_GRANITE OR HALF_BRO_INCOM_WEBKIT2)
+ set(USE_GTK3 ON)
+endif ()
+
+if (USE_GRANITE)
+ pkg_check_modules(GRANITE granite>=0.2)
+ set(OPTS_INCLUDE_DIRS "${OPTS_INCLUDE_DIRS};${GRANITE_INCLUDE_DIRS}")
+ set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${GRANITE_LIBRARIES}")
+ add_definitions("-DHAVE_GRANITE")
+ add_definitions("-DGRANITE_VERSION=\"${GRANITE_VERSION}\"")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_GRANITE)
+ set(PKGS ${PKGS} granite)
+else ()
+ add_definitions("-DGRANITE_VERSION=\"No\"")
+endif()
+
+if (USE_ZEITGEIST)
+ pkg_check_modules(ZEITGEIST zeitgeist-1.0>=0.3.14)
+ set(OPTS_INCLUDE_DIRS "${OPTS_INCLUDE_DIRS};${ZEITGEIST_INCLUDE_DIRS}")
+ set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${ZEITGEIST_LIBRARIES}")
+ add_definitions("-DHAVE_ZEITGEIST")
+ set(PKGS ${PKGS} zeitgeist-1.0)
+endif()
+
+if (USE_GTK3)
+ pkg_check_modules(GCR gcr-3>=2.32)
+ if (GCR_VERSION)
+ set(OPTS_INCLUDE_DIRS "${OPTS_INCLUDE_DIRS};${GCR_INCLUDE_DIRS}")
+ set(OPTS_LIBRARIES "${OPTS_LIBRARIES};${GCR_LIBRARIES}")
+ add_definitions("-DGCR_VERSION=\"${GCR_VERSION}\"")
+ add_definitions("-DHAVE_GCR")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_GCR)
+ else ()
+ add_definitions("-DGCR_VERSION=\"No\"")
+ endif ()
+else ()
+ add_definitions("-DGCR_VERSION=\"No\"")
+endif ()
+
+if (HALF_BRO_INCOM_WEBKIT2)
+ # Note: WebKitGTK+ 2.0.0 matches 1.11.91; 1.11.92 > 2.0.0
+ pkg_check_modules(DEPS_GTK REQUIRED
+ gtk+-3.0>=3.0.0
+ webkit2gtk-3.0>=1.11.91
+ javascriptcoregtk-3.0
+ )
+ add_definitions("-DHAVE_WEBKIT2")
+ add_definitions("-DGTK_VERSION=\"${DEPS_GTK_gtk+-3.0_VERSION}\"")
+ add_definitions("-DWEBKIT_VERSION=\"${DEPS_GTK_webkit2gtk-3.0_VERSION}\"")
+ set(PKGS ${PKGS} gtk+-3.0)
+ set(EXTRA_VAPIS ${EXTRA_VAPIS} "${CMAKE_SOURCE_DIR}/midori/webkit2gtk-3.0.vapi")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_GTK3)
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_WEBKIT2)
+ if (${DEPS_GTK_webkit2gtk-3.0_VERSION} VERSION_GREATER "2.3.90")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_WEBKIT2_3_91)
+ endif ()
+elseif (USE_GTK3)
+ pkg_check_modules(DEPS_GTK REQUIRED
+ gtk+-3.0>=3.0.0
+ webkitgtk-3.0>=1.8.1
+ javascriptcoregtk-3.0
+ )
+ add_definitions("-DGTK_VERSION=\"${DEPS_GTK_gtk+-3.0_VERSION}\"")
+ add_definitions("-DWEBKIT_VERSION=\"${DEPS_GTK_webkitgtk-3.0_VERSION}\"")
+ set(PKGS ${PKGS} gtk+-3.0)
+ set(EXTRA_VAPIS ${EXTRA_VAPIS} "${CMAKE_SOURCE_DIR}/midori/webkitgtk-3.0.vapi")
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_GTK3)
+else ()
+ pkg_check_modules(DEPS_GTK REQUIRED
+ gtk+-2.0>=2.24.0
+ webkit-1.0>=1.8.1
+ javascriptcoregtk-1.0
+ )
+ add_definitions("-DGTK_VERSION=\"${DEPS_GTK_gtk+-2.0_VERSION}\"")
+ add_definitions("-DWEBKIT_VERSION=\"${DEPS_GTK_webkit-1.0_VERSION}\"")
+ set(PKGS ${PKGS} gtk+-2.0)
+ set(EXTRA_VAPIS ${EXTRA_VAPIS} "${CMAKE_SOURCE_DIR}/midori/webkitgtk-3.0.vapi")
+endif ()
+
+# dh_translations detects this if there's no variable used
+set (GETTEXT_PACKAGE "midori")
+add_definitions("-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"")
+
+set(CFLAGS "${CFLAGS} -Wall -Wundef -Wno-deprecated-declarations -g")
+
+if (EXTRA_WARNINGS)
+ LIST(APPEND EXTRA_CFLAGS_LIST
+ -Wextra
+ -Wno-unused-parameter
+ -Wno-missing-field-initializers
+ -Wno-comment
+ -Waggregate-return
+ -Wredundant-decls
+ -Wshadow -Wpointer-arith -Wcast-align
+ -Winline -Wformat-security -fno-common
+ -Winit-self -Wundef
+ -Wnested-externs
+ )
+ string(REPLACE ";" " " EXTRA_CFLAGS "${EXTRA_CFLAGS_LIST}")
+ set(CFLAGS "${CFLAGS} ${EXTRA_CFLAGS}")
+else ()
+ if (REVISION)
+ set(CFLAGS "${CFLAGS} -Werror")
+ endif()
+endif ()
+
+# Explicitly add -fPIC for older toolchains
+set(VALA_CFLAGS "-w -g -fPIC")
+
+set(LIBMIDORI "${CMAKE_PROJECT_NAME}-core")
+
+# CMake provides no uninstall target by design
+add_custom_target (uninstall
+ COMMAND "xargs" "rm" "-v" "<" "install_manifest.txt")
+
+install(FILES AUTHORS COPYING ChangeLog EXPAT README DESTINATION ${CMAKE_INSTALL_DOCDIR})
+
+add_subdirectory (midori)
+add_subdirectory (extensions)
+enable_testing()
+add_subdirectory (tests)
+add_subdirectory (po)
+add_subdirectory (icons)
+add_subdirectory (data)
+add_subdirectory (config)
+
+if (USE_APIDOCS)
+ add_subdirectory (docs/api)
+endif ()
+if (USE_GIR)
+ add_subdirectory (gir)
+endif ()
diff -Nru midori-0.5.5/config/CMakeLists.txt midori-0.5.8/config/CMakeLists.txt
--- midori-0.5.5/config/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/config/CMakeLists.txt 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,23 @@
+# Copyright (C) 2013 Olivier Duchateau
+
+set (SYSCONFDIR ${CMAKE_INSTALL_FULL_SYSCONFDIR})
+set (XDG_CONFIG_DIR "xdg/${CMAKE_PROJECT_NAME}")
+
+file (GLOB_RECURSE CONFIG_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
+list (REMOVE_ITEM CONFIG_FILES "CMakeLists.txt")
+
+if (${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
+ set(CMAKE_INSTALL_SYSCONFDIR "/etc")
+endif()
+
+foreach (FILE ${CONFIG_FILES})
+ string (FIND ${FILE} "adblock" ADBLOCK_CONF)
+ if (ADBLOCK_CONF GREATER -1)
+ string (REPLACE "config" "" dirname ${FILE})
+ install (FILES ${FILE}
+ DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/${XDG_CONFIG_DIR}/${dirname}")
+ else ()
+ install (FILES ${FILE}
+ DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/${XDG_CONFIG_DIR}")
+ endif ()
+endforeach ()
diff -Nru midori-0.5.5/configure midori-0.5.8/configure
--- midori-0.5.5/configure 2013-08-14 18:32:02.000000000 +0000
+++ midori-0.5.8/configure 2014-04-03 21:23:17.000000000 +0000
@@ -1,157 +1,83 @@
#! /bin/sh
-
-# waf configure wrapper
-
-# Fancy colors used to beautify the output a bit.
#
-if [ "$NOCOLOR" ] ; then
- NORMAL=""
- BOLD=""
- RED=""
- YELLOW=""
- GREEN=""
-else
- NORMAL="\033[0m"
- BOLD="\033[1m"
- RED="\033[91m"
- YELLOW="\033[01;93m"
- GREEN="\033[92m"
+# Copyright (C) 2013 Christian Dywan
+#
+# 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.
+#
+#~ Usage:
+#~ ./configure [OPTIONS]
+#~ Options:
+#~ --prefix=PREFIX Installation prefix
+#~ --enable-gtk3 Use GTK+3
+#~ --disable-zeitgeist Disable Zeitgeist history integration
+#~ --enable-granite Fancy notebook and pop-overs
+#~ --enable-apidocs API documentation
+#~
+#~ Environment:
+#~ VALAC if defined the valac executable to use, for example valac-0.16
+#
+
+if [ -z `command -v cmake` ]; then
+ echo Fatal: cmake not installed
+ exit 1
fi
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_ERROR=2
-EXIT_BUG=10
-
-CUR_DIR=$PWD
-
-#possible relative path
-WORKINGDIR=`dirname $0`
-cd $WORKINGDIR
-#abs path
-WORKINGDIR=`pwd`
-cd $CUR_DIR
+while [ $# != 0 ]; do
+ case $1 in
+ --enable-gtk3)
+ ARGS="$ARGS -DUSE_GTK3=1";;
+ --disable-zeitgeist)
+ ARGS="$ARGS -DUSE_ZEITGEIST=0";;
+ --enable-granite)
+ ARGS="$ARGS -DUSE_GRANITE=1";;
+ --enable-apidocs)
+ ARGS="$ARGS -DUSE_APIDOCS=1";;
+ --extra-warnings)
+ ARGS="$ARGS -DEXTRA_WARNINGS=1";;
+ --prefix=*)
+ ARGS="$ARGS -DCMAKE_INSTALL_PREFIX=${1#*=}";;
+ *)
+ grep -e '^#~' $0 | sed s/#~//
+ exit
+ esac
+ shift
+done
-# Checks for Python interpreter. Honours $PYTHON if set. Stores path to
-# interpreter in $PYTHON.
-#
-checkPython()
-{
- if [ -z "$PYTHON" ] ; then
- PYTHON=`which python2 2>/dev/null`
- fi
- if [ -z "$PYTHON" ] ; then
- PYTHON=`which python 2>/dev/null`
- fi
- printf "Checking for Python\t\t\t: "
- if [ ! -x "$PYTHON" ] ; then
- printf $RED"not found!"$NORMAL"\n"
- echo "Please make sure that the Python interpreter is available in your PATH"
- echo "or invoke configure using the PYTHON flag, e.g."
- echo "$ PYTHON=/usr/local/bin/python configure"
- exit $EXIT_FAILURE
- fi
- printf $GREEN"$PYTHON"$NORMAL"\n"
-}
+BUILD_DIR="_build"
-# Checks for WAF. Honours $WAF if set. Stores path to 'waf' in $WAF.
-# Requires that $PYTHON is set.
-#
-checkWAF()
-{
- printf "Checking for WAF\t\t\t: "
- #installed miniwaf in sourcedir
- if [ -z "$WAF" ] ; then
- if [ -f "${WORKINGDIR}/waf" ] ; then
- WAF="${WORKINGDIR}/waf"
- if [ ! -x "$WAF" ] ; then
- chmod +x $WAF
- fi
- fi
- fi
- if [ -z "$WAF" ] ; then
- if [ -f "${WORKINGDIR}/waf-light" ] ; then
- ${WORKINGDIR}/waf-light --make-waf
- WAF="${WORKINGDIR}/waf"
- fi
- fi
- #global installed waf with waf->waf.py link
- if [ -z "$WAF" ] ; then
- WAF=`which waf 2>/dev/null`
- fi
- # neither waf nor miniwaf could be found
- if [ ! -x "$WAF" ] ; then
- printf $RED"not found"$NORMAL"\n"
- echo "Go to http://code.google.com/p/waf/"
- echo "and download a waf version"
- exit $EXIT_FAILURE
- else
- printf $GREEN"$WAF"$NORMAL"\n"
- fi
- WAF="$PYTHON $WAF"
-}
+if [ ! -f GNUmakefile ]; then
+ cp -v GNUmakefile.in GNUmakefile || exit 1
+fi
-# Generates a Makefile. Requires that $WAF is set.
-#
-generateMakefile()
-{
- cat > Makefile << EOF
-#!/usr/bin/make -f
-# Waf Makefile wrapper
-WAF_HOME=$CUR_DIR
-
-all:
- @$WAF build
-
-all-debug:
- @$WAF -v build
-
-all-progress:
- @$WAF -p build
-
-install:
- @if test -n "\$(DESTDIR)"; then \\
- $WAF install --destdir="\$(DESTDIR)"; \\
- else \\
- $WAF install; \\
- fi;
-
-.PHONY: install
-
-uninstall:
- @if test -n "\$(DESTDIR)"; then \\
- $WAF uninstall --destdir="\$(DESTDIR)"; \\
- else \\
- $WAF uninstall; \\
- fi;
-
-clean:
- @$WAF clean
-
-distclean:
- @$WAF distclean
- @-rm -rf _build
- @-rm -f Makefile
-
-check:
- @$WAF check
-
-dist:
- @$WAF dist
-
-EOF
-}
-
-checkPython
-checkWAF
-
-echo "calling waf configure with parameters"
-$WAF configure $* || exit $EXIT_ERROR
-
-if [ -f "Makefile" ] ; then
- echo ""
-else
- generateMakefile
+# cmake was invoked in toplevel folder before
+# clean up cmake generated build files to prevent conflicts
+if [ -f CMakeCache.txt ]; then
+ echo
+ echo '####################################################################################'
+ echo 'CMake build files detected in toplevel folder !!'
+ echo 'Please always run "cmake" command from distinct folder when you use cmake yourself.'
+ echo '####################################################################################'
+ echo
+ echo 'Cleaning up...'
+ echo
+
+ rm -fr $BUILD_DIR
+ rm CMakeCache.txt config.h Makefile
+ find . -iname CMakeFiles -type d|xargs rm -fr
+ find . -iname cmake_install.cmake -exec rm {} \;
+ find . -iname CTestTestfile.cmake -exec rm {} \;
+
+ find . -iname *-folders -type d|xargs rm -fr
+ rm -fr data/logo-shade
fi
-exit $EXIT_SUCCESS
+mkdir -p $BUILD_DIR && cd $BUILD_DIR || exit 1
+cmake $ARGS .. || exit 1
+
+echo
+echo "Configuring done, run \"make\" to compile"
diff -Nru midori-0.5.5/data/adblock/blocked.svg midori-0.5.8/data/adblock/blocked.svg
--- midori-0.5.5/data/adblock/blocked.svg 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/data/adblock/blocked.svg 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,46 @@
+
+
+
+
diff -Nru midori-0.5.5/data/adblock/disabled.svg midori-0.5.8/data/adblock/disabled.svg
--- midori-0.5.5/data/adblock/disabled.svg 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/data/adblock/disabled.svg 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,46 @@
+
+
+
+
diff -Nru midori-0.5.5/data/adblock/element_hider.js midori-0.5.8/data/adblock/element_hider.js
--- midori-0.5.5/data/adblock/element_hider.js 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/data/adblock/element_hider.js 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,25 @@
+function getElementsByAttribute (strTagName, strAttributeName, arrAttributeValue) {
+ var arrElements = document.getElementsByTagName (strTagName);
+ var arrReturnElements = new Array();
+ for (var j=0; j 0 && strAttributeValue.indexOf (oAttribute) != -1)
+ arrReturnElements.push (oCurrent);
+ }
+ }
+ return arrReturnElements;
+};
+
+function hideElementBySrc (uris) {
+ var oElements = getElementsByAttribute('img', 'src', uris);
+ if (oElements.length == 0)
+ oElements = getElementsByAttribute ('iframe', 'src', uris);
+ for (var i=0; i
+
+
+
diff -Nru midori-0.5.5/data/adblock.list midori-0.5.8/data/adblock.list
--- midori-0.5.5/data/adblock.list 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/data/adblock.list 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,55 @@
+[Adblock Plus 2.0]
+! Version: 201402142200
+! Title: Exercise
+! Last modified: 11 Feb 2014 22:00 UTC
+! Expires: 3 days (update frequency)
+! Homepage: http://www.midori-browser.org
+! Licence: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
+! Copyright (C) 2014 Christian Dywan
+!
+! Some freeform text:
+! Yadayada http://example.com/ e-mail (somebody@example.com).
+!
+!-----Spam eggs--------!
+! *** la:le/lu_foo_bar.txt ***
+|/http://ads.blub.boing/*$domain=xxx.com
+|/http://ads.blub.boing/*$domain=xxx.com,foo.fr,coco.at
+/market.php?$domain=adf.ly|foo.com
+/?placement=$script,domain=putlocker.com|sockshare.com
+
+! Some basic filters
+*ads.foo.bar*
+*ads.bogus.name*
+||^http://ads.bla.blub/*
+engine.adct.ru/*?
+/addyn|*|adtech;
+doubleclick.net/pfadx/*.mtvi
+objects.tremormedia.com/embed/xml/*.xml?r=
+videostrip.com^*/admatcherclient.
+test.dom/test?var
+/adpage.
+br.gcl.ru/cgi-bin/br/
+_300x600.
+_rectangle_ads.
++adverts/
+-2/ads/
+
+! CSS elements
+old.tv,delicio.us,longc.at###box
+##.zRightAdNote
+###advertisingModule160x600
+##a[href$="/vghd.shtml"]
+imagetwist.com###left[align="center"] > center > a[target="_blank"]
+
+! Options
+||videobox.com/?tid=$popup
+||sexsearchcom.com^$popup,third-party
+||206.217.206.137^$third-party
+/spopunder^$popup
+||putlocker.com^*.php?*title$subdocument
+://ads.$popup
+
+! Whitelist
+@@||hortifor.com/images/*120x60$~third-party
+@@||stickam.com/wb/www/category/300x250/$image
+@@||adultadworld.com/adhandler/$subdocument
diff -Nru midori-0.5.5/data/bookmarks/Create.sql midori-0.5.8/data/bookmarks/Create.sql
--- midori-0.5.5/data/bookmarks/Create.sql 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/data/bookmarks/Create.sql 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,91 @@
+CREATE TABLE IF NOT EXISTS bookmarks
+(
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ parentid INTEGER DEFAULT NULL,
+ title TEXT,
+ uri TEXT,
+ desc TEXT,
+ app INTEGER,
+ toolbar INTEGER,
+ pos_panel INTEGER,
+ pos_bar INTEGER,
+ created DATE DEFAULT CURRENT_TIMESTAMP,
+ last_visit DATE,
+ visit_count INTEGER DEFAULT 0,
+ nick TEXT,
+
+ FOREIGN KEY(parentid) REFERENCES bookmarks(id) ON DELETE CASCADE
+);
+
+/* trigger: insert panel position */
+CREATE TRIGGER IF NOT EXISTS bookmarkInsertPosPanel
+AFTER INSERT ON bookmarks FOR EACH ROW
+BEGIN UPDATE bookmarks SET pos_panel = (
+SELECT ifnull(MAX(pos_panel),0)+1 FROM bookmarks WHERE
+(NEW.parentid IS NOT NULL AND parentid = NEW.parentid)
+OR (NEW.parentid IS NULL AND parentid IS NULL))
+WHERE id = NEW.id; END;
+
+/* trigger: insert Bookmarkbar position */
+CREATE TRIGGER IF NOT EXISTS bookmarkInsertPosBar
+AFTER INSERT ON bookmarks FOR EACH ROW WHEN NEW.toolbar=1
+BEGIN UPDATE bookmarks SET pos_bar = (
+SELECT ifnull(MAX(pos_bar),0)+1 FROM bookmarks WHERE
+((NEW.parentid IS NOT NULL AND parentid = NEW.parentid)
+OR (NEW.parentid IS NULL AND parentid IS NULL)) AND toolbar=1)
+WHERE id = NEW.id; END;
+
+/* trigger: update panel position */
+CREATE TRIGGER IF NOT EXISTS bookmarkUpdatePosPanel
+BEFORE UPDATE OF parentid ON bookmarks FOR EACH ROW
+WHEN ((NEW.parentid IS NULL OR OLD.parentid IS NULL)
+AND NEW.parentid IS NOT OLD.parentid) OR
+((NEW.parentid IS NOT NULL AND OLD.parentid IS NOT NULL)
+AND NEW.parentid!=OLD.parentid)
+BEGIN UPDATE bookmarks SET pos_panel = pos_panel-1
+WHERE ((OLD.parentid IS NOT NULL AND parentid = OLD.parentid)
+OR (OLD.parentid IS NULL AND parentid IS NULL)) AND pos_panel > OLD.pos_panel;
+UPDATE bookmarks SET pos_panel = (
+SELECT ifnull(MAX(pos_panel),0)+1 FROM bookmarks
+WHERE (NEW.parentid IS NOT NULL AND parentid = NEW.parentid)
+OR (NEW.parentid IS NULL AND parentid IS NULL))
+WHERE id = OLD.id; END;
+
+/* trigger: update Bookmarkbar position */
+CREATE TRIGGER IF NOT EXISTS bookmarkUpdatePosBar0
+AFTER UPDATE OF parentid, toolbar ON bookmarks FOR EACH ROW
+WHEN ((NEW.parentid IS NULL OR OLD.parentid IS NULL)
+AND NEW.parentid IS NOT OLD.parentid)
+OR ((NEW.parentid IS NOT NULL AND OLD.parentid IS NOT NULL)
+AND NEW.parentid!=OLD.parentid) OR (OLD.toolbar=1 AND NEW.toolbar=0)
+BEGIN UPDATE bookmarks SET pos_bar = NULL WHERE id = NEW.id;
+UPDATE bookmarks SET pos_bar = pos_bar-1
+WHERE ((OLD.parentid IS NOT NULL AND parentid = OLD.parentid)
+OR (OLD.parentid IS NULL AND parentid IS NULL)) AND pos_bar > OLD.pos_bar; END;
+
+/* trigger: update Bookmarkbar position */
+CREATE TRIGGER IF NOT EXISTS bookmarkUpdatePosBar1
+BEFORE UPDATE OF parentid, toolbar ON bookmarks FOR EACH ROW
+WHEN ((NEW.parentid IS NULL OR OLD.parentid IS NULL)
+AND NEW.parentid IS NOT OLD.parentid) OR
+((NEW.parentid IS NOT NULL AND OLD.parentid IS NOT NULL)
+AND NEW.parentid!=OLD.parentid) OR (OLD.toolbar=0 AND NEW.toolbar=1)
+BEGIN UPDATE bookmarks SET pos_bar = (
+SELECT ifnull(MAX(pos_bar),0)+1 FROM bookmarks WHERE
+(NEW.parentid IS NOT NULL AND parentid = NEW.parentid)
+OR (NEW.parentid IS NULL AND parentid IS NULL))
+WHERE id = OLD.id; END;
+
+/* trigger: delete panel position */
+CREATE TRIGGER IF NOT EXISTS bookmarkDeletePosPanel
+AFTER DELETE ON bookmarks FOR EACH ROW
+BEGIN UPDATE bookmarks SET pos_panel = pos_panel-1
+WHERE ((OLD.parentid IS NOT NULL AND parentid = OLD.parentid)
+OR (OLD.parentid IS NULL AND parentid IS NULL)) AND pos_panel > OLD.pos_panel; END;
+
+/* trigger: delete Bookmarkbar position */
+CREATE TRIGGER IF NOT EXISTS bookmarkDeletePosBar
+AFTER DELETE ON bookmarks FOR EACH ROW WHEN OLD.toolbar=1
+BEGIN UPDATE bookmarks SET pos_bar = pos_bar-1
+WHERE ((OLD.parentid IS NOT NULL AND parentid = OLD.parentid)
+OR (OLD.parentid IS NULL AND parentid IS NULL)) AND pos_bar > OLD.pos_bar; END;
diff -Nru midori-0.5.5/data/bookmarks/Import_old_db_bookmarks.sql midori-0.5.8/data/bookmarks/Import_old_db_bookmarks.sql
--- midori-0.5.5/data/bookmarks/Import_old_db_bookmarks.sql 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/data/bookmarks/Import_old_db_bookmarks.sql 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,6 @@
+INSERT INTO main.bookmarks (parentid, title, uri, desc, app, toolbar)
+SELECT NULL AS parentid, title, uri, desc, app, toolbar
+FROM old_db.bookmarks;
+UPDATE main.bookmarks SET parentid = (
+SELECT id FROM main.bookmarks AS b1 WHERE b1.title = (
+SELECT folder FROM old_db.bookmarks WHERE title = main.bookmarks.title));
diff -Nru midori-0.5.5/data/CMakeLists.txt midori-0.5.8/data/CMakeLists.txt
--- midori-0.5.5/data/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000
+++ midori-0.5.8/data/CMakeLists.txt 2014-04-03 21:23:17.000000000 +0000
@@ -0,0 +1,58 @@
+# Copyright (C) 2013 Christian Dywan
+
+include(FindConvert)
+if (NOT CONVERT_FOUND)
+ message(FATAL_ERROR "rsvg-convert not found")
+endif ()
+
+include(FindIntltool)
+if (NOT INTLTOOL_MERGE_FOUND)
+ message(FATAL_ERROR "intltool-merge not found")
+elseif (NOT INTLTOOL_UPDATE_FOUND)
+ message(FATAL_ERROR "intltool-update not found")
+endif ()
+
+file(GLOB_RECURSE DATA_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
+list(REMOVE_ITEM DATA_FILES "CMakeLists.txt")
+
+foreach(FILE ${DATA_FILES})
+ if (${FILE} MATCHES "faq.")
+ install(FILES ${FILE} DESTINATION ${CMAKE_INSTALL_DOCDIR})
+ elseif (${FILE} MATCHES ".desktop")
+ if (NOT WIN32)
+ string(REPLACE ".desktop.in" "" DESKTOP_ID ${FILE})
+ INTLTOOL_MERGE_DESKTOP (${DESKTOP_ID} po)
+ endif ()
+ elseif (${FILE} MATCHES ".appdata.xml")
+ if (NOT WIN32)
+ string(REPLACE ".appdata.xml.in" "" DESKTOP_ID ${FILE})
+ INTLTOOL_MERGE_APPDATA (${DESKTOP_ID} po)
+ endif ()
+ elseif (${FILE} MATCHES "\\.svg$")
+ string(REPLACE ".svg" "" IMG_ID ${FILE})
+ string (FIND ${FILE} "/" IS_DIR)
+ if (IS_DIR GREATER -1)
+ string(REPLACE "/" ";" DIR_LIST ${FILE})
+ LIST(GET DIR_LIST 0 S_DIR)
+ SVG2PNG (${IMG_ID} "${CMAKE_INSTALL_DATADIR}/midori/res/${S_DIR}")
+ else ()
+ SVG2PNG (${IMG_ID} "${CMAKE_INSTALL_DATADIR}/midori/res/")
+ endif()
+ # These are being handled in add_executable for the "midori" binary
+ elseif (${FILE} MATCHES "\\.ico$")
+ elseif (${FILE} MATCHES "\\.rc$")
+ # This is only meant for testing, and not used in production
+ elseif (${FILE} MATCHES "\\.swf$")
+ else()
+ string(FIND ${FILE} "/" IS_DIR)
+ if (IS_DIR GREATER -1)
+ string(REPLACE "/" ";" DIR_LIST ${FILE})
+ LIST(GET DIR_LIST 0 S_DIR)
+ LIST(GET DIR_LIST 1 S_FILE)
+ install(FILES ${S_DIR}/${S_FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/midori/res/${S_DIR})
+ else ()
+ install(FILES ${FILE} DESTINATION ${CMAKE_INSTALL_DATADIR}/midori/res/)
+ endif()
+ endif()
+
+endforeach()
diff -Nru midori-0.5.5/data/error.html midori-0.5.8/data/error.html
--- midori-0.5.5/data/error.html 2013-08-14 18:32:02.000000000 +0000
+++ midori-0.5.8/data/error.html 2014-04-03 21:23:17.000000000 +0000
@@ -17,7 +17,7 @@
{suggestions}
-
+
Security features
@@ -283,7 +295,7 @@
-
+
Flash doesn't work
@@ -322,9 +334,11 @@
nspluginwrapper is a program that runs Flash and other Netscape plugins in a separate process. So a crash can't crash the whole browser and Flash, which is GTK+2 can run in GTK+3.
sudoapt-get install nspluginwrapper
+# On Debian/ Ubuntu - on other systems http://get.adobe.com/de/flashplayer/
+sudoapt-get install flashplugin-installer
+# cd into the folder where the plugin was installed
+nspluginwrapper -v-a-n-i libflashplayer.so
~/.mozilla can also be used with Adobe's tarball if system-wide install is not an option. The approach is confirmed to work with x86-64 as well.
@@ -612,12 +626,12 @@
+If changing system-wide font settings isn't bringing the desired results or rendering should be tweaked only for websites CSS can be an alternative. Add the following to ~/.local/share/midori/styles, then restart Midori and make sure that it is enabled Tools → Userstyles.
+