Summary: | Selecting removable media changes view mode | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Richard <rjdymond> |
Component: | general | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | adam, adawit, cwiesen, dieterd2005, ervin, faure, gds, geroxp, gerrit, haye, jens, jlinkels, krzysiek, kyron, lex.lists, rhaupt, sven.burmeister, talhayalta, wiebe |
Priority: | NOR | ||
Version: | 3.4.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Proposed patch for fixing the problem
Snapshot how to find indode → directory patch as attachment Debugging output of Konqueror with second patch applied Debugging output of Konqueror with first patch applied Second version of patch |
Description
Richard
2005-07-04 15:24:06 UTC
Kévin: is it something you can fix? Hmmm, it should be checked against current SVN trunk first. I remember David fixing something in konqui about view selection recently. I'm wondering how it happens in 3.4.1 and not in 3.4.0 though. On the media:/ side I changed almost nothing between 3.4.0 and 3.4.1. In any case it's surely on konqui side, but I'll check first. Ok, clearly reproducible on a fresh KDE svn trunk. It seems to be related (at least partly) to mimetypes, I suspect the use of operator== somewhere. It should use is() instead. Then it's surely in konqi, but I don't know where to start. *** Bug 108660 has been marked as a duplicate of this bug. *** Is this bug fixed in 3.4.2? (I'd like to know whether it will be worth the upgrade.) Also, shouldn't this bug be VERIFIED now? For the curious: this bug is not fixed in KDE 3.4.2 (checked on latest Klax live CD). *** Bug 111211 has been marked as a duplicate of this bug. *** From #111211: also applicable to system:/ Confimed on KDE 3.4.2 in media:/ Just like to add that I'm also experiencing this bug with KDE 3.4.2 on Gentoo. This bug is still not fixed in 3.4.3 ... Hi, this happens when you are in smb:// too, but only on smb://$computer name. For me, that is smb://ubuntu, and the view mode changes. FYI, see this (at least with media://) on kde 3.4.2 on fc3. Looked and looked for setting I was missing. This has my vote! *** This bug has been confirmed by popular vote. *** Is this bug fixed in KDE 3.5 or 3.5.1? From personal experience, I can confirm this bug persists in KDE 3.5 -- I do not know if it is fixed in 3.5.1 *** Bug 119781 has been marked as a duplicate of this bug. *** I can confirm this bug is still not fixed in 3.5.1. I noticed that when I go up one level from one directory out of the root level of a device (e.g. system:/media/sda1/dcim) the tree view changes to icon view. When I go back (with back button) this bug does not occur. Yep, it's in 3.5.1 from Debian, too. It's really annoying! I use the multi-column view so I can see all of the files on my MMC card, and read the entire filenames, but then if I change dirs, it goes into icon mode and I can't read half the filenames! I submitted this to Debian as well, in the hope that they can include a fix soon, rather than waiting for a new KDE release. <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=356449> I'm wondering, if somebody of the developers seems to care about this bug. Is it hard to fix or just nobody interested? We are talking a lot about usability, and this bug is a huge usability bug. My parents, using KDE and list view, are always confused when opening files on their memorystick so that I try to find ways to avoid using the media-kioslave. I would be so happy, if someone could include a fix in KDE 3.5.3!!! I think a lot of people use the icon view by default, so they simply don't notice this bug and hence don't care about it. However, if you don't use icon view by default, this bug is immensely irritating - as everyone here knows! For the time being, I've just given up using konqueror on removable media. A suboptimal solution, but until I find a suitable replacement file manager, it's the best I can do. *** Bug 125623 has been marked as a duplicate of this bug. *** Think bug is getting worse for me now. This is because it happens with the seldom used system:/ kioslave as well... Unfortunately Kubuntu will start using this more with the dapper release - so Konqueror constantly switches view mode whenever I browse through system:/ (which is default in Kubuntu), so this is immensely irritating. I'll report to Kubuntu about the issue, but I suppose it won't matter so much since "icon view" is their default. Please KDE, fix this. *** Bug 125744 has been marked as a duplicate of this bug. *** *** Bug 125904 has been marked as a duplicate of this bug. *** I can't reproduce this bug on kde 3.5.2. If i type media:/ or another kioslave, the viewmode switches back to icon view. If i then select 'treeview', konqueror stays in that mode during browsing through the system:/ URL. If i'm in treeview mode, and select a .desktopfile for trash:/, media:/ or system:/, konqueror stays in treeview. I can't reproduce this bug on kde 3.5.2. If i type media:/ or another kioslave, the viewmode switches back to icon view. If i then select 'treeview', konqueror stays in that mode during browsing through the media:/ URL. If i'm in treeview mode, and select a .desktopfile for trash:/, media:/ or system:/, konqueror stays in treeview. If I attach my USB-stick and open it via the "new media found" dialogue or via the kicker-applet I get an address like system:/media/sda1/ or (from kicker) media:/sda1/. It always starts in icon-view, no matter how often I attach the device, but maybe that is a feature. So I switch to tree-view by clicking on the toolbar-button. I get / in tree-view. I then click on a sub-dir, it is not displayed in tree-view, but icon-view. So for me, if I click on a dir, the content is always shown in icon-view. If I use the up-arrow, the content is always shown as icon-view. If I use the back and forward-button, the tree-view stays. I click on the tree-view-button, then on the up-arrow, to go back to / and get icon-view for / again although I had it changed to tree-view. Still happens for me on 3.5.2. Also for me, Debian Etch and Kde 3.5.2 And for me as well, Debian 4:3.5.2-1. Could we get a "confirmed" or "verified" for this, instead of "new"? It's been 9 months. Adam, NEW means confirmed. All new bugs are in the state UNCONFIRMED. Once someone has looked at a bug and see that it a real problem, the status is changed from UNCONFIRMED to NEW. Created attachment 15940 [details]
Proposed patch for fixing the problem
Here is the patch which should fix the problem.
The problem is that partitions shown in media:/ directory are of type
"media/hdd_mounted" while media:/ directory itself is type "inode/directory".
When partition is selected, Konqueror loads default view for
"media/hdd_mounted" and it is icon view (at least in Kubuntu).
This patch changes the behaviour to check if new service type which should be
opened, supports also current service type of open view. If that is the case,
view mode is not switched. This should work for all mime types which provide
"X-KDE-IsAlso=inode/directory".
Note: I have limited the scope of this change only to parts which inherit
KonqDirPart, as I am not sure if for other types this should be done so.
Anyway, it might have large impact, so it should be widely tested before
applying.
Note 2: This patch does NOT solve the problem of opening new media from "New
media found" dialog in icon view mode or any other case when media:/hdXX is
opened immediately, without browsing in other mode. In such case, default view
is used. If you want to change view in this case, just open Properties of
partition in media:/ directory, click "Configure file type", choose "Embedding"
and move preferred view to the top of the list.
Disclaimer: this is my first for Konqueror code, so I might have done something
terribly wrong :)
I have just found a workaround for the problem. Go to "Control Center" → "Kde Components" → "File Associations" → "media" and for "hdd_mounted", "hdd_unmounted", "nfs_mounted", "nfs_unmounted" and so on in the Embedding tab on the right side move "Detailed List View" to the top. That way you have always "Detailed List View". Of course you can change it to another view mode as well. Hope this helps some people! I tried Gerrit Fricke's workaround, but found that while the view mode is retained on browsing the root directory of a mounted filesystem, it changes (to icon view) when drilling down into the directory structure. :( When I get the time to recompile kdebase, I will be trying Krzysztof Lichota's patch, which looks promising. Anyone else tried it yet? You should also change "Control Center" → "Kde Components" → "File Associations" → "inode" → "directory" to Detailed List View Thanks Gerrit, that did the trick! I couldn't find "Control Center" → "Kde Components" → "File Associations" → "inode" → "directory", where it is? I have no inode file type in "File Associations"....... Could you explain me better where it is? Thanks Created attachment 16004 [details]
Snapshot how to find indode → directory
I apologize in advance, as this is unrelated, but I haven't been able to find this quirk anywhere else. In Gerrit Fricke's screenshot in comment #39, the "on all desktops" window decoration button in the upper-left hand corner looks pixelated. In KDE 3.4.x that same window decoration is a nice-looking circle. I believe it's from the plastik theme, and perhaps it's used in other decoration themes as well. Is anyone aware of another thread for window decoration bugs? Maybe it's time I report this myself -- or is it a new "feature"? Just tried Krzysztof Lichota's patch against kdebase-3.5.2 and it works like a charm. It lasted 10 months, but now my icon view hell is over! :) > Just tried Krzysztof Lichota's patch against kdebase-3.5.2 and it works like a charm.
Great! Can you try stressing these changes by performing the tests below?
Set "a":
1. Switch between directories using sidebar browser from media:/ to media:/hda1/
2. Switch between directories using sidebar browser from media:/ to media:/hda1/tmp/
3. Switch between directories using sidebar browser from media:/hda1/ to media:/
4. Switch between directories using sidebar browser from media:/hda1/tmp/ to media:/
5. Switch between directories using sidebar browser from media:/hda1/tmp/ to /home
6. Switch between directories using sidebar browser from media:/hda1/ to /home
7. Switch between directories using sidebar browser from media:/ to /home
8. Switch between directories using sidebar browser from /home to media:/hda1/tmp/
9. Switch between directories using sidebar browser from /home to media:/hda1/
10. Switch between directories using sidebar browser from /home to media:/
11. Switch between directories using sidebar browser from system:/ to media:/
11. Switch between directories using sidebar browser from media:/ to system:/
Set "b":
The same as above, but by typing URL into adress bar.
"Set c":
Tests 1-4 above, but using Konqueror's "go up" and "go down" (arrows).
All these changes should keep the view you chose at the beginning, be it detailed view , text view or tree view.
Testing this would help a lot in pushing these changes to KDE repository so that everyone can use it :)
I see the idea of the patch, but the logic should be in changeViewMode itself - it's there that the check for "this view supports this mimetype already" is. But that check isn't inheritance-aware indeed. Does this fix it? --- konq_view.cc (revision 537624) +++ konq_view.cc (working copy) @@ -315,7 +315,7 @@ bool KonqView::changeViewMode( const QSt << " serviceName is " << serviceName << " current service name is " << m_service->desktopEntryName() << endl; - if ( m_serviceType == serviceType && (serviceName.isEmpty() || serviceName == m_service->desktopEntryName()) ) + if ( KMimeType::mimeType(m_serviceType)->is(serviceType) && (serviceName.isEmpty() || serviceName == m_service->desktopEntryName()) ) return true; if ( isLockedViewMode() ) Created attachment 16037 [details]
patch as attachment
Created attachment 16039 [details]
Debugging output of Konqueror with second patch applied
Unfortunately your patch does not fix the problem.
Attached is output from Konqueror.
Created attachment 16042 [details]
Debugging output of Konqueror with first patch applied
Here is the output from Konqueror with my patch applied.
Created attachment 16043 [details]
Second version of patch
BTW. I have noticed my first patch causes soft assertion because debugging
output does not end with endline. Here is the fixed version.
Hmm I see, I mis-ported your patch. Does it work better with KMimeType::mimeType(serviceType)->is(m_serviceType) ? The full if becomes: if ( KMimeType::mimeType(serviceType)->is(m_serviceType) && (serviceName.isEmpty() || serviceName == m_service->desktopEntryName()) ) That's closer to what your patch does: "if the new mimetype inherits from the current one". Yes, this one works :) I see I have to learn much more to make patches so small and elegant :) SVN commit 540153 by dfaure: Don't change viewmode if the current view's servicetype is a base class of the servicetype we're about to display (e.g. current view is for inode/directory, and we want to display a special kind of directory like media/hdd_mounted) Let's just hope that nobody make text/html inherit text/plain though, otherwise we'll have an old bug coming back (view a text file from the web, type another website's url, and since text/html is a specialization of text/plain you get the HTML code in your plain text viewer). Right now there's no such inheritance though, so this should be fine. Many thanks to Krzysztof Lichota for his investigation, first patch and tests. BUG: 108542 M +1 -1 konq_view.cc --- branches/KDE/3.5/kdebase/konqueror/konq_view.cc #540152:540153 @@ -315,7 +315,7 @@ << " serviceName is " << serviceName << " current service name is " << m_service->desktopEntryName() << endl; - if ( m_serviceType == serviceType && (serviceName.isEmpty() || serviceName == m_service->desktopEntryName()) ) + if ( KMimeType::mimeType(m_serviceType)->is(serviceType) && (serviceName.isEmpty() || serviceName == m_service->desktopEntryName()) ) return true; if ( isLockedViewMode() ) I see you have committed the wrong version (reversed check). Thanks for credits :) Will it be the part of KDE 3.5.3? SVN commit 540255 by dfaure: Ooops - and 10 more points for Krzysztof. CCBUG: 108542 M +1 -1 konq_view.cc --- branches/KDE/3.5/kdebase/konqueror/konq_view.cc #540254:540255 @@ -315,7 +315,7 @@ << " serviceName is " << serviceName << " current service name is " << m_service->desktopEntryName() << endl; - if ( KMimeType::mimeType(m_serviceType)->is(serviceType) && (serviceName.isEmpty() || serviceName == m_service->desktopEntryName()) ) + if ( KMimeType::mimeType(serviceType)->is(m_serviceType) && (serviceName.isEmpty() || serviceName == m_service->desktopEntryName()) ) return true; if ( isLockedViewMode() ) On Friday 12 May 2006 21:12, Krzysztof Lichota wrote:
> Will it be the part of KDE 3.5.3?
Yes, it hasn't been tagged yet.
Gerrit Fricke, you made my day. Icon view is SO annoying. Now I can finally install KDE 3.5 on my production machines. Thanks also for providing the screen shot, it saved me a lot of searching. jlinkels Verified fixed in KDE 3.5.3 *** Bug 107540 has been marked as a duplicate of this bug. *** I'm not sure this bug is solved. Tested on 3.5.5 and 3.5.6. When a new media is detected I use the "media device" applet and select open in a new window. Since I have konqueror to open links in new tab it does like that and open the media on it using _icon view_. The rest of tabs and my default view mode is detailed list view. Also, after opening the media and having konqueror changed to icon view I manually change to detailed list view. If I open a directory on that media, konqueror will return again to the icon view. I had to manually change the preferred view mode as per #34 and I think this workarounded the problem, yet I think it's still there. What I would expect is that konqueror uses the already used (or default) view mode when opening a media. Also use the current view mode when opening a folder on that media. I hope having explained properly, if not just ask. Thanks. I also still have problems and I can't believe how this problem can't be _fully_ solved after so much time and error reports. My problem is this: I use multiple tabs in konqueror and I use the detailed list view for each of them. 1)- I set up the first tab for icon view and save. 2)- After this when I create a new tab and hit the home button (the tab is initially a blank page), I see the contents of my home button in detailed list view, which is what I expect. 3)- However, if I enter, say, "media:/sda5/", I get the annoying icon view. 4)- It is not finished. Now, I select the detailed list view from the menu and go inside another folder, say, "media:/sda5/photos/". It is the icon view again. I can't believe it! 5)- Well, OK, I select the detailed list view once again from the menu and this second attempt under a different directory seems to fix it for good. From now on I enter or exit any directory and it is the detailed list view, which I prefer. 6)- So it takes 2 attempts to get the detailed list view in a "media:/" location . When I goto a location in my home or root partitions. It is in detailed list view. I am using Pardus 2007.1 and I have KDE 3.5.6. Hope this helps for finally fixing this bug which is starting to get really annoying. Cheers, ATY Although the problem I described in the original comment has been fixed, like the two posters above I also believe that remnants of this bug are still lingering. I find that Konqueror switches view mode from Tree to Icon arbitrarily in the following situation: 1. Open Konqueror on home directory. Note that view mode is Tree. 2. In same tab, open an HTML file (either local or on the internet). 3. Open a new tab, and go to your home directory. View mode is now Icon. Doh! You have to wonder what kind of twisted logic is behind this view-switching behaviour. :) Should I create a new bug report for this problem, or reopen this one? Yes, I can also confirm that #59 has also happened to me before too (for the detailed list view). Looks like Konqueror uses some cutting edge AI algorithms to decide on the view mode for the use in a seemingly infinite combination of different scenarios :-) Well, we just want to have our _one_ preferred view working consistently across all folders. Cheers ATY I can confirm #59 on kubuntu feisty (kde 3.5.6) Check https://bugs.launchpad.net/kdebase/+bug/69168 for a workaround. #59 does not consistently re-produce the bug for me. At first it did not reproduce the bug, but after trying the various things that I describe below, the steps in #59 did reproduce the bug. I'm using debian etch, kde 3.5.5 (debian package version 4:3.5.5a-2). I have not used the workaround referenced in #62. In Settings->Configure Konqueror->File Associations, inode/directory, embedding tab, my Services Preference Order is: Icon View, Multi Column View, Tree View, Info List View, Detailed List View, Text View, Image View, Terminal Emulator, Navigation Panel The following _does_ consistently reproduce the bug for me, starting with a CD-ROM with some jpg files on it inserted in hdc: 1. Open a konqueror window with view mode set to anything _except_ Icon View 2. Type "media:/hdc" in the location bar, press Enter 3. Click on a jpg file -- my set-up has the file opened in the same konqueror window using the embeded viewer 4. Click the "Up" button. The view mode has been switched to Icon View Each of the following variations do NOT reproduce the bug for me -- each test was carried out quitting all konqueror windows and opening a new one: * In step 2, navigate to the mount point of hdc, for me it's /media/cdrom -- instead of media:/hdc -- and repeat 3 and 4 * In step 4 click the "Back" button * In step 2 navigate to "media:/hda4/yangv/" -- my home directory, repeat 3 and 4 * In step 2 navigate to "/home/yangv", repeat 3 and 4 * In Step 2 navigate to my home directory on a windows NTFS partition: "media:/hda1/Documents and Settings/yangv" or the same location via its mount point, repeat 3 and 4 follow-up and correction to comment #63 after further testing, I discovered the variations I described, itemized by '*' started to reproduce the bug. Furthermore, after logging out and back in, the bug persisted. After re-booting and logging back in, the bug persisted. I think I figured out, or at least enough to produce consistent behavior. The view mode does not always get reset to Icon View. It gets reset to whatever mode I last manually selected before quitting konqueror. Bear with me: 1. Open a new konqueror window, in file-browsing mode. My default view mode is Detailed List View and upon opening a new window, it is indeed in Detailed List View. 2. Select a different view mode. For this example, I use Tree View. 3. Quit konqueror 4. Open a new konqueror window -- the view mode is Detail List View. This is expected because that's how my view profile is saved. 5. Open a picture, text file or other file to be viewed using the embedded viewer. 6. Press "Up". The view mode has switched to Tree View, not Icon 7. Quit konqueror again 8. Open a new konqueror window. It opens with Detail List View, as expected. Navigate to media:/hdc -- my optical drive 9. Open a file to view in the embedded viewer 10. Click "Up". The view mode has switched to Icon View. 11. Quit konqueror 12. Open a new konqueror window -- the view mode is Detailed List as expected -- navigate to /media/cdrom, my mount point for hdc 13. Repeat 9 and 10. The view mode has switched to Tree View. I can consistently reproduce this behavior with the other view modes, not just Tree. For the tests I described in #63, I had Detailed List View selected throughout, so it never seemed to switch view modes unexpectedly. KDE 3 is no longer maintained and filemanagement in KDE 4 is handled by the Dolphin filemanagement viewer part. |