Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/help/en/HelpApi.htm
blob: 3bb53d253c69ef6df9a085df9fee35ed61aea1dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<h1>Why this Template? </h1>
<p>The installed base, of more than 1.6 Million XO's in the world, has a defect in the Webview gtk widget . The following code on line 156 of webview.py adjusts the visibility of the html widget  by making its top level parent invisible (invisibility passes from parent to child): 
<pre>	def set_visibility(self, visibility):
	 	logging.debug(&quot;nsIEmbeddingSiteWindow.set_visibility: %r&quot; % visibility)
	  		if visibility:
				self.web_view.show()
				self.web_view.get_toplevel().show()
		  	else:
				self.web_view.get_toplevel().hide()


This makes it difficult to use the webview widget in applications that want to display html based Help because
when you want to hide the help widget, you simultaneously end up hiding the rest of your application.
 (The most recent build 852 code based upon Fedora Core 11 has corrected this shortcoming).


This HelpTemplate demonstrates how create a new and separate window, so that the hide toplevel doesn't hide the rest of 
your application. In order to use this strategy, you will need to create the same number of tabs on the
help page so that the user doesn't percieve that he is actually on a separate top level window.


Admittedly, it's a little kludgey, but it will permit your Activity's help pages to function on older sugar builds.</pre>
</p>
</body>
</html>