Commit 624f5069 authored by Maximiliano's avatar Maximiliano 🥑 Committed by Maximiliano
Browse files

Standardize how parent classes are initialized

parent b1dbbf18
......@@ -7,7 +7,8 @@ class ContainerPage(Gtk.Box):
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
......
......@@ -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")
......
......@@ -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