# HG changeset patch # User Erik Grinaker # Date 1091975459 0 # Node ID 784a991e653d7433f4b9687f21273d051b0f52c4 # Parent fd3e65dfc154614ff79245af9f3d3beb16a3646c fixed some bugs introduced during development diff -r fd3e65dfc154614ff79245af9f3d3beb16a3646c -r 784a991e653d7433f4b9687f21273d051b0f52c4 ChangeLog --- a/ChangeLog Sun Aug 08 12:59:15 2004 +0000 +++ b/ChangeLog Sun Aug 08 14:30:59 2004 +0000 @@ -6,6 +6,8 @@ * merged the ui module into the widget module + * fixed some bugs introduced during development + 2004-08-07 Erik Grinaker * minor code cleanups diff -r fd3e65dfc154614ff79245af9f3d3beb16a3646c -r 784a991e653d7433f4b9687f21273d051b0f52c4 src/lib/data.py --- a/src/lib/data.py Sun Aug 08 12:59:15 2004 +0000 +++ b/src/lib/data.py Sun Aug 08 14:30:59 2004 +0000 @@ -324,7 +324,7 @@ # check the entry fields items = [ entry.name, entry.description ] - if self.namedesc: + if self.namedesc == gtk.FALSE: for field in entry.get_fields(): if field.value != "": items.append(field.value) diff -r fd3e65dfc154614ff79245af9f3d3beb16a3646c -r 784a991e653d7433f4b9687f21273d051b0f52c4 src/lib/datahandler/fpm.py --- a/src/lib/datahandler/fpm.py Sun Aug 08 12:59:15 2004 +0000 +++ b/src/lib/datahandler/fpm.py Sun Aug 08 14:30:59 2004 +0000 @@ -107,7 +107,7 @@ size = self.blocksize * blocks # add noise - data = data + "\x00" + self.string_random(size - len(data)) + data += "\x00" + self.string_random(size - len(data) - 1) # rotate and encrypt field data = self.__rotate_field(data) @@ -127,7 +127,7 @@ scrambled = "" for block in range(blocks): for offset in range(self.blocksize): - scrambled = scrambled + data[offset * blocks + block] + scrambled += data[offset * blocks + block] return scrambled diff -r fd3e65dfc154614ff79245af9f3d3beb16a3646c -r 784a991e653d7433f4b9687f21273d051b0f52c4 src/lib/datahandler/netrc.py --- a/src/lib/datahandler/netrc.py Sun Aug 08 12:59:15 2004 +0000 +++ b/src/lib/datahandler/netrc.py Sun Aug 08 14:30:59 2004 +0000 @@ -48,6 +48,7 @@ # only export entries which have a hostname, username and password if not entry.has_field(revelation.entry.FIELD_GENERIC_HOSTNAME) or not entry.has_field(revelation.entry.FIELD_GENERIC_USERNAME) or not entry.has_field(revelation.entry.FIELD_GENERIC_PASSWORD): + iter = entrystore.iter_traverse_next(iter) continue hostname = entry.get_field(revelation.entry.FIELD_GENERIC_HOSTNAME).value @@ -55,6 +56,7 @@ password = entry.get_field(revelation.entry.FIELD_GENERIC_PASSWORD).value if hostname == "" or username == "" or password == "": + iter = entrystore.iter_traverse_next(iter) continue diff -r fd3e65dfc154614ff79245af9f3d3beb16a3646c -r 784a991e653d7433f4b9687f21273d051b0f52c4 src/lib/dialog.py --- a/src/lib/dialog.py Sun Aug 08 12:59:15 2004 +0000 +++ b/src/lib/dialog.py Sun Aug 08 14:30:59 2004 +0000 @@ -243,7 +243,7 @@ Hig.__init__( self, parent, "Export to insecure file?", "The file format you have chosen is not encrypted. If anyone has access to the file, they will be able to read your passwords.", - gtk.STOCK_DIALOG_WARNING, [ [ gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL ], [ revelation.stock.STOCK_EXPORT, gtk.RESPONSE_OK ] ] + gtk.STOCK_DIALOG_WARNING, [ [ gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL ], [ revelation.stock.STOCK_EXPORT, gtk.RESPONSE_OK ] ], 0 ) @@ -573,6 +573,7 @@ entry = revelation.widget.Entry() entry.set_visibility(gtk.FALSE) + entry.set_max_length(32) entry.connect("changed", self.__cb_entry_changed) self.sect_passwords.add_inputrow(name, entry) diff -r fd3e65dfc154614ff79245af9f3d3beb16a3646c -r 784a991e653d7433f4b9687f21273d051b0f52c4 src/lib/widget.py --- a/src/lib/widget.py Sun Aug 08 12:59:15 2004 +0000 +++ b/src/lib/widget.py Sun Aug 08 14:30:59 2004 +0000 @@ -958,7 +958,7 @@ "Clears the data view" # only clear if containing an entry, or if forced - if force == gtk.FALSE or self.entry is None: + if force == gtk.FALSE and self.entry is None: return self.entry = None diff -r fd3e65dfc154614ff79245af9f3d3beb16a3646c -r 784a991e653d7433f4b9687f21273d051b0f52c4 src/revelation --- a/src/revelation Sun Aug 08 12:59:15 2004 +0000 +++ b/src/revelation Sun Aug 08 14:30:59 2004 +0000 @@ -134,7 +134,7 @@ ("/Edit/sep3", None, None, None, 0, ""), ("/Edit/_Find...", "F", "Search for an entry", lambda w,d: self.entry_find(), 0, "", gtk.STOCK_FIND), ("/Edit/Find Ne_xt", "G", "Find the next search match", lambda w,d: self.__entry_find(self, revelation.data.SEARCH_NEXT), 0, ""), - ("/Edit/Find Pre_vious", "G", "Find the previous search match", lambda w: self.__entry_find(self, revelation.data.SEARCH_PREV), 0, ""), + ("/Edit/Find Pre_vious", "G", "Find the previous search match", lambda w,d: self.__entry_find(self, revelation.data.SEARCH_PREV), 0, ""), ("/Edit/sep4", None, None, None, 0, ""), ("/Edit/_Select All", "A", "Select all entries", lambda w,d: self.tree.select_all(), 0, ""), ("/Edit/_Deselect All", "A", "Deselect all entries", lambda w,d: self.tree.unselect_all(), 0, ""), @@ -394,14 +394,14 @@ self.statusbar.set_status("Open failed") revelation.dialog.Error( self, "Invalid file format", - "The file '" + datafile.file + "' is not a valid data file." + "The file '" + datafile.file + "' contains invalid data." ).run() except revelation.entry.EntryError: self.statusbar.set_status("Open failed") revelation.dialog.Error( self, "Unknown data", - "The file '" + datafile.file + "' contained unknown data. It may have been created by a future version of Revelation, try upgrading to a newer version." + "The file '" + datafile.file + "' contains unknown data. It may have been created by a future version of Revelation, try upgrading to a newer version." ).run() except revelation.datahandler.VersionError: @@ -430,7 +430,6 @@ raise - def __file_save(self, datafile): "Saves data to a file"