[Inteproxy-commits] r83 - in trunk: . inteproxy

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon May 7 14:31:32 CEST 2007


Author: bh
Date: 2007-05-07 14:31:32 +0200 (Mon, 07 May 2007)
New Revision: 83

Modified:
   trunk/ChangeLog
   trunk/inteproxy/gtkapp.py
Log:
* inteproxy/gtkapp.py (InteProxyTextView)
(InteProxyMainWindow.__init__): Move some of the TextView
initialization into the separate new class InteProxyTextView.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-05-04 18:05:20 UTC (rev 82)
+++ trunk/ChangeLog	2007-05-07 12:31:32 UTC (rev 83)
@@ -1,3 +1,9 @@
+2007-05-07  Bernhard Herzog  <bh at intevation.de>
+
+	* inteproxy/gtkapp.py (InteProxyTextView)
+	(InteProxyMainWindow.__init__): Move some of the TextView
+	initialization into the separate new class InteProxyTextView.
+
 2007-05-04  Bernhard Herzog  <bh at intevation.de>
 
 	Fix for issue #369

Modified: trunk/inteproxy/gtkapp.py
===================================================================
--- trunk/inteproxy/gtkapp.py	2007-05-04 18:05:20 UTC (rev 82)
+++ trunk/inteproxy/gtkapp.py	2007-05-07 12:31:32 UTC (rev 83)
@@ -67,6 +67,22 @@
     return result
 
 
+class InteProxyTextView(gtk.TextView):
+
+    """TextView with a few predefined tags and properties"""
+
+    def __init__(self, *args, **kw):
+        gtk.TextView.__init__(self, *args, **kw)
+
+        self.set_cursor_visible(False)
+
+        buf = self.get_buffer()
+        buf.create_tag("monospace", family="monospace")
+        buf.create_tag("centered", justification=gtk.JUSTIFY_CENTER)
+        buf.create_tag("default", wrap_mode=gtk.WRAP_WORD, editable=False)
+
+
+
 def run_fees_dialog(title, fees, access_constraints):
     """Shows fees and access_constraints information in a dialog
 
@@ -239,19 +255,14 @@
 
         # Create a text view with the contents of the mainwindow: The
         # InteProxy logo, a usage hint and the proxy URL.
-        textview = gtk.TextView();
+        textview = InteProxyTextView();
         sw.add(textview)
-        textview.set_cursor_visible(False)
         textview.set_pixels_above_lines(15)
         textview.set_left_margin(10)
         textview.set_right_margin(10)
 
         buf = textview.get_buffer()
 
-        buf.create_tag("monospace", family="monospace")
-        buf.create_tag("centered", justification=gtk.JUSTIFY_CENTER)
-        buf.create_tag("default", wrap_mode=gtk.WRAP_WORD, editable=False)
-
         bi = buf.get_iter_at_offset(0)
 
         buf.insert_pixbuf(bi, load_image("InteProxy-logo.png"))



More information about the Inteproxy-commits mailing list