How to use the mockup.Application.Actions function in mockup

To help you get started, we’ve selected a few mockup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gtimelog / gtimelog / mockup.py View on Github external
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"])

mockup

A collection of client side patterns for faster and easier web development

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

60 / 100
Full package analysis