Miscellanuous fixes to lrf2lrs

This commit is contained in:
Kovid Goyal 2008-02-02 18:55:51 +00:00
parent 5e8399a4f1
commit 6612be8017

View File

@ -51,6 +51,7 @@ class LRFObject(object):
@staticmethod @staticmethod
def tag_to_val(h, obj, tag, stream): def tag_to_val(h, obj, tag, stream):
val = None
if h[1] == 'D': if h[1] == 'D':
val = tag.dword val = tag.dword
elif h[1] == 'W': elif h[1] == 'W':
@ -886,7 +887,7 @@ class Button(LRFObject):
0xF561: ['button_flags','W'], #<Button/> 0xF561: ['button_flags','W'], #<Button/>
0xF562: ['','do_base_button'], #<BaseButton> 0xF562: ['','do_base_button'], #<BaseButton>
0xF563: ['',''], #</BaseButton> 0xF563: ['',''], #</BaseButton>
0xF564: ['','do_focusin_button'], #<FocusinButton> 0xF564: ['','do_focus_in_button'], #<FocusinButton>
0xF565: ['',''], #</FocusinButton> 0xF565: ['',''], #</FocusinButton>
0xF566: ['','do_push_button'], #<PushButton> 0xF566: ['','do_push_button'], #<PushButton>
0xF567: ['',''], #</PushButton> 0xF567: ['',''], #</PushButton>
@ -910,7 +911,7 @@ class Button(LRFObject):
LRFObject.__init__(self, document, stream, id, scramble_key, boundary) LRFObject.__init__(self, document, stream, id, scramble_key, boundary)
def do_ref_image(self, tag, f): def do_ref_image(self, tag, f):
self.refimage[self.button_yype] = tag.dword self.refimage[self.button_type] = tag.dword
def do_base_button(self, tag, f): def do_base_button(self, tag, f):
self.button_type = 0 self.button_type = 0