mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-06 00:23:58 +00:00
Display an error message if launching a web browser failed.
This commit is contained in:
1
NEWS.txt
1
NEWS.txt
@@ -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:
|
||||
|
||||
@@ -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,))
|
||||
|
||||
Reference in New Issue
Block a user