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 Thu 20 Jul 2017, 16:59
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 11 of 11 [155 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1296
Location: Japan

PostPosted: Thu 29 Jun 2017, 21:21    Post subject:  

stemsee wrote:
When previewing images/text/pdf etc what would it take to implement pinch to zoom in the preview window?..
1) Installing at least GTK 3.14 (introduced the GtkGesture object)
2) Modifying the gtkdialog source code to support it. Good luck! Laughing
Back to top
View user's profile Send private message 
stemsee

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

PostPosted: Fri 30 Jun 2017, 08:31    Post subject:  

MochiMoppel wrote:
1) Installing at least GTK 3.14 (introduced the GtkGesture object)
2) Modifying the gtkdialog source code to support it. Good luck! Laughing


Pinch to zoom in/out works in geany and viewnior and browsers so teir gtkdialog source code must already be modified, right?
Back to top
View user's profile Send private message MSN Messenger 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1296
Location: Japan

PostPosted: Fri 07 Jul 2017, 11:09    Post subject:  

Some unfinished business:

stemsee wrote:
Pinch to zoom in/out works in geany and viewnior and browsers so teir gtkdialog source code must already be modified, right?
Wrong. None of them uses gtkdialog.

mime-types

some1 wrote:
There are ways to update the mime-database -
and for USER to apply his/her own types.
For Lucid users this would be close to impossible as neither the update utility nor the database are included. And for updating the mime-types of directories and symlinks this may not even be sufficient. File must be clever enough to know what a directory is. No need for a database but maybe a recompilation as musher0 suggested? Who knows. Bottomline: this mime stuff is not trivial and I don't expect users to tinker with these files. If Lucid can't be changed, then MMview must change. I like Lucid and I'm pretty confident that I can adapt the script to Lucid's quirks, maybe not 100% but almost. If the changes don't affect overall performance I will do it. A new challenge Laughing

contrast

musher0 wrote:
About the lack of contrast of a particular GTK2 theme, you could leave your general GTK2 theme alone and use a second GTK2 theme that has the contrast you want, expressly for Mochi's MMView
The easiest solution with the best performance possible is no theme at all. Either calling MMview with a small script
Code:
#!/bin/bash
export GTK2_RC_FILES=
/path/to/mm_view

or inserting export GTK2_RC_FILES= at the beginning of the mm_view script. The result is a well balanced, no-nonsense, retro-style look from the 90s (see screenshot). I'm inclined to do that and give MMview a distinctive look, but I'm afraid users would kill me.

It is also possible to style only the leftmost "Places" pane and the main file list. Zigbert's GtkDialog - tips tread has an example how to enforce monospace text. Similar approach is possible for the chooser widget. This could be placed somewhere at the beginning of the script:
Code:
MMSTYLE=/tmp/mm_view/mmstyle.txt
echo '
style "MMV" {
base[SELECTED]="Navy"                    # background of selected and focussed item
text[SELECTED]="white"                   # text color of selected and focussed item
base[ACTIVE]="LightSteelBlue"            # background of marked but unfocussed item
text[ACTIVE]="black"                     # text color of marked but unfocussed item
} class "GtkTreeView" style "MMV"
' > $MMSTYLE
export GTK2_RC_FILES=$MMSTYLE:/root/.gtkrc-2.0

I prefer to make no changes to MMview and count on the users to use a suitable theme that suits their taste and needs.
mm_view_themeless.png
 Description   
 Filesize   50.67 KB
 Viewed   222 Time(s)

mm_view_themeless.png

Back to top
View user's profile Send private message 
dancytron

Joined: 18 Jul 2012
Posts: 782

PostPosted: Fri 07 Jul 2017, 18:21    Post subject:  

Nothing worthwhile to add, other than I just tried this out and it is really good.
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 96
Location: Polish ancestry in UK

PostPosted: Sun 16 Jul 2017, 20:04    Post subject: possible universal 'playlist' manager
Subject description: that works with most file-managers
 

Nice project - I really like it.

I've also found something extra you might find useful to handle right-click options in any file manager. It's xhplay (by mcewanw) which in conjunction with his modified xhippo can be used as a kind of universal 'playlist' manager, with which you can select from list of files what to play or view or edit or work on generally. It's not perfect as it stands, but works quite well, and I'm using it to make playlists of Audio files/video files and/or image files (jpg, animated gif, whatever...) but with slight mod of xhplay I've discovered you can also use any kind of file in a playlist (html, pdf, rtf, doc - again whatever. mcewanw probably already knew that...).

Overall I use the combination of file manager and xhippo/modded-xhplay as a rudimentary, easy to understand document management system - just calling up previously constructed playlists whenever wanted and using xhippo to control what to play/view/edit. To load files into xhippo you just highlight them in a filemanager and drag them into xhippo window (or use file manager right-click command Open-with for those filemanagers that provide that facility). You can also load any pre-made playlists (of any mixed file types) directly using xhippo load playlist command in xhippo itself.

I've recently posted in mcewanw's xhippo thread (link below) with details in the hope that he'll improve on my rough idea and supply a dotpet (since I can't do that). Also hoping he'll modify xhippo itself (or similar program 'potamus') to allow passing new file items into an already active playlist, but I he hasn't responded to my post yet. Though I'm no programmer myself I used to manage a small programming team that mcewanw helped me with in the past, and he had a virtual network with programming resources on it, which I still login to. However I haven't been in touch with him personally for a long time cos I've not been active in computing world - hopefully he'll get back to me on this if not via the forum.

I'm sure he'd like your universal file viewer program and maybe contribute.

It's nice.

Here is the xhplay/xhippo link (to my post on mcewanw xhippo thread):

http://www.murga-linux.com/puppy/viewtopic.php?p=960816#960816

wiak
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 11 of 11 [155 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11
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.0651s ][ Queries: 15 (0.0120s) ][ GZIP on ]