summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgue5t <gue5t@midori.launchpad>2015-08-23 19:44:01 -0500
committergue5t <gue5t@midori.launchpad>2015-08-23 19:44:01 -0500
commit3e2420a3d324e2033bcdf54e8ca3fe15dcde308c (patch)
treefbd50614408b0efa3e45d03af8ecc120ec5e78b9
parent207d5fed3f5c2765e72c2dd15a4bb4c50fb11bb4 (diff)
downloadmidori-3e2420a3d324e2033bcdf54e8ca3fe15dcde308c.tar.gz
simplify path handing and make a symlink at build-time to show adblock icons without install
-rw-r--r--icons/CMakeLists.txt2
-rw-r--r--katze/midori-paths.vala7
2 files changed, 4 insertions, 5 deletions
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index c4897b98..ddedf76d 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -1,5 +1,7 @@
# Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>
+EXECUTE_PROCESS(COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/hicolor)
+
macro(install_icon name cat size)
file(GLOB FILENAME RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${size}/${name}.*")
install(FILES ${FILENAME} DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${size}/${cat})
diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index 10a3a0bc..5209db01 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -185,8 +185,7 @@ namespace Midori {
}
#if !HAVE_WIN32
- string builtin_path = build_folder ("icons", null, "index.theme", true);
- Gtk.IconTheme.get_default ().append_search_path (builtin_path);
+ Gtk.IconTheme.get_default ().append_search_path (exec_path);
#endif
if (strcmp (Environment.get_variable ("MIDORI_DEBUG"), "paths") == 0) {
@@ -392,7 +391,7 @@ namespace Midori {
}
#if !HAVE_WIN32
- string? build_folder (string folder, string? middle, string filename, bool folder_only=false) {
+ string? build_folder (string folder, string? middle, string filename) {
/* Fallback to build folder */
File? parent = File.new_for_path (exec_path);
while (parent != null) {
@@ -400,8 +399,6 @@ namespace Midori {
if (middle != null)
data = data.get_child (middle);
var child = data.get_child (filename);
- if (folder_only && child.query_exists ())
- return data.get_path ();
if (child.query_exists ())
return child.get_path ();
parent = parent.get_parent ();