diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index b349af5eb..91cd40757 100644 --- a/deluge/ui/gtkui/addtorrentdialog.py +++ b/deluge/ui/gtkui/addtorrentdialog.py @@ -466,7 +466,7 @@ class AddTorrentDialog(component.Component): (model, row) = self.listview_torrents.get_selection().get_selected() if self.options[model[row][0]]["compact_allocation"]: import dialogs - dialogs.ErrorDialog(_("Unable to set file priority!"), _("File prioritization is unavailable when using Compact allocation.")).run() + dialogs.InformationDialog(_("Unable to set file priority!"), _("File prioritization is unavailable when using Compact allocation.")).run() return (model, paths) = self.listview_files.get_selection().get_selected_rows() if len(paths) > 1: diff --git a/deluge/ui/gtkui/dialogs.py b/deluge/ui/gtkui/dialogs.py index 829338c2e..0b210f5c5 100644 --- a/deluge/ui/gtkui/dialogs.py +++ b/deluge/ui/gtkui/dialogs.py @@ -104,6 +104,25 @@ class YesNoDialog(BaseDialog): (gtk.STOCK_YES, gtk.RESPONSE_YES, gtk.STOCK_NO, gtk.RESPONSE_NO), parent) +class InformationDialog(BaseDialog): + """ + Displays an information dialog. + + When run(), it will return a gtk.RESPONSE_CLOSE. + """ + def __init__(self, header, text, parent=None): + """ + :param header: see `:class:BaseDialog` + :param text: see `:class:BaseDialog` + :param parent: see `:class:BaseDialog` + """ + super(InformationDialog, self).__init__( + header, + text, + gtk.STOCK_DIALOG_INFO, + (gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE), + parent) + class ErrorDialog(BaseDialog): """ Displays an error dialog with optional details text for more information. diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index d516a566e..22c11d267 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -238,9 +238,9 @@ class GtkUI: client.start_classic_mode() except deluge.error.DaemonRunningError: response = dialogs.YesNoDialog( - "Turn off Classic Mode?", - "It appears that a Deluge daemon process (deluged) is already running.\n\n\ -You will either need to stop the daemon or turn off Classic Mode to continue.").run() + _("Turn off Classic Mode?"), + _("It appears that a Deluge daemon process (deluged) is already running.\n\n\ +You will either need to stop the daemon or turn off Classic Mode to continue.")).run() self.started_in_classic = False if response != gtk.RESPONSE_YES: