Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2007-01-16 21:21:46 +0300
committerYann Leboulanger <asterix@lagaule.org>2007-01-16 21:21:46 +0300
commitf00ade01dd2e849e76ec357062f128622a04c5c1 (patch)
treeb6a7b9860a441b3b750616d1256b22bf7797c04d
parent68895b40f6da189ec722712710a9ef24ab990b88 (diff)
latest merge from trunk before string freeze
-rw-r--r--ChangeLog2
-rw-r--r--src/common/config.py2
-rw-r--r--src/htmltextview.py32
3 files changed, 18 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index bed489145..47e343746 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Gajim 0.11 (XX December 2006)
+Gajim 0.11 (19 December 2006)
* New build system, using GNU autotools. See README.html
* Support for link-local messaging via Zeroconf using Avahi (XEP-0174)
* Automatically connect and disconnect to accounts according to network availability (if Network Manager is present)
diff --git a/src/common/config.py b/src/common/config.py
index 8dd535fe7..414bf8d54 100644
--- a/src/common/config.py
+++ b/src/common/config.py
@@ -97,7 +97,7 @@ class Config:
'show_ascii_formatting_chars': [ opt_bool, True , _('If True, do not '
'remove */_ . So *abc* will be bold but with * * not removed.')],
'rst_formatting_outgoing_messages': [ opt_bool, False,
- _('Uses ReStructured text markup for HTML, plus ascii formatting if selected. (If you want to use this, install docutils)')],
+ _('Uses ReStructured text markup to send HTML, plus ascii formatting if selected. For syntax, see http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html (If you want to use this, install docutils)')],
'sounds_on': [ opt_bool, True ],
# 'aplay', 'play', 'esdplay', 'artsplay' detected first time only
'soundplayer': [ opt_str, '' ],
diff --git a/src/htmltextview.py b/src/htmltextview.py
index 2c195f233..f5c46b987 100644
--- a/src/htmltextview.py
+++ b/src/htmltextview.py
@@ -50,7 +50,7 @@ __all__ = ['HtmlTextView']
whitespace_rx = re.compile("\\s+")
allwhitespace_rx = re.compile("^\\s*$")
-## pixels = points * display_resolution
+# pixels = points * display_resolution
display_resolution = 0.3514598*(gtk.gdk.screen_height() /
float(gtk.gdk.screen_height_mm()))
@@ -266,7 +266,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
else:
- ## Workaround http://bugzilla.gnome.org/show_bug.cgi?id=317455
+ # Workaround http://bugzilla.gnome.org/show_bug.cgi?id=317455
def _get_current_style_attr(self, propname, comb_oper=None):
tags = [tag for tag in self.styles if tag is not None]
tags.reverse()
@@ -311,10 +311,10 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
font_size = attrs.font.get_size() / pango.SCALE
callback(frac*display_resolution*font_size, *args)
else:
- ## CSS says "Percentage values: refer to width of the closest
- ## block-level ancestor"
- ## This is difficult/impossible to implement, so we use
- ## textview width instead; a reasonable approximation..
+ # CSS says "Percentage values: refer to width of the closest
+ # block-level ancestor"
+ # This is difficult/impossible to implement, so we use
+ # textview width instead; a reasonable approximation..
alloc = self.textview.get_allocation()
self.__parse_length_frac_size_allocate(self.textview, alloc,
frac, callback, args)
@@ -331,8 +331,8 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
callback(float(value[:-2])*display_resolution*font_size, *args)
elif value.endswith('ex'): # x-height, ~ the height of the letter 'x'
- ## FIXME: figure out how to calculate this correctly
- ## for now 'em' size is used as approximation
+ # FIXME: figure out how to calculate this correctly
+ # for now 'em' size is used as approximation
attrs = self._get_current_attributes()
font_size = attrs.font.get_size() / pango.SCALE
callback(float(value[:-2])*display_resolution*font_size, *args)
@@ -405,7 +405,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
tag, "right-margin")
def _parse_style_font_weight(self, tag, value):
- ## TODO: missing 'bolder' and 'lighter'
+ # TODO: missing 'bolder' and 'lighter'
try:
weight = {
'100': pango.WEIGHT_ULTRALIGHT,
@@ -469,7 +469,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
tag.set_property("wrap_mode", gtk.WRAP_NONE)
- ## build a dictionary mapping styles to methods, for greater speed
+ # build a dictionary mapping styles to methods, for greater speed
__style_methods = dict()
for style in ["background-color", "color", "font-family", "font-size",
"font-style", "font-weight", "margin-left", "margin-right",
@@ -481,7 +481,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
else:
__style_methods[style] = method
del style
- ## --
+ # --
def _get_style_tags(self):
return [tag for tag in self.styles if tag is not None]
@@ -681,11 +681,11 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
self._jump_line()
elif name == 'img':
try:
- ## Max image size = 10 MB (to try to prevent DoS)
- mem = urllib2.urlopen(attrs['src']).read(10*1024*1024)
- ## Caveat: GdkPixbuf is known not to be safe to load
- ## images from network... this program is now potentially
- ## hackable ;)
+ # Max image size = 2 MB (to try to prevent DoS)
+ mem = urllib2.urlopen(attrs['src']).read(2*1024*1024)
+ # Caveat: GdkPixbuf is known not to be safe to load
+ # images from network... this program is now potentially
+ # hackable ;)
loader = gtk.gdk.PixbufLoader()
loader.write(mem); loader.close()
pixbuf = loader.get_pixbuf()