Merge lp:~gue5t/midori/builtInIcons2 into lp:~midori/midori/builtInIcons

Proposed by gue5t gue5t
Status: Merged
Merged at revision: 7026
Proposed branch: lp:~gue5t/midori/builtInIcons2
Merge into: lp:~midori/midori/builtInIcons
Diff against target: 45 lines (+6/-5)
2 files modified
icons/CMakeLists.txt (+4/-0)
katze/midori-paths.vala (+2/-5)
To merge this branch: bzr merge lp:~gue5t/midori/builtInIcons2
Reviewer Review Type Date Requested Status
Cris Dywan Pending
Review via email: mp+268864@code.launchpad.net

Commit message

simplify path handing and make a symlink at build-time to show adblock icons without install

Description of the change

I think this fulfills the required directory layout. Hopefully it's okay to invoke `ln`; as far as I could tell CMake doesn't have a built-in symlink command, but this works on any POSIX system (and isn't run on Windows).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'icons/CMakeLists.txt'
2--- icons/CMakeLists.txt 2015-08-09 20:44:57 +0000
3+++ icons/CMakeLists.txt 2015-08-24 01:04:00 +0000
4@@ -1,5 +1,9 @@
5 # Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>
6
7+if (UNIX)
8+ EXECUTE_PROCESS(COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/hicolor)
9+endif ()
10+
11 macro(install_icon name cat size)
12 file(GLOB FILENAME RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${size}/${name}.*")
13 install(FILES ${FILENAME} DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${size}/${cat})
14
15=== modified file 'katze/midori-paths.vala'
16--- katze/midori-paths.vala 2015-08-16 17:27:46 +0000
17+++ katze/midori-paths.vala 2015-08-24 01:04:00 +0000
18@@ -185,8 +185,7 @@
19 }
20
21 #if !HAVE_WIN32
22- string builtin_path = build_folder ("icons", null, "index.theme", true);
23- Gtk.IconTheme.get_default ().append_search_path (builtin_path);
24+ Gtk.IconTheme.get_default ().append_search_path (exec_path);
25 #endif
26
27 if (strcmp (Environment.get_variable ("MIDORI_DEBUG"), "paths") == 0) {
28@@ -392,7 +391,7 @@
29 }
30
31 #if !HAVE_WIN32
32- string? build_folder (string folder, string? middle, string filename, bool folder_only=false) {
33+ string? build_folder (string folder, string? middle, string filename) {
34 /* Fallback to build folder */
35 File? parent = File.new_for_path (exec_path);
36 while (parent != null) {
37@@ -400,8 +399,6 @@
38 if (middle != null)
39 data = data.get_child (middle);
40 var child = data.get_child (filename);
41- if (folder_only && child.query_exists ())
42- return data.get_path ();
43 if (child.query_exists ())
44 return child.get_path ();
45 parent = parent.get_parent ();

Subscribers

People subscribed via source and target branches

to all changes: