Version: (using KDE KDE 3.4.0) Installed from: Gentoo Packages Compiler: gcc (GCC) 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110-r2, ssp-3.4.3.20050110-0, pie-8.7.7) OS: Linux When I use the "media:/LOCALHDD" URL in some apps(e.g. Kaffeine) I get the message that I only can select local files. So perhaps there should be an attribute in the ioslave whether the selected device is local or not. Or "media:/" should be considered local in general. I might be totaly wrong here, because I don't know the implementation of the slave and the bug might be in the apps giving me such messages.
There is such attribute, more or less. It's the apps that aren't querying for it.
I am seeing this too. How can it be the apps that aren't querying for it. Kaffeine and k3b both fail for me. Surely they just say they want a local file and this is a standard KDE message. This needs to get fixed - it's a terrible bug....
Are you seeing this in the file-open (or save) dialog box? If so, before or after the dialog disappears?
*** Bug 105851 has been marked as a duplicate of this bug. ***
Actually, this bug is valid. It's just not on kio/media. Reopening.
KFileDialog::slotOk tests with d->url.isLocalFile. It has to use KIO to find mostLocalURL.
Well, currently I'm not sure it's the way to go. It has a kind of "pervert" side effect. When you will open of file on media:/ the application will receive a file:/ URL. Then, the user will see it in the application which is not nice IMHO. I've been discussing this kind of issue with David Faure recently. I'm trying to find a solution, but it looks like will have to "port" applications to use UDS_LOCAL_PATH in order to completely hide this implementation detail to the user.
I'm seeing before the file open dialog is closed. It seems to be a feature in the file open dialog to request only local files. The file open dialog does not consider the media IO slave as local from what I gather by looking at the code.
because of this strange behavior, Media:/, which is a wonderful feature is un-usable upto now using "File Open" dialog. media:/ works perfectly in konqueror! open with->xmms/mplayer etc., work with media:/hda5 folder. but openening from the application like codeine, k3b, kaffeine, etc. are real bothersome! I'm eagerly waiting for the media:/ fix in 'File Open Dialog', thank you!
Kévin: how about a new setting in KFileDialog saying it's ok to return media:/ URLs in local file-only contexts, as well as adding a new static method for the dialog? We'd then have 3 modes: 1) file:/-only allowed; KFileDialog accepts URLs such as media:/ and autoconverts to file:/ (it's better to show the system path than to get an error) 2) any local accepted, for new apps/releases only 3) any URL accepted, including remote ones I'm raising the severity because I think this can and should be fixed before 3.5 is released. The problem is there is a big number of applications to port from mode #1 to mode #2.
This is more or less the same thing as Bug 110951.
I guess this bug is why KDE starts copying the whole file if you double click on an MPEG-file on a cd-rom which you opened using the mediamanager window that pops up automatically when inserint a cd-rom? Similar problems exist for the home:/ ioslave by the way. These ioslaves should always use URIs of the type file:/ whenever possible when interacting with external programs.
please make "Open Medium System Folder" behavior as default (configurable at kded kcontrol module) which will solve the annoying "not local media" errors and allow seamless playback with xine, gmplayer, etc., without copying the whole media (.txt, .mpg, .mp3, etc.) file to $HOME :(
I second the "system folder as default" option request.
SVN commit 526455 by cartman: teach KFileDialog about media:/ and system:/ BUG: 105771 BUG: 106077 CCMAIL: 123527 M +13 -7 kfiledialog.cpp --- branches/KDE/3.5/kdelibs/kio/kfile/kfiledialog.cpp #526454:526455 @@ -402,8 +402,9 @@ } } + KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && - !d->url.isLocalFile() ) { + !url.isLocalFile() ) { // ### after message freeze, add message for directories! KMessageBox::sorry( d->mainWidget, i18n("You can only select local files."), @@ -411,6 +412,7 @@ return; } + d->url = url; accept(); return; } @@ -444,15 +446,16 @@ return; } + KURL url = KIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && - !selectedURL.isLocalFile() ) { + !url.isLocalFile() ) { KMessageBox::sorry( d->mainWidget, i18n("You can only select local files."), i18n("Remote Files Not Accepted") ); return; } - d->url = selectedURL; + d->url = url; // d->url is a correct URL now @@ -1536,8 +1539,9 @@ { if ( result() == QDialog::Accepted ) { - if (d->url.isLocalFile()) - return d->url.path(); + KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); + if (url.isLocalFile()) + return url.path(); else { KMessageBox::sorry( d->mainWidget, i18n("You can only select local files."), @@ -1550,14 +1554,16 @@ QStringList KFileDialog::selectedFiles() const { QStringList list; + KURL url; if ( result() == QDialog::Accepted ) { if ( (ops->mode() & KFile::Files) == KFile::Files ) { KURL::List urls = parseSelectedURLs(); QValueListConstIterator<KURL> it = urls.begin(); while ( it != urls.end() ) { - if ( (*it).isLocalFile() ) - list.append( (*it).path() ); + url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget()); + if ( url.isLocalFile() ) + list.append( url.path() ); ++it; } }