Exemple #1
0
	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)
Exemple #2
0
	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)
Exemple #3
0
 def test_dont_end_long_conversation(self):
     service.reading.is_transient = lambda: False
     service.call(self.foo, UserEvent())
     service.reading.end.assert_not_called()
Exemple #4
0
 def test_end_conversation(self):
     service.call(self.foo, UserEvent())
     service.reading.end.assert_called()
Exemple #5
0
 def test_is_pre_processed(self):
     service.call(self.foo, UserEvent())
     service.reading.make_transient.assert_called()
Exemple #6
0
 def test_calls_function(self):
     service.call(self.foo, UserEvent())
     self.foo.assert_called()