"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib/data.py" between
revelation-0.5.3.tar.xz and revelation-0.5.4.tar.xz

About: Revelation is a password manager for the GNOME 3 desktop.

data.py  (revelation-0.5.3.tar.xz):data.py  (revelation-0.5.4.tar.xz)
skipping to change at line 70 skipping to change at line 70
def __cb_clear_ring(self, widget): def __cb_clear_ring(self, widget):
"Handles cleartimer rings" "Handles cleartimer rings"
self.content = None self.content = None
self.contentpointer = 0 self.contentpointer = 0
self.set("", False) self.set("", False)
def __cb_get(self, clipboard, selectiondata, info, data): def __cb_get(self, clipboard, selectiondata, info, data):
"Returns text for clipboard requests" "Returns text for clipboard requests"
if self.content == None: if self.content is None:
text = "" text = ""
elif type(self.content) == list: elif type(self.content) == list:
if len(self.content) == 0: if len(self.content) == 0:
text = "" text = ""
else: else:
text = self.content[self.contentpointer] text = self.content[self.contentpointer]
skipping to change at line 142 skipping to change at line 142
class EntryClipboard(GObject.GObject): class EntryClipboard(GObject.GObject):
"A clipboard for entries" "A clipboard for entries"
def __init__(self): def __init__(self):
GObject.GObject.__init__(self) GObject.GObject.__init__(self)
self.clipboard = Gtk.Clipboard.get_for_display(display=Gdk.Display.get_d efault(), selection=Gdk.Atom.intern("_REVELATION_ENTRY",False)) self.clipboard = Gtk.Clipboard.get_for_display(display=Gdk.Display.get_d efault(), selection=Gdk.Atom.intern("_REVELATION_ENTRY",False))
self.__has_contents = False self.__has_contents = False
GObject.timeout_add(500, lambda: self.__check_contents()) GLib.timeout_add(500, lambda: self.__check_contents())
def __check_contents(self): def __check_contents(self):
"Callback which check the clipboard" "Callback which check the clipboard"
state = self.has_contents() state = self.has_contents()
if state != self.__has_contents: if state != self.__has_contents:
self.emit("content-toggled", state) self.emit("content-toggled", state)
self.__has_contents = state self.__has_contents = state
skipping to change at line 196 skipping to change at line 196
copystore = EntryStore() copystore = EntryStore()
for iter in entrystore.filter_parents(iters): for iter in entrystore.filter_parents(iters):
copystore.import_entry(entrystore, iter) copystore.import_entry(entrystore, iter)
xml = datahandler.RevelationXML().export_data(copystore) xml = datahandler.RevelationXML().export_data(copystore)
self.clipboard.set_text(xml,-1) self.clipboard.set_text(xml,-1)
self.__check_contents() self.__check_contents()
GObject.signal_new("content-toggled", EntryClipboard, GObject.SIGNAL_ACTION, GOb GObject.signal_new("content-toggled", EntryClipboard,
ject.TYPE_BOOLEAN, ( GObject.TYPE_BOOLEAN, )) GObject.SignalFlags.ACTION, GObject.TYPE_BOOLEAN,
( GObject.TYPE_BOOLEAN, ))
class EntrySearch(GObject.GObject): class EntrySearch(GObject.GObject):
"Handles searching in an EntryStore" "Handles searching in an EntryStore"
def __init__(self, entrystore): def __init__(self, entrystore):
GObject.GObject.__init__(self) GObject.GObject.__init__(self)
self.entrystore = entrystore self.entrystore = entrystore
self.folders = True self.folders = True
self.namedesconly = False self.namedesconly = False
skipping to change at line 361 skipping to change at line 363
else: else:
parents.append(child) parents.append(child)
return parents return parents
def folder_expanded(self, iter, expanded): def folder_expanded(self, iter, expanded):
"Sets the expanded state of an entry" "Sets the expanded state of an entry"
e = self.get_entry(iter) e = self.get_entry(iter)
if e == None or type(e) != entry.FolderEntry: if e is None or type(e) != entry.FolderEntry:
return return
elif expanded == True: elif expanded == True:
self.set_value(iter, COLUMN_ICON, e.openicon) self.set_value(iter, COLUMN_ICON, e.openicon)
else: else:
self.set_value(iter, COLUMN_ICON, e.icon) self.set_value(iter, COLUMN_ICON, e.icon)
def get_entry(self, iter): def get_entry(self, iter):
"Fetches data for an entry" "Fetches data for an entry"
skipping to change at line 563 skipping to change at line 565
else: else:
self.offset = int(time.time()) self.offset = int(time.time())
self.timeout = timeout self.timeout = timeout
def stop(self): def stop(self):
"Stops the timer" "Stops the timer"
self.offset = None self.offset = None
self.timeout = None self.timeout = None
GObject.signal_new("ring", Timer, GObject.SIGNAL_ACTION, GObject.TYPE_BOOLEAN, ( GObject.signal_new("ring", Timer, GObject.SignalFlags.ACTION,
)) GObject.TYPE_BOOLEAN, ())
class UndoQueue(GObject.GObject): class UndoQueue(GObject.GObject):
"Handles undo/redo tracking" "Handles undo/redo tracking"
def __init__(self): def __init__(self):
GObject.GObject.__init__(self) GObject.GObject.__init__(self)
self.queue = [] self.queue = []
self.pointer = 0 self.pointer = 0
skipping to change at line 647 skipping to change at line 650
if self.can_undo() == False: if self.can_undo() == False:
return None return None
cb_undo, name, actiondata = self.get_undo_action() cb_undo, name, actiondata = self.get_undo_action()
self.pointer -= 1 self.pointer -= 1
cb_undo(name, actiondata) cb_undo(name, actiondata)
self.emit("changed") self.emit("changed")
GObject.type_register(UndoQueue) GObject.type_register(UndoQueue)
GObject.signal_new("changed", UndoQueue, GObject.SIGNAL_ACTION, GObject.TYPE_BOO GObject.signal_new("changed", UndoQueue, GObject.SignalFlags.ACTION,
LEAN, ()) GObject.TYPE_BOOLEAN, ())
 End of changes. 6 change blocks. 
7 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)