mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-04 03:27:00 -05:00 
			
		
		
		
	IGN:Misc. fixes
This commit is contained in:
		
							parent
							
								
									3219cb3aa5
								
							
						
					
					
						commit
						c363b4361d
					
				@ -183,7 +183,12 @@ class CSSFlattener(object):
 | 
			
		||||
                elif value <= slineh:
 | 
			
		||||
                    cssdict[property] = "%0.5fem" % (dlineh / fsize)
 | 
			
		||||
                else:
 | 
			
		||||
                    value = round(value / slineh) * dlineh
 | 
			
		||||
                    try:
 | 
			
		||||
                        value = round(value / slineh) * dlineh
 | 
			
		||||
                    except:
 | 
			
		||||
                        self.oeb.logger.warning(
 | 
			
		||||
                                'Invalid length:', value)
 | 
			
		||||
                        value = 0.0
 | 
			
		||||
                    cssdict[property] = "%0.5fem" % (value / fsize)
 | 
			
		||||
 | 
			
		||||
    def flatten_node(self, node, stylizer, names, styles, psize, left=0):
 | 
			
		||||
 | 
			
		||||
@ -129,7 +129,12 @@ class Adder(QObject):
 | 
			
		||||
            mi = MetaInformation('', [_('Unknown')])
 | 
			
		||||
            self.critical[name] = open(opf, 'rb').read().decode('utf-8', 'replace')
 | 
			
		||||
        else:
 | 
			
		||||
            mi = MetaInformation(OPF(opf))
 | 
			
		||||
            try:
 | 
			
		||||
                mi = MetaInformation(OPF(opf))
 | 
			
		||||
            except:
 | 
			
		||||
                import traceback
 | 
			
		||||
                mi = MetaInformation('', [_('Unknown')])
 | 
			
		||||
                self.critical[name] = traceback.format_exc()
 | 
			
		||||
        if not mi.title:
 | 
			
		||||
            mi.title = os.path.splitext(name)[0]
 | 
			
		||||
        mi.title = mi.title if isinstance(mi.title, unicode) else \
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,8 @@
 | 
			
		||||
{% extends "!layout.html" %}
 | 
			
		||||
{% block sidebarlogo %}
 | 
			
		||||
{{ super() }}
 | 
			
		||||
        <p class="logo">
 | 
			
		||||
            <a href="http://calibre.kovidgoyal.net"><img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/></a>
 | 
			
		||||
        </p>
 | 
			
		||||
         <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
 | 
			
		||||
               <input type="hidden" name="cmd" value="_s-xclick" />
 | 
			
		||||
               <input type="hidden" name="hosted_button_id" value="3028915" />
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user