When OBJECT's 'confirm open' becomes not so nice...

Koos Vriezen koos.vriezen at xs4all.nl
Mon Oct 18 19:10:43 BST 2004


On Mon, Oct 18, 2004 at 04:43:08PM +0200, David Faure wrote:
> On Saturday 16 October 2004 01:52, Koos Vriezen wrote:
> > On Fri, Oct 15, 2004 at 06:31:44PM +0200, David Faure wrote:
> > > On Friday 15 October 2004 14:42, Koos Vriezen wrote:
> > > > Hi,
> > > > 
> > > > I'm a bit confused when there is a confirm dialog to open a link in a
> > > > KPart or when not. Here is one obviously not so nice:
> > > > http://service.real.com/help/library/guides/realone/ProductionGuide/HTML/samples/embed/plugin2.htm
> > > 
> > > I don't get a message box when opening that page. Do I need to click somewhere?
> > > 
> > > If you get one, then maybe you asked (in the file associations dialog) for a mimetype
> > > to be opened in an external viewer? Show me the debug output from konq :)
> > 
> > Hmm strange, I get 19 popups overlapping each other with a 'Save As',
> > 'Open with' and 'Cancel' button. Nasty thing is, other than 19 message
> > boxes, is getting the focus back on whatever application (most easy is
> > ALT-CTRL-Fx and kill konqueror from there :-( ). Can this happen, ie can
> > there be data events in the event loop of these message boxes that
> > generate more of these?
> 
> Yes, I think so.

Which is bad, no? This 'the pop-up'-way is not scalable for more than
one object. Not so btw, turned out it wasn't asking to confirm the open,
but 'Open with ..' because I have no 'audio/x-pn-realaudio-plugin'
handler (notice the '-plugin') suffix. So you could reproduce it by
(temporary) remove the plugin and rescan the nsplugins.
I'm not sure yet where this mime comes from, because this page has only
classid set. Did find a problem, but it didn't change the popup (asked
for the same audio/x-pn-realaudio-plugin mime):

RCS file: /home/kde/kdelibs/khtml/rendering/render_frames.cpp,v
retrieving revision 1.187
diff -u -3 -p -r1.187 render_frames.cpp
--- rendering/render_frames.cpp 14 Oct 2004 12:17:59 -0000      1.187
+++ rendering/render_frames.cpp 18 Oct 2004 17:58:19 -0000
@@ -693,7 +695,9 @@ void RenderPartObject::updateWidget()
                       serviceType = "application/x-shockwave-flash";
                   }
                   else if(objbase->classId.contains(QString::fromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")))
-                      serviceType = "audio/x-pn-realaudio-plugin";
+                      //if we support -plugin suffixes
+                      //serviceType = "audio/x-pn-realaudio-plugin";
+                      serviceType = "audio/x-pn-realaudio";
                   else if(objbase->classId.contains(QString::fromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) ||
                           objbase->classId.contains(QString::fromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")))
                       serviceType = "application/x-java-applet";

Although I'm not sure what to do. Currently we strip '-plugin' suffixes
in khtml, so we should do it here too. However people from Real requested
to revert that and only, as a fail back, strip it. Personally I don't
like that, because we have to add lots of mimes (embeddedable) twice.
Also I'm uncertain what will happen with the nsplugin generated version,
will it still work (ie. does nsplugin also generate the
audio/x-pn-realaudio one? Can you check?)
Another thing I noticed that with the 'file associates' dialog, it's not
possible to add audio/x-pn-realaudio-plugin. Did grep for some places if
the -plugin suffix is stripped, but I didn't find it. Are you aware of
that?

> > Mime is audio/x-pn-realaudio-plugin that has no associates, but I have
> > kmplayer set as embedded viewer for audio/x-pn-realaudio ('-plugin'
> > should be striped here actually, so I don't really understand the
> > dialog's question..). The 'Ask whether to save to disk instead' is
> > selected (not that I did that IIRC). Funny that you see nothing, do you
> > see any plugin embedded at all?
> 
> Sure, I see all the plugins embedded.
> 
> kio (KTrader): query for audio/x-pn-realaudio-plugin, KParts/ReadOnlyPart : returning 1 offers
> [...]
> konqueror: -> NSPluginLoader::NewInstance( parent=0x86027e0, url=http://service.real.com/help/library/guides/realone/ProductionGuide/HTML/sample
> s/embed/plugin.rpm, mime=audio/x-pn-realaudio-plugin, ...)
> [...]
> konqueror: Looking up plugin for mimetype audio/x-pn-realaudio-plugin: /usr/lib/netscape/plugins/rpnp.so
> 
> Configuration:
> audio/x-pn-realaudio with default settings ("use settings for audio group" and checkbox unchecked)
> audio/x-pn-realaudio-plugin, apparently generated by nspluginscan (since it has the NS icon
> and is associated to "Netscape plugin viewer" in the embedding tab). It has the "ask whether to
> save to disk instead" checkbox checked here too, not sure why, but for sure this isn't
> used in the plugins code path, only in khtmlrun/konqrun... The radiobuttons say
> "Show file in embedded viewer".
> 
> -- 
> David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
> Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kfm-devel mailing list