Commit ad79ed07 authored by M. Sandoval's avatar M. Sandoval 🥑
Browse files

Merge branch 'minor-bug-fixes' into 'master'

Do not allow searching on group  edit page & minor cleanups

See merge request !482
parents 66382793 278760c2
Pipeline #253609 passed with stages
in 9 minutes and 36 seconds
......@@ -3,11 +3,9 @@ from gi.repository import Gtk
class ContainerPage(Gtk.Box):
development_mode = NotImplemented
headerbar = NotImplemented
def __init__(self, headerbar, development_mode):
Gtk.Box.__init__(self, spacing=1)
super().__init__()
self.show_all()
self.development_mode = development_mode
self.headerbar = headerbar
......
......@@ -37,6 +37,7 @@ class CreateDatabase(Gtk.Stack):
def __init__(self, window, widget, dbm, back_button):
super().__init__()
self.database_manager = dbm
self.window = window
self.parent_widget = widget
......
......@@ -12,15 +12,6 @@ if typing.TYPE_CHECKING:
class CustomKeypressHandler:
#
# Global Variables
#
unlocked_database = NotImplemented
#
# Init
#
def __init__(self, u_d):
self.unlocked_database = u_d
......
......@@ -207,9 +207,11 @@ class DatabaseManager(GObject.GObject):
self.emit("element-moved", safe_entry, old_location, new_location)
def set_element_atime(self, element):
# TODO Move to safe_element method.
element.atime = datetime.now()
def set_element_mtime(self, element):
# TODO Move to safe_element method.
element.mtime = datetime.now()
# Move an group
......
......@@ -27,7 +27,8 @@ class EntryRow(Gtk.ListBoxRow):
type = "EntryRow"
def __init__(self, database: UnlockedDatabase, safe_entry: SafeEntry) -> None:
Gtk.ListBoxRow.__init__(self)
super().__init__()
self.get_style_context().add_class("row")
self._safe_entry: SafeEntry = safe_entry
......
......@@ -25,7 +25,8 @@ class GroupRow(Gtk.ListBoxRow):
type = "GroupRow"
def __init__(self, unlocked_database, safe_group):
Gtk.ListBoxRow.__init__(self)
super().__init__()
self.get_style_context().add_class("row")
assert isinstance(safe_group, SafeGroup)
......
......@@ -43,6 +43,7 @@ class MainWindow(Handy.ApplicationWindow):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.application = self.get_application()
self.welcome_page = WelcomePage()
self.recent_files_page = RecentFilesPage()
......
......@@ -21,6 +21,7 @@ class Pathbar(Gtk.Box):
def __init__(self, unlocked_database, dbm):
super().__init__()
self.set_name("Pathbar")
self.unlocked_database = unlocked_database
self.database_manager = dbm
......
......@@ -27,6 +27,7 @@ class KeyFileFilter(Gtk.FileFilter):
def __init__(self):
super().__init__()
self.set_name(_("Keyfile"))
self.add_mime_type("application/octet-stream")
self.add_mime_type("application/x-keepass2")
......@@ -39,7 +40,6 @@ class UnlockDatabase:
builder = NotImplemented
parent_widget = NotImplemented
window = NotImplemented
database_filepath = NotImplemented
hdy_page = NotImplemented
unlock_database_stack_switcher = NotImplemented
......
......@@ -157,6 +157,9 @@ class UnlockedDatabase(GObject.GObject):
self.start_database_lock_timer()
self.props.current_element = element
if self.props.search_active:
self.props.search_active = False
# Sets the accessed time.
self.database_manager.set_element_atime(element.element)
......
......@@ -14,6 +14,7 @@ class WelcomePage(Gtk.Box):
def __init__(self):
"""Welcome Page widget"""
super().__init__()
pix = Pixbuf.new_from_resource_at_scale(
"/org/gnome/PasswordSafe/images/welcome.png", 256, 256, True)
self._app_logo.set_from_pixbuf(pix)
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