Пример #1
0
    def _reload_plugin_alert(self, tmp_dir, tmp_path, plugin_path, plugin_name,
                             file_info):
        print "Already installed"
        title = _('Plugin %s already installed') % plugin_name
        msg = _('Do you want to reinstall %s?') % plugin_name
        dlg = gtk.MessageDialog(parent=None, type=gtk.MESSAGE_INFO,
                                buttons=gtk.BUTTONS_YES_NO,
                                message_format=title)
        dlg.format_secondary_text(msg)
        dlg.set_title(title)
        dlg.set_property('skip-taskbar-hint', False)

        resp = dlg.run()
        dlg.destroy()

        if resp is gtk.RESPONSE_OK:
            complete_plugin_install(tmp_dir, tmp_path, plugin_path,
                                    plugin_name, file_info)
        elif resp is gtk.RESPONSE_CANCEL:
            cancel_plugin_install(tmp_dir)
Пример #2
0
    def _reload_plugin_alert(self, tmp_dir, tmp_path, plugin_path, plugin_name,
                             file_info):
        print "Already installed"
        title = _('Plugin %s already installed') % plugin_name
        msg = _('Do you want to reinstall %s?') % plugin_name
        dlg = gtk.MessageDialog(parent=None, type=gtk.MESSAGE_INFO,
                                buttons=gtk.BUTTONS_YES_NO,
                                message_format=title)
        dlg.format_secondary_text(msg)
        dlg.set_title(title)
        dlg.set_property('skip-taskbar-hint', False)

        resp = dlg.run()
        dlg.destroy()

        if resp is gtk.RESPONSE_OK:
            complete_plugin_install(tmp_dir, tmp_path, plugin_path,
                                    plugin_name, file_info)
        elif resp is gtk.RESPONSE_CANCEL:
            cancel_plugin_install(tmp_dir)