Codebase list sugar-toolkit-gtk3 / 6bcd664
Save As - track stop buttons in Activity instance Track the stop buttons for the activity, so that they can be set insensitive or not in a later patch. Our API allows for more than one stop button, though the use of more than one is very rare. James Cameron 6 years ago
2 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
447447 bundle = get_bundle_instance(get_bundle_path())
448448 self.set_icon_from_file(bundle.get_icon())
449449
450 self._stop_buttons = []
451
452 def add_stop_button(self, button):
453 self._stop_buttons.append(button)
450454
451455 def run_main_loop(self):
452456 Gtk.main()
8585 self.props.tooltip = _('Stop')
8686 self.props.accelerator = '<Ctrl>Q'
8787 self.connect('clicked', self.__stop_button_clicked_cb, activity)
88 activity.add_stop_button(self)
8889
8990 def __stop_button_clicked_cb(self, button, activity):
9091 activity.close()