def _change_layout(self, radio_menu_item: Gtk.RadioMenuItem): if not self._reloading and radio_menu_item.get_active(): function_key = radio_menu_item.function_key event = UserEvent(time=Gtk.get_current_event_time()) event.parameters = [function_key] import pocoy.service as service service.call(self.monitors.setprimarylayout, event)
def _change_decorations(self, check_menu_item: Gtk.CheckMenuItem): to_remove = check_menu_item.get_active() configurations.set_remove_decorations(to_remove) import pocoy.service as service service.call(self.windows.decorate, None)
def test_dont_end_long_conversation(self): service.reading.is_transient = lambda: False service.call(self.foo, UserEvent()) service.reading.end.assert_not_called()
def test_end_conversation(self): service.call(self.foo, UserEvent()) service.reading.end.assert_called()
def test_is_pre_processed(self): service.call(self.foo, UserEvent()) service.reading.make_transient.assert_called()
def test_calls_function(self): service.call(self.foo, UserEvent()) self.foo.assert_called()