Coding standards, include real date of 0.11 release in Changelog

This commit is contained in:
Jean-Marie Traissard 2007-01-16 17:30:40 +00:00
parent 9178c9cb13
commit 37bd1142f9
2 changed files with 16 additions and 16 deletions

View File

@ -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 * New build system, using GNU autotools. See README.html
* Support for link-local messaging via Zeroconf using Avahi (XEP-0174) * 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) * Automatically connect and disconnect to accounts according to network availability (if Network Manager is present)

View File

@ -50,7 +50,7 @@ __all__ = ['HtmlTextView']
whitespace_rx = re.compile("\\s+") whitespace_rx = re.compile("\\s+")
allwhitespace_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() / display_resolution = 0.3514598*(gtk.gdk.screen_height() /
float(gtk.gdk.screen_height_mm())) float(gtk.gdk.screen_height_mm()))
@ -266,7 +266,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
else: 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): def _get_current_style_attr(self, propname, comb_oper=None):
tags = [tag for tag in self.styles if tag is not None] tags = [tag for tag in self.styles if tag is not None]
tags.reverse() tags.reverse()
@ -311,10 +311,10 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
font_size = attrs.font.get_size() / pango.SCALE font_size = attrs.font.get_size() / pango.SCALE
callback(frac*display_resolution*font_size, *args) callback(frac*display_resolution*font_size, *args)
else: else:
## CSS says "Percentage values: refer to width of the closest # CSS says "Percentage values: refer to width of the closest
## block-level ancestor" # block-level ancestor"
## This is difficult/impossible to implement, so we use # This is difficult/impossible to implement, so we use
## textview width instead; a reasonable approximation.. # textview width instead; a reasonable approximation..
alloc = self.textview.get_allocation() alloc = self.textview.get_allocation()
self.__parse_length_frac_size_allocate(self.textview, alloc, self.__parse_length_frac_size_allocate(self.textview, alloc,
frac, callback, args) frac, callback, args)
@ -331,8 +331,8 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
callback(float(value[:-2])*display_resolution*font_size, *args) callback(float(value[:-2])*display_resolution*font_size, *args)
elif value.endswith('ex'): # x-height, ~ the height of the letter 'x' elif value.endswith('ex'): # x-height, ~ the height of the letter 'x'
## FIXME: figure out how to calculate this correctly # FIXME: figure out how to calculate this correctly
## for now 'em' size is used as approximation # for now 'em' size is used as approximation
attrs = self._get_current_attributes() attrs = self._get_current_attributes()
font_size = attrs.font.get_size() / pango.SCALE font_size = attrs.font.get_size() / pango.SCALE
callback(float(value[:-2])*display_resolution*font_size, *args) callback(float(value[:-2])*display_resolution*font_size, *args)
@ -405,7 +405,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
tag, "right-margin") tag, "right-margin")
def _parse_style_font_weight(self, tag, value): def _parse_style_font_weight(self, tag, value):
## TODO: missing 'bolder' and 'lighter' # TODO: missing 'bolder' and 'lighter'
try: try:
weight = { weight = {
'100': pango.WEIGHT_ULTRALIGHT, '100': pango.WEIGHT_ULTRALIGHT,
@ -469,7 +469,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
tag.set_property("wrap_mode", gtk.WRAP_NONE) 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() __style_methods = dict()
for style in ["background-color", "color", "font-family", "font-size", for style in ["background-color", "color", "font-family", "font-size",
"font-style", "font-weight", "margin-left", "margin-right", "font-style", "font-weight", "margin-left", "margin-right",
@ -481,7 +481,7 @@ class HtmlHandler(xml.sax.handler.ContentHandler):
else: else:
__style_methods[style] = method __style_methods[style] = method
del style del style
## -- # --
def _get_style_tags(self): def _get_style_tags(self):
return [tag for tag in self.styles if tag is not None] 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() self._jump_line()
elif name == 'img': elif name == 'img':
try: try:
## Max image size = 2 MB (to try to prevent DoS) # Max image size = 2 MB (to try to prevent DoS)
mem = urllib2.urlopen(attrs['src']).read(2*1024*1024) mem = urllib2.urlopen(attrs['src']).read(2*1024*1024)
## Caveat: GdkPixbuf is known not to be safe to load # Caveat: GdkPixbuf is known not to be safe to load
## images from network... this program is now potentially # images from network... this program is now potentially
## hackable ;) # hackable ;)
loader = gtk.gdk.PixbufLoader() loader = gtk.gdk.PixbufLoader()
loader.write(mem); loader.close() loader.write(mem); loader.close()
pixbuf = loader.get_pixbuf() pixbuf = loader.get_pixbuf()