Commits

windwiny committed 693f94e

linux gnome2 use wx.Clipboard() cannot get Filenames bug

Comments (0)

Files changed (1)

         fn = fn1 = fn2 = ''
         self.txtSRC.SetValue('')
         self.txtDST.SetValue('')
-        clip = wx.Clipboard()
+        clip = wx.TheClipboard
         if clip.Open():
             cf = wx.FileDataObject()
             if clip.GetData(cf):
                         fn = os.path.dirname(fs[0]).replace('\\', '/')
                     else:
                         fn = fs[0].replace('\\', '/')
+            clip.Close()
         if fn:
             fn1, fn2 = G.getlr(l=fn)
             if not fn2: