# HG changeset patch # User Goffi # Date 1447760378 -3600 # Node ID 1c5761cb1bdc6e12422423f055952ddc71f84e51 # Parent 48f324352c52facc84d4466f17a9cef5c22aefd7 quick_frontend(profile manager): fixed alert messages diff -r 48f324352c52 -r 1c5761cb1bdc frontends/src/quick_frontend/quick_profile_manager.py --- 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