diff data/plugin/parser/text_x_arnica.py @ 340:cdf4d4fccd82

text_x_arnica: changed breakable word_length to self.thumbnail_width / 8 and also defined it in in init
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 21 Jan 2009 23:00:52 +0100
parents 7163e5cf5b77
children 21fd5f586a3b
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Wed Jan 21 22:49:41 2009 +0100
+++ b/data/plugin/parser/text_x_arnica.py	Wed Jan 21 23:00:52 2009 +0100
@@ -97,6 +97,7 @@
 
         self.arnica_image = {} # self.arnica_image[image] = (webnail, thumbnail, exif_date, description, order)
         self.Image = wikiutil.importWikiPlugin(self.request.cfg, "macro", "Image", function="Image")
+        self.breakable_word_length = self.thumbnail_width / 8
 
     def html_tools_restricted(self, this_target):
         """ shows restricted tools
@@ -212,7 +213,7 @@
         html = ''
         if self.show_text:
             html = '<div class="description"> %(this_alias)s</div>' % {
-                    "this_alias": self.to_wikitext(wikiutil.make_breakable(self.arnica_image[image][3], self.thumbnail_width / 9))}
+                    "this_alias": self.to_wikitext(wikiutil.make_breakable(self.arnica_image[image][3], self.breakable_word_length))}
         return html
 
     def html_arrange_thumbnails(self, image, selected_images):
@@ -222,7 +223,7 @@
         """
         title = ""
         if self.album and self.show_album_title:
-	    title = wikiutil.make_breakable(self.album_title or self.pagename, self.thumbnail_width / 9)
+            title = wikiutil.make_breakable(self.album_title or self.pagename, self.breakable_word_length)
             title = '<div class="title">%(n)d images (%(album_title)s)</div>' % {"n": len(self.arnica_image),
                                                         "album_title": title}
         html = """