Mercurial > libervia-backend
changeset 1613:1c5761cb1bdc
quick_frontend(profile manager): fixed alert messages
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 17 Nov 2015 12:39:38 +0100 |
parents | 48f324352c52 |
children | 1ced93821c35 |
files | frontends/src/quick_frontend/quick_profile_manager.py |
diffstat | 1 files changed, 4 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_profile_manager.py Tue Nov 17 12:28:45 2015 +0100 +++ b/frontends/src/quick_frontend/quick_profile_manager.py Tue Nov 17 12:39:38 2015 +0100 @@ -114,13 +114,13 @@ self._autoconnect = False # manual mode msg = _("Trying to plug an unknown profile key ({})".format(profile_key)) log.warning(msg) - self.alert(_("Profile plugging in error"), msg) + self.showDialog(_("Profile plugging in error"), msg, 'error') break self.host.launchAction(C.AUTHENTICATE_PROFILE_ID, callback=authenticate_cb, profile=profile) def getParamError(self, dummy): - self.alert(_(u"Error"), _("Can't get profile parameter")) + self.host.showDialog(_(u"Error"), _("Can't get profile parameter"), 'error') ## Helping methods ## @@ -153,12 +153,12 @@ def _onConnectProfiles(self): """Connect the profiles and start the main widget""" if self._autoconnect: - self.alert(_('Internal error'), _("You can't connect manually and automatically at the same time")) + self.host.showDialog(_('Internal error'), _("You can't connect manually and automatically at the same time"), 'error') return self.updateConnectionParams() profiles = self.getProfiles() if not profiles: - self.alert(_('No profile selected'), _('You need to create and select at least one profile before connecting')) + self.host.showDialog(_('No profile selected'), _('You need to create and select at least one profile before connecting'), 'error') else: # All profiles in the list are already validated, so we can plug them directly self.host.plug_profiles(profiles) @@ -249,12 +249,4 @@ # dialogs - def alert(self, title, message): - """Show an alert message, must be implemented by frontends - - @param title: title of the dialog/popup - @param message: error message - """ - raise NotImplementedError - # Note: a method which check profiles change must be implemented too