How to use the mockup.FakePropertyAction 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 __init__(self, win):
            # On Ubuntu 14.04 LTS we must use FakePropertyAction
            # On Ubuntu 15.04 we can use Gio.PropertyAction
            # But what's the actual difference -- PyGI version?  GTK version?
            # What test do I make to determine which one to use?
            if gi.__version__ < '3.14':
                PropertyAction = FakePropertyAction
            else:
                PropertyAction = Gio.PropertyAction

            self.detail_level = PropertyAction.new("detail-level", win, "detail-level")
            win.add_action(self.detail_level)

            self.time_range = PropertyAction.new("time-range", win, "time-range")
            win.add_action(self.time_range)

            self.show_view_menu = PropertyAction.new("show-view-menu", win.view_button, "active")
            win.add_action(self.show_view_menu)

            self.show_task_pane = PropertyAction.new("show-task-pane", win.task_pane, "visible")
            win.add_action(self.show_task_pane)

            self.show_menu = PropertyAction.new("show-menu", win.menu_button, "active")

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

63 / 100
Full package analysis