User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14 Build Identifier: ristretto allows to specify a list of folders and filenames to open at startup. However, whenever a file is specified, rsitretto always opens the directory containing the file instead. So, if one file is specified, the whole folder is always opened and the funniest thing: if you specify several files in the same folder, the folder is openened once for every file. Following patch fixes the problem: Index: src/main.c =================================================================== --- src/main.c (revision 4662) +++ src/main.c (working copy) @@ -475,7 +475,7 @@ } else { - rstto_navigator_open_file (navigator, path_dir, TRUE, NULL); + rstto_navigator_open_file (navigator, path_dir, FALSE, NULL); gtk_statusbar_remove(bar, context_id, message_id); } } Reproducible: Always Steps to Reproduce: 1. start ristretto with a list of files 2. 3. Actual Results: The corresponding folders are opened instead of the files Expected Results: The files are openened Following patch (on r4662) fixes the problem: Index: src/main.c =================================================================== --- src/main.c (revision 4662) +++ src/main.c (working copy) @@ -475,7 +475,7 @@ } else { - rstto_navigator_open_file (navigator, path_dir, TRUE, NULL); + rstto_navigator_open_file (navigator, path_dir, FALSE, NULL); gtk_statusbar_remove(bar, context_id, message_id); } }
That behaviour is not entirely undesired. It should behave like that when you open a single image, but not when you open multiple (the behaviour you described). It is fixed in revision 4665.
(In reply to comment #1) > That behaviour is not entirely undesired. It should behave like that when you > open a single image, but not when you open multiple (the behaviour you > described). > > It is fixed in revision 4665. > I have to say that I fail to see the logic behind this. This would make it unusable as a default image viewer for the file manager, as when I get a DVD with 90 tifs of each 50 MB in size and would click on one of them, ristretto will always read the whole 90 files first, as it did yesterday and will do with your fix. Is there a specific reason behind this, I mean the expectation is that when I call a program with one filename as a parameter, it will process exactly this one file and not the directory containing the file. With the sad exception of perhaps gqview. May I kindly ask you to consider my version of the fix, I really think that's more consistent with expected behavior and I really can't see the value of opening the directory instead.
Personally, I don't have pictures that large. But, when I open a folder with 350+ pictures, I think I see what you mean. I agree that it sucks for some setups, would you feel comfortable with a configuration option? 'Load entire folder when opening a single file during startup' This would both help you (with huge files), and don't take away this feature for other people.
(In reply to comment #3) > Personally, I don't have pictures that large. But, when I open a folder with > 350+ pictures, I think I see what you mean. > > I agree that it sucks for some setups, would you feel comfortable with a > configuration option? > > 'Load entire folder when opening a single file during startup' > > This would both help you (with huge files), and don't take away this feature > for other people. > Yes, of course, if that's not too much work, making it configurable sounds very reasonable. Thanks a lot.
Fixed in revision 4740. Ristretto opens the file you want first, and THEN looks for other files inside that folder.
Created attachment 2046 Add option to toggle between folder open and single file open This patch adds an option: "Load entire folder when opening a single file during startup." This is currently the way ristretto behaves, this option lets you switch this behaviour off, so only the specified file will be opened.
Added a patch to optionally support opening a single file
(In reply to comment #7) > Added a patch to optionally support opening a single file Did you consider using thumbnails instead of loading the actual images? Missing thumbnails could be loaded in the background with a generous timer. Maybe that would be better than loading no images at all.
(In reply to comment #8) > (In reply to comment #7) > > Added a patch to optionally support opening a single file > > Did you consider using thumbnails instead of loading the actual images? Missing > thumbnails could be loaded in the background with a generous timer. Maybe that > would be better than loading no images at all. I think it's best to not open any other images at all. Remember, this behaviour is only relevant if you call ristretto with exactly one single image filename, like whe you use it to view in a thunar folder where you already get all thumnbnails in thunar.
Hello, Right now (ver. 0.0.21 from Debian) I get inconsistent behavior: - opening file from Thunar or from commandline the whole directory is opened - using menu item File -> Open... (or Ctrl+O) exactly one file is opened and other files in directory are not accessible. Successive File -> Open... will open the previous file(s) too. (by "open" and "accessible" I mean I can switch to the other photos using previous/next) I can't find the option to configure the behavior (mentioned in this bug report). May I suggest to stick with one or the other behavior and enable the alternate via an option (defaulting to open all makes more sense for me). Regards, Andrei
Ok, an option for this has been added to master.