Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def do_startup(self):
mark_time("in app startup")
self.check_schema()
self.create_data_directory()
Gtk.Application.do_startup(self)
mark_time("basic app startup done")
builder = Gtk.Builder.new_from_file(MENUS_UI_FILE)
self.set_app_menu(builder.get_object('app_menu'))
mark_time("menus loaded")
self.actions = self.Actions(self)
if not hasattr(self, 'set_accels_for_action'):
self.set_accels_for_action = self.fallback_set_accels
self.set_accels_for_action("win.detail-level::chronological", ["1"])
self.set_accels_for_action("win.detail-level::grouped", ["2"])
self.set_accels_for_action("win.detail-level::summary", ["3"])
self.set_accels_for_action("win.time-range::day", ["4"])
self.set_accels_for_action("win.time-range::week", ["5"])
self.set_accels_for_action("win.time-range::month", ["6"])
self.set_accels_for_action("win.show-task-pane", ["F9"])
self.set_accels_for_action("win.show-menu", ["F10"])
self.set_accels_for_action("win.go-back", ["Left"])
self.set_accels_for_action("win.go-forward", ["Right"])
self.set_accels_for_action("win.go-home", ["Home"])
self.set_accels_for_action("app.edit-log", ["E"])