예제 #1
0
 def __on_authenticated(self, obj, data):
     name = data.username
     self.login_state = State.LOGGED_IN
     self.update_connect_button()
     self.activate()
     msg = Message(Gtk.MessageType.INFO, app.window, _("Connected"),
                   _("Quod Libet is now connected, %s!") % name)
     msg.run()
예제 #2
0
 def __on_authenticated(self, obj, data):
     name = data.username
     self.login_state = State.LOGGED_IN
     self.update_connect_button()
     self._refresh_online_filters()
     msg = Message(Gtk.MessageType.INFO, app.window, _("Connected"),
                   _("Quod Libet is now connected, <b>%s</b>!") % name)
     msg.run()
    def enabled(self):
        if not config.getboolean("editing", "save_to_songs"):
            config.set("editing", "save_to_songs", True)

            warning_text = _("The following setting was enabled as it's "
                             "required for this plugin to work:\n\n%s")
            setting_name = _("Save ratings and play _counts in tags")

            Message(Gtk.MessageType.INFO, app.window, _("Settings updated"),
                    warning_text % setting_name.replace("_", "")).run()
예제 #4
0
 def try_connecting(self):
     try:
         self.enabled()
         msg = (_("Connected to broker at %(host)s:%(port)d")
                % {'host': self.host, 'port': self.port})
         Message(Gtk.MessageType.INFO, app.window, "Success", msg).run()
     except IOError as e:
         template = _("Couldn't connect to %(host)s:%(port)d (%(msg)s)")
         msg = template % {'host': self.host, 'port': self.port, 'msg': e}
         print_w(msg)
         ErrorMessage(app.window, _("Connection error"), msg).run()
     yield
예제 #5
0
 def _show_dialog(dialog_type, msg):
     dialog = Message(dialog_type, app.window, "Squeezebox", msg)
     dialog.connect('response', lambda dia, resp: dia.destroy())
     dialog.show()