Ticket #50777: pmg_tk_platform.patch

File pmg_tk_platform.patch, 2.3 KB (added by howarth.at.macports@…, 9 years ago)

pmg_tk_platform.patch for py-pymol

  • modules/pmg_tk/PMGApp.py

    class PMGApp(Pmw.MegaWidget): 
    210210        self.fifo.put(cmmd)
    211211
    212212    def my_show(self,win,center=1):
    213         if sys.platform!='linux2':
     213        if (sys.platform!='linux2') and (sys.platform!='darwin'):
    214214            win.show()
    215215        else: # autocenter, deiconify, and run mainloop
    216216            # this is a workaround for a bug in the
    class PMGApp(Pmw.MegaWidget): 
    228228            win.deiconify()
    229229
    230230    def my_withdraw(self,win):
    231         if sys.platform!='linux2':
     231        if (sys.platform!='linux2') or (sys.platform!='darwin'):
    232232            win.withdraw()
    233233        else:
    234234            win.destroy()
  • modules/pmg_tk/skins/normal/__init__.py

    class Normal(PMGSkin): 
    271271        self.buttonArea.destroy()
    272272
    273273    def my_show(self,win,center=1):
    274         if sys.platform!='linux2':
     274        if (sys.platform!='linux2') and (sys.platform!='darwin'):
    275275            win.show()
    276276        else: # autocenter, deiconify, and run mainloop
    277277            # this is a workaround for a bug in the
    class Normal(PMGSkin): 
    290290#         win.show()
    291291           
    292292    def my_withdraw(self,win):
    293         if sys.platform!='linux2':
     293        if (sys.platform!='linux2') or (sys.platform!='darwin'):
    294294            win.withdraw()
    295295        else:
    296296            win.destroy()
    297297
    298298    def my_activate(self,win,center=1,focus=None):
    299         if sys.platform!='linux2':
     299        if (sys.platform!='linux2') and (sys.platform!='darwin'):
    300300            win.activate()
    301301        else: # autocenter, deiconify, and run mainloop
    302302            # this is a workaround for a bug in the
    class Normal(PMGSkin): 
    317317            win.mainloop()
    318318           
    319319    def my_deactivate(self,win):
    320         if sys.platform!='linux2':
     320        if (sys.platform!='linux2') or (sys.platform!='darwin'):
    321321            win.deactivate()
    322322        else: # autocenter, deiconify, and run mainloop
    323323            win.destroy()