Show
Ignore:
Timestamp:
01/16/07 19:21:46 (23 months ago)
Author:
asterix
Message:

latest merge from trunk before string freeze

Location:
branches/gajim_0.11/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/common/config.py

    r7841 r7845  
    9898                        'remove */_ . So *abc* will be bold but with * * not removed.')], 
    9999                'rst_formatting_outgoing_messages': [ opt_bool, False, 
    100                         _('Uses ReStructured text markup for HTML, plus ascii formatting if selected. (If you want to use this, install docutils)')], 
     100                        _('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)')], 
    101101                'sounds_on': [ opt_bool, True ], 
    102102                # 'aplay', 'play', 'esdplay', 'artsplay' detected first time only 
  • branches/gajim_0.11/src/htmltextview.py

    r7829 r7845  
    5151allwhitespace_rx = re.compile("^\\s*$") 
    5252 
    53 ## pixels = points * display_resolution 
     53# pixels = points * display_resolution 
    5454display_resolution = 0.3514598*(gtk.gdk.screen_height() / 
    5555                                        float(gtk.gdk.screen_height_mm())) 
     
    267267        else: 
    268268                 
    269                 ## Workaround http://bugzilla.gnome.org/show_bug.cgi?id=317455 
     269                # Workaround http://bugzilla.gnome.org/show_bug.cgi?id=317455 
    270270                def _get_current_style_attr(self, propname, comb_oper=None): 
    271271                        tags = [tag for tag in self.styles if tag is not None] 
     
    312312                                callback(frac*display_resolution*font_size, *args) 
    313313                        else: 
    314                                 ## CSS says "Percentage values: refer to width of the closest 
    315                                 ##           block-level ancestor" 
    316                                 ## This is difficult/impossible to implement, so we use 
    317                                 ## textview width instead; a reasonable approximation.. 
     314                                # CSS says "Percentage values: refer to width of the closest 
     315                                #           block-level ancestor" 
     316                                # This is difficult/impossible to implement, so we use 
     317                                # textview width instead; a reasonable approximation.. 
    318318                                alloc = self.textview.get_allocation() 
    319319                                self.__parse_length_frac_size_allocate(self.textview, alloc, 
     
    332332 
    333333                elif value.endswith('ex'): # x-height, ~ the height of the letter 'x' 
    334                         ## FIXME: figure out how to calculate this correctly 
    335                         ##        for now 'em' size is used as approximation 
     334                        # FIXME: figure out how to calculate this correctly 
     335                        #        for now 'em' size is used as approximation 
    336336                        attrs = self._get_current_attributes() 
    337337                        font_size = attrs.font.get_size() / pango.SCALE 
     
    406406 
    407407        def _parse_style_font_weight(self, tag, value): 
    408                 ## TODO: missing 'bolder' and 'lighter' 
     408                # TODO: missing 'bolder' and 'lighter' 
    409409                try: 
    410410                        weight = { 
     
    470470          
    471471         
    472         ## build a dictionary mapping styles to methods, for greater speed 
     472        # build a dictionary mapping styles to methods, for greater speed 
    473473        __style_methods = dict() 
    474474        for style in ["background-color", "color", "font-family", "font-size", 
     
    482482                        __style_methods[style] = method 
    483483        del style 
    484         ## -- 
     484        # -- 
    485485 
    486486        def _get_style_tags(self): 
     
    682682                elif name == 'img': 
    683683                        try: 
    684                                 ## Max image size = 10 MB (to try to prevent DoS) 
    685                                 mem = urllib2.urlopen(attrs['src']).read(10*1024*1024) 
    686                                 ## Caveat: GdkPixbuf is known not to be safe to load 
    687                                 ## images from network... this program is now potentially 
    688                                 ## hackable ;) 
     684                                # Max image size = 2 MB (to try to prevent DoS) 
     685                                mem = urllib2.urlopen(attrs['src']).read(2*1024*1024) 
     686                                # Caveat: GdkPixbuf is known not to be safe to load 
     687                                # images from network... this program is now potentially 
     688                                # hackable ;) 
    689689                                loader = gtk.gdk.PixbufLoader() 
    690690                                loader.write(mem); loader.close()