Created
April 7, 2016 18:49
-
-
Save iamutkarshtiwari/e012d1f59aab316e43fc44ca24eb15ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StopButton(ToolButton): | |
def __init__(self, activity, **kwargs): | |
ToolButton.__init__(self, 'activity-stop', **kwargs) | |
self.props.tooltip = _('Stop') | |
self.props.accelerator = '<Ctrl>Q' | |
self.connect('clicked', self.__stop_button_clicked_cb, activity) | |
def __stop_button_clicked_cb(self, button, activity): | |
self._set_alert(activity) | |
def _set_alert(self, activity): | |
alert = SaveAsAlert() | |
alert.props.title = _('Save As') | |
message = _('Would you like to save the instance ?') | |
alert.props.msg = message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment