Changeset 50

Show
Ignore:
Timestamp:
02/08/04 17:07:22 (5 years ago)
Author:
ug
Message:

Imported changes from bugfix branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 05/devel/kombilo.py

    r42 r50  
    9999        self.smartFixedColor = smartFixedColor 
    100100 
    101         if sys.platform.startswith('darwin'): 
    102             self.bound3 = self.bind('<M2-Button-1>', self.selStart) 
    103             self.bound3m = self.bind('<M2-B1-Motion>', self.selDrag) 
    104         else: 
    105             self.bound3 = self.bind('<Button-3>', self.selStart) 
    106             self.bound3m = self.bind('<B3-Motion>', self.selDrag) 
     101        self.boundM2_1 = self.bind('<M2-Button-1>', self.selStart) 
     102        self.boundM2_1m = self.bind('<M2-B1-Motion>', self.selDrag) 
     103        self.bound3 = self.bind('<Button-3>', self.selStart) 
     104        self.bound3m = self.bind('<B3-Motion>', self.selDrag) 
     105 
    107106        self.bounds1 = self.bind('<Shift-1>', self.wildcard) 
    108107 
     
    990989        b.unbind('<B3-Motion>', b.bound3m) 
    991990        b.unbind('<3>', b.bound3) 
     991        b.unbind('<M2-Button-1>', b.boundM2_1) 
     992        b.unbind('<M2-B1-Motion>', b.boundM2_1m) 
    992993        b.unbind('<Configure>', b.boundConf) 
    993994        b.bound3 = b.bind('<3>', lambda event, self=self, l = len(self.data): self.postMenu(event, l)) 
     
    13571358    def doCommand(self, i): 
    13581359        if self.customMenuCommands[i][0]: 
    1359             webbrowser.open(self.customMenuCommands[i][0], new=1) 
     1360            try: 
     1361                webbrowser.open(self.customMenuCommands[i][0], new=1) 
     1362            except: 
     1363                showwarning('Error', 'Failed to open the web browser.') 
    13601364        if self.customMenuCommands[i][3]:   # reset game list 
    13611365            self.master.reset() 
     
    60736077                               command=self.customizeApp) 
    60746078 
    6075         self.helpmenu.insert_command(2, label='Tutorial', underline=0, command= 
    6076                                      lambda s='file:'+os.path.abspath(os.path.join(self.basepath,'doc', 
    6077                                                                                        'tutorial.html')) : 
    6078                                      webbrowser.open(s, new=1)) 
     6079        self.helpmenu.insert_command(2, label='Tutorial', underline=0, command=self.showTutorial) 
     6080 
     6081 
     6082    def showTutorial(self): 
     6083        try: 
     6084            webbrowser.open('file:'+os.path.abspath(os.path.join(self.basepath,'doc','tutorial.html')),new=1) 
     6085        except: 
     6086            showwarning('Error', 'Failed to open the web browser.\nYou can find the tutorial as\n'+\ 
     6087                        'file:'+os.path.abspath(os.path.join(self.basepath,'doc','tutorial.html'))) 
    60796088         
    60806089