Display an error message if launching a web browser failed.

This commit is contained in:
Lukáš Lalinský
2007-05-12 21:41:20 +02:00
parent b85d11b60f
commit b0b482af17
2 changed files with 7 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ Version 0.9.0beta1 - 2007-05-XX
* Bug Fixes:
* F1 for Help instead of CTRL+H on Windows and Linux. (#2485, Nikolai Prokoschenko)
* Tabbing focus transition from search isn't as expected. (#2546, Nikolai Prokoschenko)
* Display an error message if launching a web browser failed.
Version 0.9.0alpha9 - 2007-05-12
* New Features:

View File

@@ -19,6 +19,7 @@
import os
import webbrowser
from PyQt4 import QtGui
"""
A webbrowser extension that respects user's preferred browser on each
@@ -68,4 +69,8 @@ if 'windows-default' in webbrowser._tryorder:
webbrowser.register('iexplore', None, iexplore)
open = webbrowser.open
def open(url):
try:
webbrowser.open(url)
except webbrowser.Error, e:
QtGui.QMessageBox.critical(None, _("Web Browser Error"), _("Error while launching a web browser:\n\n%s") % (e,))