Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Apr 2017, 14:23
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Building a universal file viewer
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 8 [119 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
mavrothal


Joined: 24 Aug 2009
Posts: 2846

PostPosted: Sat 11 Mar 2017, 01:51    Post subject:  

This is a REALLY nice utility.
I think should be in every puppy!
I can understand that you may not want to have it in woof-CE (you might reconsider though...) but maybe have it as a pet to facilitate the build process.

A couple of issues that you might consider addressing is the appearance of /mnt/home as (the proper mount point name) "dev_save", that may be a bit confusing. It is also a duplication since the relevant partition is also shown.
There is also no indication if a partition is mounted. Partitions auto-mount if clicked upon but provide no way to unmount them. BTW not sure how partitions are ordered in the side panel. Reverse volume-forward partition?

Anyway, is still super. Cool
quickview.jpg
 Description   
 Filesize   50.77 KB
 Viewed   395 Time(s)

quickview.jpg


_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4535
Location: New Zealand

PostPosted: Sat 11 Mar 2017, 03:38    Post subject:  

Thanks for sorting the encoding handling - /usr/share/usbids now displays correctly on my system. (This file is a very interesting list of known usb device ids - a good reference)

If I close the mmquickview window by using the "close" radio button it will remember (and display) the last_viewed_directory (or item) when I next start the utility. Alternatively if I terminate the window by clicking the X button it does not remember the directory or item I was viewing during the previous run. Is there any way to allow mmquickview to remember it's last viewed directory when X is clicked?

One thing I like about having a viewer is that I can investigate the code within my scripts just by clicking them - no more risk of the code being actually executed when I click. (how often have I clicked on various text files to read them then accidentally clicked an executable script and started to panic about what it is doing...)

cheers!
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3048
Location: The Blue Marble

PostPosted: Sat 11 Mar 2017, 08:56    Post subject:  

Very nice code. Do you mind if I get this included in Fatdog?
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 632

PostPosted: Sat 11 Mar 2017, 10:17    Post subject:  

jamesbond wrote:
Very nice code. Do you mind if I get this included in Fatdog?


+1


Told ya, Mochi, it was just a matter of time. Wink Quickview has worked great in all the dpup-stretch builds I'm experimenting with. Never even thought to drop it in Fatdog64, I assumed it would not work right out of the box. Gonna try now that James posted Very Happy
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 679

PostPosted: Sat 11 Mar 2017, 11:40    Post subject:  

belham2 wrote:
Never even thought to drop it in Fatdog64, I assumed it would not work right out of the box. Gonna try now that James posted Very Happy
I already tested it mate.
Works nicely in Fatdog.

Most scripts work in 62 bit as well as 32 bit.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1247
Location: Japan

PostPosted: Sun 12 Mar 2017, 05:18    Post subject:  

vovchik wrote:
thanks for the scaling preference
Your idea Wink

mavrothal wrote:
A couple of issues that you might consider addressing
Me? Shocked For complaints or suggestions regarding GtkFileChooserDialog you should contact https://www.gtk.org/development.php. I have no influence on what is displayed in the Places panel.

mavrothal wrote:
there is also no indication if a partition is mounted
Well, there is: If a partition is mounted, it is listed. If it is not mounted, it is not listed.

mavrothal wrote:
Partitions auto-mount if clicked upon
How do you manage to click on unmounted partitions when they are not visible? And why should they automount? All entries in the left panel (except for the Search box) are mere links.

BTW: This thing behind mm_quickview in your screenshot suggests that you are using GTK+3. Gtkdialog seems to be compiled with an older version of GTK+2. Thunor has prepared switches to compile gtkdialog with GTK+3. Since the file chooser has been developed further, looks different in GTK+3 and addresses some of the issues you mentiond, it would be interesting to see how an updated gtkdialog displays the chooser widget. Results of such experiment could be posted in http://www.murga-linux.com/puppy/viewtopic.php?p=941690], but not here. I will continue to use gtkdialog as is.

greengeek wrote:
Alternatively if I terminate the window by clicking the X button it does not remember the directory
That's a deliberate feature. You may stray into obscure directories but may not necessarily want to restart from there.
Ctrl+Q or Close button: Last directory and geometry are saved
Alt+F4 or X button: Nothing is saved

jamesbond wrote:
Do you mind if I get this included in Fatdog?
I don't mind but I have concerns Laughing
- Neither code nor functionality are finished
- I can't test the script sufficiently and can not provide support for different environments.
- I regard this project as a proof-of-concept, not as a polished application (hence my posting in the Programming forum). I still don't know how this will develop. Next step will be on-demand information for selected directories. Then the big topic of adding shell commands. It ain't ready yet.

@belham2,drunkjedi: Thanks for testing.

Questions:
I repeat my earlier question: In tahrpup ffprobe and ffplay are missing. Autoplay is not supposed to work. Does tahrpup offer alternatives?

New question: Could someone suggest a better name? Quickview is already taken. It's the name of a function in Total Commander and it is also the name of a famous commercial application. Internally I call it fileviewer, which is even more dull.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 822

PostPosted: Sun 12 Mar 2017, 07:42    Post subject:  

viewmate
_________________
Fatdog64-710|+Packages|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
perdido


Joined: 09 Dec 2013
Posts: 449
Location: Altair IV , Just north of Eeyore Junction.

PostPosted: Sun 12 Mar 2017, 10:35    Post subject:  

Playing with the Mochi file browser on Precise5.7.1. Looks good and promising!

I like how it has total disk space used by directory when hilighting a directory.

Also good that it launches applications

Makes me smile how easy it is to review music files without launching a program. Nice!

Thanks MochiMoppel! Smile

_________________
.
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2846

PostPosted: Sun 12 Mar 2017, 10:54    Post subject:  

MochiMoppel wrote:
mavrothal wrote:
there is also no indication if a partition is mounted
Well, there is: If a partition is mounted, it is listed. If it is not mounted, it is not listed.

mavrothal wrote:
Partitions auto-mount if clicked upon
How do you manage to click on unmounted partitions when they are not visible? And why should they automount? All entries in the left panel (exept for the Search box) are mere links.

BTW: This thing behind mm_quickview in your screenshot suggests that you are using GTK+3. Gtkdialog seems to be compiled with an older version of GTK+2. Thunor has prepared switches to compile gtkdialog with GTK+3. Since the file chooser has been developed further, looks different in GTK+3 and addresses some of the issues you mentiond, it would be interesting to see how an updated gtkdialog displays the chooser widget. Results of such experiment could be posted in http://www.murga-linux.com/puppy/viewtopic.php?p=941690], but not here. I will continue to use gtkdialog as is.


As the image hints to, I used Peebee’s LxPupSc-latest in this case. Is using openbox/pcmanfm and has no-gtk3-anything. Still, I ldd’ed both pcmanfm and gtkdialg just in case and have no gtk3 dependencies. gtkdialog is v 0.8.4 with support for gtk+ 2, glade and VTE. gtk2 is v2.24.
PCmanFM shows partitions regardless of mount status and so quickview in this setup.

Another little thing I notice regarding symlinks to folders, is that they show as “0 /path/to/symlink” in the info window. Is of course accurate, but could be confusing when clicking to a “0” content folder opens a folder with (many) items.
In general you might want to revisit how to present symlinks, ie “just the fact” or their target. Is a toss up I would think. Maybe user configurable?…

Finally, I do not know if it is possible but would be nice to also have line wrapping (in analogy to “fit image”) in text files.

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
drunkjedi


Joined: 24 May 2015
Posts: 679

PostPosted: Sun 12 Mar 2017, 11:59    Post subject:  

MochiMoppel wrote:
New question: Could someone suggest a better name? Quickview is already taken. It's the name of a function in Total Commander and it is also the name of a famous commercial application. Internally I call it fileviewer, which is even more dull.
How about GTK_Filer
step wrote:
viewmate
I liked that name but google says there's a CAD data viewer with that name. Would it matter?
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1583

PostPosted: Sun 12 Mar 2017, 13:38    Post subject:  

Hey Mochi

Very nice script, indeed.

MochiMoppel wrote:
I repeat my earlier question: In tahrpup ffprobe and ffplay are missing. Autoplay is not supposed to work. Does tahrpup offer alternatives?

Try avprobe/avplay.
___________

Anyway, I'm here because Fatdog does not come with xclip pre-installed and I wanted to suggest a solution, e.g.:
Code:
which xclip 2>/dev/null && CLIP='xclip -i' || CLIP='xsel -i'
...
echo -n "$vCHOOSER"   | ${CLIP}

I also added double quotes around $vCHOOSER, because otherwise 'echo' squeezes whitespaces, if there's more than one of them in a row.


Oh, and in order to make it more multi-user-friendly, you may want to:
Code:
TEMPDIR=/tmp/mm_quickview.${USER}

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 4535
Location: New Zealand

PostPosted: Sun 12 Mar 2017, 14:17    Post subject:  

MochiMoppel wrote:
New question: Could someone suggest a better name? Quickview is already taken. .
mox

mmoxy

mmoxview

moxview

uniview

viewmmer

zoommer

zoommox

viewmmox

emmviewer

It'd be nice to see a "double m" in there somewhere.
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 632

PostPosted: Sun 12 Mar 2017, 15:02    Post subject:  

MochiMoppel wrote:


New question: Could someone suggest a better name? Quickview is already taken. It's the name of a function in Total Commander and it is also the name of a famous commercial application. Internally I call it fileviewer, which is even more dull.



Well, you all can call it whatever you want, but I actually in truth use "MochiView" in my menu entries, tray bars and .desktop and anyhting else. In the .desktop comment for my builds I always write "QuickView aka MochiView File Manager" so people know if they use one. The name "MochiView" lets me identify it immediately. To me it is simply, honorably, and correctly called: Wink

MochiView File Manager
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3048
Location: The Blue Marble

PostPosted: Sun 12 Mar 2017, 15:12    Post subject:  

MochiMoppel wrote:
jamesbond wrote:
Do you mind if I get this included in Fatdog?
I don't mind but I have concerns Laughing

Thanks.
Quote:
- Neither code nor functionality are finished
Ok. We don't mind waiting for a while. Anyway, once we get it in, we hope to track this as it progresses.
Quote:
- I can't test the script sufficiently and can not provide support for different environments.
That's okay - we're going to handle that (now that both step and SFR have responded Very Happy)
Quote:
- I regard this project as a proof-of-concept, not as a polished application (hence my posting in the Programming forum). I still don't know how this will develop. Next step will be on-demand information for selected directories. Then the big topic of adding shell commands. It ain't ready yet.
Sometimes perfect is the enemy of good. The way I see it, it already serves a good purpose. We're happy to take it as it is; and as you continue with the improvement, we'll track it.

Quote:
New question: Could someone suggest a better name?

I'm a bit surprised nobody has suggested this. The "glorious" name, of course:
- Puppy Viewer (pview, PView, Pview, pviewer, PViewer, Pviewer, pupview, PupView, pupviewer, PupViewer, PuppyView, etc)
- Puppy File Viewer (pfileview, pupfileview, pupfview, and all other caps/no-caps combinations as above)
- Puppy (File) Preview (ppreview, pfpreview, and other abbrev/caps/no-caps combinations)
- Puppy Universal Viewer (pupuview(er), puview(er), etc)
- MochiView / MochiViewer / MochiFileViewer (mview(er), mfileview(er), mpupview(er), etc)
- Mother of All File Viewer (mview(er), momview(er), etc)
- I'm sure other names along this line will be easy to come up with.

EDIT: belham2 beat me to MochiView, but at least I still have other good ideas Twisted Evil

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1932
Location: In The Way

PostPosted: Sun 12 Mar 2017, 16:01    Post subject:  

It shall be named
    MiView
M (och) i
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 5 of 8 [119 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1529s ][ Queries: 14 (0.0063s) ][ GZIP on ]