def add_choices_menu_actions(self, action_group):
self.preferences_button = Gtk.Action("VisualsMenu", "Preferences", None, None)
action_group.add_action(self.preferences_button)
action_visualsmenu = Gtk.Action("Visuals", "Visuals", None, None)
action_group.add_action_with_accel(action_visualsmenu, None)
action_group.add_radio_actions([
("metro", None, "metro", None, None, 1),
("paper", None, "paper", None, None, 2)
], 2, self.on_menu_choices_changed)
lights_on_widget = Gtk.ToggleAction("lights_on_option",
"Turn lights off",
None, None)
lights_on_widget.connect("toggled", self.on_menu_choices_toggled)
action_group.add_action(lights_on_widget)
评论列表
文章目录