Merge lp:~kalikiana/midori/rupo into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6382
Merged at revision: 6390
Proposed branch: lp:~kalikiana/midori/rupo
Merge into: lp:midori
Diff against target: 111 lines (+11/-31)
5 files modified
CMakeLists.txt (+2/-0)
data/CMakeLists.txt (+1/-0)
midori/midori-browser.c (+7/-5)
midori/midori-view.c (+1/-19)
tests/tab.vala (+0/-7)
To merge this branch: bzr merge lp:~kalikiana/midori/rupo
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+183770@code.launchpad.net

Commit message

Install top-level text files and FAQ html/ css to doc dir

To post a comment you must log in.
lp:~kalikiana/midori/rupo updated
6382. By Cris Dywan

Remove about:docs from list and unit tests

Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-09-07 20:38:45 +0000
3+++ CMakeLists.txt 2013-09-08 17:07:12 +0000
4@@ -197,6 +197,8 @@
5 add_custom_target (uninstall
6 COMMAND "xargs" "rm" "-v" "<" "install_manifest.txt")
7
8+install(FILES AUTHORS COPYING ChangeLog EXPAT README DESTINATION ${CMAKE_INSTALL_DOCDIR})
9+
10 add_subdirectory (midori)
11 add_subdirectory (po)
12 add_subdirectory (icons)
13
14=== modified file 'data/CMakeLists.txt'
15--- data/CMakeLists.txt 2013-09-01 21:08:28 +0000
16+++ data/CMakeLists.txt 2013-09-08 17:07:12 +0000
17@@ -15,6 +15,7 @@
18 string(FIND ${FILE} "midori." MIDORI_FILE)
19 string(FIND ${FILE} ".desktop" DESKTOP_FILE)
20 if (FAQ_FILE GREATER -1)
21+ install(FILES ${FILE} DESTINATION ${CMAKE_INSTALL_DOCDIR})
22 elseif (DESKTOP_FILE GREATER -1 AND NOT WIN32)
23 string(SUBSTRING ${FILE} 0 ${DESKTOP_FILE} DESKTOP_ID)
24 INTLTOOL_MERGE_DESKTOP (${DESKTOP_ID} po)
25
26=== modified file 'midori/midori-browser.c'
27--- midori/midori-browser.c 2013-09-08 11:09:40 +0000
28+++ midori/midori-browser.c 2013-09-08 17:07:12 +0000
29@@ -4788,7 +4788,12 @@
30 {
31 #ifdef G_OS_WIN32
32 gchar* path = midori_paths_get_data_filename ("doc/midori/faq.html", FALSE);
33- gboolean found = (g_access (path, F_OK) == 0);
34+ gchar* uri = g_filename_to_uri (path, NULL, NULL);
35+ g_free (path);
36+ return uri;
37+ #else
38+ gchar* path = midori_paths_get_res_filename ("faq.html");
39+ gboolean found = g_access (path, F_OK) == 0;
40 if (found)
41 {
42 gchar* uri = g_filename_to_uri (path, NULL, NULL);
43@@ -4796,11 +4801,8 @@
44 return uri;
45 }
46 g_free (path);
47- #else
48- if (g_access (DOCDIR "/faq.html", F_OK) == 0)
49- return g_strdup ("file://" DOCDIR "/faq.html");
50+ return g_strdup ("file://" DOCDIR "/faq.html");
51 #endif
52- return error ? g_strdup ("about:nodocs") : NULL;
53 }
54
55 static void
56
57=== modified file 'midori/midori-view.c'
58--- midori/midori-view.c 2013-09-03 14:45:17 +0000
59+++ midori/midori-view.c 2013-09-08 17:07:12 +0000
60@@ -3792,7 +3792,6 @@
61 "about:geolocation",
62 "about:home",
63 "about:new",
64- "about:nodocs",
65 "about:paths",
66 "about:private",
67 "about:search",
68@@ -3881,24 +3880,7 @@
69 else if (midori_uri_is_blank (uri))
70 {
71 data = NULL;
72- if (!strcmp (uri, "about:nodocs"))
73- {
74- gchar* title = g_strdup_printf (_("No documentation installed"));
75- data = g_strdup_printf (
76- "<html><head><title>%s</title></head>"
77- "<body><h1>%s</h1>"
78- "<img src=\"res://logo-shade.png\" "
79- "style=\"position: absolute; right: 15px; bottom: 15px; z-index: -9;\">"
80- "<p />There is no documentation installed at %s. "
81- "You may want to ask your distribution or "
82- "package maintainer for it or if this a custom build "
83- "verify that the build is setup properly. "
84- "<a href=\"http://wiki.xfce.org/midori/faq\">View the FAQ online</a>"
85- "</body></html>",
86- title, title, DOCDIR);
87- g_free (title);
88- }
89- else if (!strcmp (uri, "about:widgets"))
90+ if (!strcmp (uri, "about:widgets"))
91 {
92 static const gchar* widgets[] = {
93 "<input value=\"demo\"%s>",
94
95=== modified file 'tests/tab.vala'
96--- tests/tab.vala 2013-04-04 21:23:44 +0000
97+++ tests/tab.vala 2013-09-08 17:07:12 +0000
98@@ -102,13 +102,6 @@
99 assert (tab.special);
100 assert (!tab.can_save ());
101
102- tab.set_uri ("about:nodocs");
103- do { loop.iteration (true); } while (tab.load_status != Midori.LoadStatus.FINISHED);
104- assert (tab.is_blank ());
105- assert (!tab.can_view_source ());
106- assert (tab.special);
107- assert (!tab.can_save ());
108-
109 tab.set_uri ("http://.invalid");
110 do { loop.iteration (true); } while (tab.load_status != Midori.LoadStatus.FINISHED);
111 assert (!tab.is_blank ());

Subscribers

People subscribed via source and target branches

to all changes: