How to use the mockup.ReportView 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
self.task_pane = builder.get_object("task_pane")
        self.task_list = TaskList()
        swap_widget(builder, 'task_list', self.task_list)
        self.task_list.connect('row-activated', self.task_list_row_activated)
        self.bind_property('tasks', self.task_list, 'tasks', GObject.BindingFlags.DEFAULT)

        self.actions = self.Actions(self)
        self.actions.add_entry.set_enabled(False)
        self.actions.send_report.set_enabled(True)

        # couldn't figure out how to set action targets in the .ui file
        builder.get_object('daily_report_toggle').set_detailed_action_name('win.time-range::day')
        builder.get_object('weekly_report_toggle').set_detailed_action_name('win.time-range::week')
        builder.get_object('monthly_report_toggle').set_detailed_action_name('win.time-range::month')

        self.report_view = ReportView()
        swap_widget(builder, 'report_view', self.report_view)
        self.bind_property('timelog', self.report_view, 'timelog', GObject.BindingFlags.DEFAULT)
        self.bind_property('date', self.report_view, 'date', GObject.BindingFlags.DEFAULT)
        self.bind_property('time_range', self.report_view, 'time_range', GObject.BindingFlags.SYNC_CREATE)
        self.recipient_entry.bind_property('text', self.report_view, 'recipient', GObject.BindingFlags.SYNC_CREATE)

        # Workaround for a GTK+ 3.10 bug (https://bugzilla.gnome.org/show_bug.cgi?id=705673)
        builder.get_object('back_button').connect('button-press-event', self.disable_double_click)
        builder.get_object('forward_button').connect('button-press-event', self.disable_double_click)
        builder.get_object('today_button').connect('button-press-event', self.disable_double_click)

        mark_time('window created')

        self.load_settings()

        self.date = None  # initialize today's date

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