[rkward-cvs] SF.net SVN: rkward:[2800] trunk/rkward/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Mar 22 12:26:03 UTC 2010


Revision: 2800
          http://rkward.svn.sourceforge.net/rkward/?rev=2800&view=rev
Author:   tfry
Date:     2010-03-22 12:26:03 +0000 (Mon, 22 Mar 2010)

Log Message:
-----------
Add a caption to the navigation box to clarify that these are local links, not links to different pages

Modified Paths:
--------------
    trunk/rkward/rkward/pages/rkward_help.css
    trunk/rkward/rkward/windows/rkhtmlwindow.cpp

Modified: trunk/rkward/rkward/pages/rkward_help.css
===================================================================
--- trunk/rkward/rkward/pages/rkward_help.css	2010-03-22 12:08:37 UTC (rev 2799)
+++ trunk/rkward/rkward/pages/rkward_help.css	2010-03-22 12:26:03 UTC (rev 2800)
@@ -50,6 +50,13 @@
 	border: 1px solid silver;
 }
 
+#navigation h1 {
+	font-size: 1em;
+	color: gray;
+	margin-top: 0em;
+	margin-bottom: 0.5em;
+}
+
 #navigation p {
 	font-size: 0.9em;
 	margin-top: 0em;

Modified: trunk/rkward/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2010-03-22 12:08:37 UTC (rev 2799)
+++ trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2010-03-22 12:26:03 UTC (rev 2800)
@@ -576,19 +576,15 @@
 
 		// create a navigation bar
 		KUrl url_copy = url;
-		QString navigation;
-		QStringList::const_iterator names_it = anchornames.constBegin ();
-		for (QStringList::const_iterator it = anchors.constBegin (); it != anchors.constEnd (); ++it) {
-			if (!((*it).isNull () || (*names_it).isNull ())) {
-				url_copy.setRef (*it);
-				navigation.append ("<p><a href=\"" + url_copy.url () + "\">" + *names_it + "</a></p>\n");
+		QString navigation = i18n ("<h1>On this page:</h1>");
+		RK_ASSERT (anchornames.size () == anchors.size ());
+		for (int i = 0; i < anchors.size (); ++i) {
+			QString anchor = anchors[i];
+			QString anchorname = anchornames[i];
+			if (!(anchor.isEmpty () || anchorname.isEmpty ())) {
+				url_copy.setRef (anchor);
+				navigation.append ("<p><a href=\"" + url_copy.url () + "\">" + anchorname + "</a></p>\n");
 			}
-
-			if (names_it != anchornames.constEnd ()) {
-				++names_it;
-			} else {
-				RK_ASSERT (false);
-			}
 		}
 		khtmlpart->write ("</div><div id=\"navigation\">" + navigation + "</div>");
 		khtmlpart->write ("</body></html>\n");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list