Kaydet (Commit) 9cf00dd5 authored tarafından Jack Jansen's avatar Jack Jansen

Updated to optionally use Carbon Scrap manager.

üst ad8381a8
......@@ -141,7 +141,10 @@ class TEWindow(ScrolledWindow):
def menu_cut(self):
self.ted.TESelView()
self.ted.TECut()
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
TE.TEToScrap()
self.updatescrollbars()
self.parent.updatemenubar()
......@@ -149,7 +152,10 @@ class TEWindow(ScrolledWindow):
def menu_copy(self):
self.ted.TECopy()
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
TE.TEToScrap()
self.updatescrollbars()
self.parent.updatemenubar()
......@@ -226,8 +232,13 @@ class Ped(Application):
if hasattr(Scrap, 'InfoScrap'):
on = (Scrap.InfoScrap()[0] <> 0)
else:
# Not there yet on Carbon, simply always enable
on = 1
flavors = Scrap.GetCurrentScrap().GetScrapFlavorInfoList()
for tp, info in flavors:
if tp == 'TEXT':
on = 1
break
else:
on = 0
if on <> self.pastegroup_on:
self.pasteitem.enable(on)
self.pastegroup_on = on
......
......@@ -297,14 +297,19 @@ class WasteWindow(ScrolledWindow):
def menu_cut(self):
self.ted.WESelView()
self.ted.WECut()
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
self.ted.WECut()
self.updatescrollbars()
self.parent.updatemenubar()
def menu_copy(self):
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
self.ted.WECopy()
self.updatescrollbars()
self.parent.updatemenubar()
......
......@@ -235,14 +235,19 @@ class WasteWindow(ScrolledWindow):
def menu_cut(self):
self.ted.WESelView()
self.ted.WECut()
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
self.ted.WECut()
self.updatescrollbars()
self.parent.updatemenubar()
def menu_copy(self):
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
self.ted.WECopy()
self.updatescrollbars()
self.parent.updatemenubar()
......
......@@ -190,15 +190,20 @@ class WasteWindow(ScrolledWindow):
def menu_cut(self):
self.ted.WESelView()
self.ted.WECut()
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
self.ted.WECut()
self.updatescrollbars()
self.parent.updatemenubar()
self.changed = 1
def menu_copy(self):
Scrap.ZeroScrap()
if hasattr(Scrap, 'ZeroScrap'):
Scrap.ZeroScrap()
else:
Scrap.ClearCurrentScrap()
self.ted.WECopy()
self.updatescrollbars()
self.parent.updatemenubar()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment