deskbar-applet r2390 - in trunk: . doc doc/images



Author: sebp
Date: Sat Sep  6 12:54:31 2008
New Revision: 2390
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2390&view=rev

Log:
Added documentation about (get|set)_snippet and get_tooltip methods. Removed location where the modules are located, because the directory changed in 2.24.

Added:
   trunk/doc/docbook-xsl.css
   trunk/doc/new-style_modules.txt   (contents, props changed)
      - copied, changed from r2303, /trunk/doc/new-style_modules.txt
Modified:
   trunk/ChangeLog
   trunk/doc/images/uml_new-style.dia
   trunk/doc/images/uml_new-style.png

Added: trunk/doc/docbook-xsl.css
==============================================================================
--- (empty file)
+++ trunk/doc/docbook-xsl.css	Sat Sep  6 12:54:31 2008
@@ -0,0 +1,271 @@
+/*
+  CSS stylesheet for XHTML produced by DocBook XSL stylesheets.
+  Tested with XSL stylesheets 1.61.2, 1.67.2
+*/
+
+span.strong {
+  font-weight: bold;
+}
+
+body blockquote {
+  margin-top: .75em;
+  line-height: 1.5;
+  margin-bottom: .75em;
+}
+
+html body {
+  margin: 1em 5% 1em 5%;
+  line-height: 1.2;
+}
+
+body div {
+  margin: 0;
+}
+
+h1, h2, h3, h4, h5, h6,
+div.toc p b,
+div.list-of-figures p b,
+div.list-of-tables p b,
+div.abstract p.title
+{
+  color: #527bbd;
+  font-family: tahoma, verdana, sans-serif;
+}
+
+div.toc p:first-child,
+div.list-of-figures p:first-child,
+div.list-of-tables p:first-child,
+div.example p.title
+{
+  margin-bottom: 0.2em;
+}
+
+body h1 {
+  margin: .0em 0 0 -4%;
+  line-height: 1.3;
+  border-bottom: 2px solid silver;
+}
+
+body h2 {
+  margin: 0.5em 0 0 -4%;
+  line-height: 1.3;
+  border-bottom: 2px solid silver;
+}
+
+body h3 {
+  margin: .8em 0 0 -3%;
+  line-height: 1.3;
+}
+
+body h4 {
+  margin: .8em 0 0 -3%;
+  line-height: 1.3;
+}
+
+body h5 {
+  margin: .8em 0 0 -2%;
+  line-height: 1.3;
+}
+
+body h6 {
+  margin: .8em 0 0 -1%;
+  line-height: 1.3;
+}
+
+body hr {
+  border: none; /* Broken on IE6 */
+}
+div.footnotes hr {
+  border: 1px solid silver;
+}
+
+div.navheader th, div.navheader td, div.navfooter td {
+  font-family: sans-serif;
+  font-size: 0.9em;
+  font-weight: bold;
+  color: #527bbd;
+}
+div.navheader img, div.navfooter img {
+  border-style: none;
+}
+div.navheader a, div.navfooter a {
+  font-weight: normal;
+}
+div.navfooter hr {
+  border: 1px solid silver;
+}
+
+body td {
+  line-height: 1.2
+}
+
+body th {
+  line-height: 1.2;
+}
+
+ol {
+  line-height: 1.2;
+}
+
+ul, body dir, body menu {
+  line-height: 1.2;
+}
+
+html {
+  margin: 0; 
+  padding: 0;
+}
+
+body h1, body h2, body h3, body h4, body h5, body h6 {
+  margin-left: 0
+} 
+
+body pre {
+  margin: 0.5em 10% 0.5em 1em;
+  line-height: 1.0;
+  color: navy;
+}
+
+tt.literal, code.literal {
+  color: navy;
+}
+
+.programlisting, .screen {
+  border: 1px solid silver;
+  background: #f4f4f4;
+  margin: 0.5em 10% 0.5em 0;
+  padding: 0.5em 1em;
+}
+
+div.sidebar {
+  background: #ffffee;
+  margin: 1.0em 10% 0.5em 0;
+  padding: 0.5em 1em;
+  border: 1px solid silver;
+}
+div.sidebar * { padding: 0; }
+div.sidebar div { margin: 0; }
+div.sidebar p.title {
+  font-family: sans-serif;
+  margin-top: 0.5em;
+  margin-bottom: 0.2em;
+}
+
+div.bibliomixed {
+  margin: 0.5em 5% 0.5em 1em;
+}
+
+div.glossary dt {
+  font-weight: bold;
+}
+div.glossary dd p {
+  margin-top: 0.2em;
+}
+
+dl {
+  margin: .8em 0;
+  line-height: 1.2;
+}
+
+dt {
+  margin-top: 0.5em;
+}
+
+dt span.term {
+  font-style: normal;
+}
+
+div.variablelist dd p {
+  margin-top: 0;
+}
+
+div.itemizedlist li, div.orderedlist li {
+  margin-left: -0.8em;
+  margin-top: 0.5em;
+}
+
+ul, ol {
+    list-style-position: outside;
+}
+
+div.sidebar ul, div.sidebar ol {
+    margin-left: 2.8em;
+}
+
+div.itemizedlist p.title,
+div.orderedlist p.title,
+div.variablelist p.title
+{
+  margin-bottom: -0.8em;
+}
+
+div.revhistory table {
+  border-collapse: collapse;
+  border: none;
+}
+div.revhistory th {
+  border: none;
+  color: #527bbd;
+  font-family: tahoma, verdana, sans-serif;
+}
+div.revhistory td {
+  border: 1px solid silver;
+}
+
+/* Keep TOC and index lines close together. */
+div.toc dl, div.toc dt,
+div.list-of-figures dl, div.list-of-figures dt,
+div.list-of-tables dl, div.list-of-tables dt,
+div.indexdiv dl, div.indexdiv dt
+{
+  line-height: normal;
+  margin-top: 0;
+  margin-bottom: 0;
+}
+
+/*
+  Table styling does not work because of overriding attributes in
+  generated HTML.
+*/
+div.table table,
+div.informaltable table
+{
+    margin-left: 0;
+    margin-right: 5%;
+    margin-bottom: 0.8em;
+}
+div.informaltable table
+{
+    margin-top: 0.4em
+}
+div.table thead,
+div.table tfoot,
+div.table tbody,
+div.informaltable thead,
+div.informaltable tfoot,
+div.informaltable tbody
+{
+    /* No effect in IE6. */
+    border-top: 2px solid #527bbd;
+    border-bottom: 2px solid #527bbd;
+}
+div.table thead, div.table tfoot,
+div.informaltable thead, div.informaltable tfoot
+{
+    font-weight: bold;
+}
+
+div.mediaobject img {
+    border: 1px solid silver;
+    margin-bottom: 0.8em;
+}
+div.figure p.title,
+div.table p.title
+{
+  margin-top: 1em;
+  margin-bottom: 0.4em;
+}
+
+ media print {
+  div.navheader, div.navfooter { display: none; }
+}

Modified: trunk/doc/images/uml_new-style.dia
==============================================================================
Binary files. No diff available.

Modified: trunk/doc/images/uml_new-style.png
==============================================================================
Binary files. No diff available.

Copied: trunk/doc/new-style_modules.txt (from r2303, /trunk/doc/new-style_modules.txt)
==============================================================================
--- /trunk/doc/new-style_modules.txt	(original)
+++ trunk/doc/new-style_modules.txt	Sat Sep  6 12:54:31 2008
@@ -133,6 +133,7 @@
 		self._priority = 0
 		self._actions = []
 		self._default_action = None
+		self._snippet = None
 		self.__actions_hashes = set()
 		if "name" in args:
 			self._name = args["name"]
@@ -172,7 +173,13 @@
 		if not isinstance(iconname, str):
 			raise TypeError, "icon must be a string"
 		self._icon = iconname
-	
+
+	def get_snippet(self):
+		return self._snippet
+
+	def set_snippet(self, snippet):
+		self._snippet = snippet
+
 	def get_category(self):
 		return self._category
 	
@@ -221,6 +228,7 @@
 - `add_all_actions`: Calls `add_action` for each item in the supplied list.
 - `get_actions`: Returns a list of actions.
 - `get_default_action`: Returns the default action, if available, or `None`.
+- `set_snippet`: You can supply markup that will displayed in a new line under the Matche's `get_verb` value. This method is available since 2.24.
 
 [IMPORTANT]
 ===========================
@@ -263,7 +271,10 @@
 		
 	def get_verb(self):
 		raise NotImplementedError
-		
+
+	def get_tooltip(self, text=None):
+		return None
+
 	def get_name(self, text=None):
 		return {"name": self._name}
 	
@@ -287,6 +298,7 @@
 - `get_name`: Returns a dictionary whose entries will be used in the action string returned by `get_verb`. *Do not* escape the strings as they will be escaped automatically.
 - `is_valid`: Whether the action is still valid. E.g. if the action opens a file and it has been deleted, this method should return `False`.
 - `skip_history`: Whether the action should be stored in history.
+- `get_snippet`: Returns the tooltip markup string associated to this action. Override this method to display a tooltip when the user hovers over the match (the default action's tooltip is displayed) or over an action in the list of additional actions. This method is available since 2.24.
 
 Despite writing your own action you can make use of the basic actions shipped with Deskbar-Applet. The actions are located in the `deskbar.handlers.actions` module. It contains the actions
 
@@ -447,8 +459,8 @@
 
 To let Deskbar-Applet know what modules are available from your file you have to define a `HANDLERS` variable somewhere
 in your file as a list of names of classes. In this case this would look like `HANDLERS = ["MyModule"]`.
-Now either copy your Python file to `~/.gnome2/deskbar-applet/modules-2.20-compatible` or open the preferences dialog and drag the
-file onto the list of handlers and you're set.
+Now open the preferences dialog and drag the
+Python file onto the list of handlers and you're set.
 
 [NOTE]
 =============================================



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]