Did I find the right examples for you? yes no

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)

src/s/a/sat-0.4.1/frontends/src/primitivus/profile_manager.py   sat(Download)
from sat.core.i18n import _
import urwid
from urwid_satext.sat_widgets import AdvancedEdit,Password,List,InputDialog,ConfirmDialog,Alert,FocusFrame
from sat.tools.jid import JID
 
        else:
            message=_("Unknown reason (%s)") % reason
        popup = Alert(_("Can't create profile"), message, ok_cb=self.host.removePopUp)
        self.host.showPopUp(popup)
 
    def onConnectProfile(self, button):
        profile_name = self.list_profile.getSelectedValue()
        if not profile_name:
            pop_up_widget = Alert(_('No profile selected'), _('You need to create and select a profile before connecting'), ok_cb=self.cancelDialog)
            self.host.showPopUp(pop_up_widget)
        elif profile_name[0] == '@':
            pop_up_widget = Alert(_('Bad profile name'), _("A profile name can't start with a @"), ok_cb=self.cancelDialog)
    def getParamError(self, ignore):
        popup = Alert("Error", _("Can't get profile parameter"), ok_cb=self.host.removePopUp)
        self.host.showPopUp(popup)
 

src/s/a/sat-0.4.1/frontends/src/primitivus/chat.py   sat(Download)
    def onTarotRequest(self, menu):
        if len(self.occupants) != 4:
            self.host.showPopUp(sat_widgets.Alert(_("Can't start game"), _("You need to be exactly 4 peoples in the room to start a Tarot game"), ok_cb=self.host.removePopUp))
        else:
            self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile)
        def configureError(failure):
            self.host.showPopUp(sat_widgets.Alert(_("Error"), unicode(failure), ok_cb=self.host.removePopUp))
        self.host.bridge.configureRoom(self.id, self.host.profile, callback=gotUI, errback=configureError)
 
    def onSendFileRequest(self, menu):