From 28135f1a26193b57351c83938bf40174436c5913 Mon Sep 17 00:00:00 2001 From: jucablues Date: Fri, 18 Jan 2008 03:52:48 +0000 Subject: [PATCH] use threads to open browser without locking inkscape --- share/extensions/webbrowser_askaquestion.py | 15 +++++++++++++-- share/extensions/webbrowser_commandline.py | 15 +++++++++++++-- share/extensions/webbrowser_faq.py | 15 +++++++++++++-- share/extensions/webbrowser_keys.py | 15 +++++++++++++-- share/extensions/webbrowser_manual.py | 15 +++++++++++++-- share/extensions/webbrowser_relnotes.py | 15 +++++++++++++-- share/extensions/webbrowser_reportabug.py | 16 ++++++++++++++-- share/extensions/webbrowser_svgspec.py | 16 ++++++++++++++-- 8 files changed, 106 insertions(+), 16 deletions(-) diff --git a/share/extensions/webbrowser_askaquestion.py b/share/extensions/webbrowser_askaquestion.py index 7af6b125f..13bdf6eee 100644 --- a/share/extensions/webbrowser_askaquestion.py +++ b/share/extensions/webbrowser_askaquestion.py @@ -1,3 +1,14 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://answers.launchpad.net/inkscape/+addquestion") +import webbrowser, threading +url = "http://answers.launchpad.net/inkscape/+addquestion" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() diff --git a/share/extensions/webbrowser_commandline.py b/share/extensions/webbrowser_commandline.py index 5f91e4372..33bc4b1df 100755 --- a/share/extensions/webbrowser_commandline.py +++ b/share/extensions/webbrowser_commandline.py @@ -1,3 +1,14 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://inkscape.org/doc/inkscape-man.html") +import webbrowser, threading +url = "http://inkscape.org/doc/inkscape-man.html" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() diff --git a/share/extensions/webbrowser_faq.py b/share/extensions/webbrowser_faq.py index fb5967c6b..58e3164fb 100755 --- a/share/extensions/webbrowser_faq.py +++ b/share/extensions/webbrowser_faq.py @@ -1,3 +1,14 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://wiki.inkscape.org/wiki/index.php/FAQ") +import webbrowser, threading +url = "http://wiki.inkscape.org/wiki/index.php/FAQ" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() diff --git a/share/extensions/webbrowser_keys.py b/share/extensions/webbrowser_keys.py index f93024793..1b2512663 100755 --- a/share/extensions/webbrowser_keys.py +++ b/share/extensions/webbrowser_keys.py @@ -1,3 +1,14 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://inkscape.org/doc/keys046.html") +import webbrowser, threading +url = "http://inkscape.org/doc/keys046.html" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() diff --git a/share/extensions/webbrowser_manual.py b/share/extensions/webbrowser_manual.py index daa2e149e..8bc374b97 100755 --- a/share/extensions/webbrowser_manual.py +++ b/share/extensions/webbrowser_manual.py @@ -1,3 +1,14 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.php") +import webbrowser, threading +url = "http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.php" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() diff --git a/share/extensions/webbrowser_relnotes.py b/share/extensions/webbrowser_relnotes.py index 8ce07ec21..a47932397 100755 --- a/share/extensions/webbrowser_relnotes.py +++ b/share/extensions/webbrowser_relnotes.py @@ -1,3 +1,14 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://wiki.inkscape.org/wiki/index.php/ReleaseNotes046") +import webbrowser, threading +url = "http://wiki.inkscape.org/wiki/index.php/ReleaseNotes046" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() diff --git a/share/extensions/webbrowser_reportabug.py b/share/extensions/webbrowser_reportabug.py index cec55a435..3fb01a753 100755 --- a/share/extensions/webbrowser_reportabug.py +++ b/share/extensions/webbrowser_reportabug.py @@ -1,3 +1,15 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://inkscape.org/report_bugs.php") +import webbrowser, threading +url = "http://inkscape.org/report_bugs.php" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() + diff --git a/share/extensions/webbrowser_svgspec.py b/share/extensions/webbrowser_svgspec.py index 9ea131e4b..b523eada8 100755 --- a/share/extensions/webbrowser_svgspec.py +++ b/share/extensions/webbrowser_svgspec.py @@ -1,3 +1,15 @@ #!/usr/bin/env python -import webbrowser -webbrowser.open("http://www.w3.org/TR/SVG11/") +import webbrowser, threading +url = "http://www.w3.org/TR/SVG11/" + +class VisitWebSiteWithoutLockingInkscape(threading.Thread): + def __init__(self, url): + self.url = url + threading.Thread.__init__ (self) + + def run(self): + webbrowser.open(self.url) + +vwswli = VisitWebSiteWithoutLockingInkscape(url) +vwswli.start() + -- 2.30.2