[Patches] [ python-Patches-423139 ] webbrowser.py fix for konqueror

noreply@sourceforge.net noreply@sourceforge.net
Tue, 23 Oct 2001 05:32:08 -0700


Patches item #423139, was opened at 2001-05-10 12:44
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=423139&group_id=5470

Category: Library (Lib)
Group: None
Status: Closed
Resolution: None
Priority: 5
Submitted By: Joseph VanAndel (vanandel)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: webbrowser.py fix for konqueror

Initial Comment:
The 2.1 version of webbrowser.py uses kfmclient, and
opens a new Konqueror window for each 'open' call.

This patched version of webbrowser.py uses the KDE
command line utility 'dcop' to either open a URL in an
existing Konqueror window, or to open a new window.

pydoc is much more useful with this version of
webbrowser.py

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2001-10-23 05:32

Message:
Logged In: NO 

I was playing a bit with dcop and it seem sto be intuitive if konqueror is running. Foolowing fix in my case solves the "one window" problem and it is working without any problems. But:
1. konqueror must be running already
2. it is always trying to open it in window #1. 

Sorry, it can be written better, but I know nothing about Python and have no time now to learn it ...

Jozef

def open(self, url, new=1):
 # XXX currently I know no way to prevent KFM from opening a new win.
 #self.open_new(url)
 os.system("dcop konqueror KonquerorIface getWindows >/dev/null")
 cmd="dcop konqueror konqueror-mainwindow#1 openURL %s >/dev/null" % url
 os.system(cmd)



----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-07-18 11:51

Message:
Logged In: YES 
user_id=3066

(Changed status to "Pending..." - it's supposed to re-open
once a response is received.)

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-07-18 11:50

Message:
Logged In: YES 
user_id=3066

Err, the patch isn't here.  Could you please try to attach
the patch to this request, or at least point me to some
reasonable documentation for the dcop program and
Konqueror's control interface?  Mandrake 7.2 does not
include a man page for dcop, and "dcop --help" isn't very
helpful.  I would like to improve the Konqueror support.

Thanks!

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-07-03 22:31

Message:
Logged In: YES 
user_id=3066

Assigned to me since webbrowser.py is my fault.  ;-)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=423139&group_id=5470