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 23 May 2013, 22:05
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GtkDialog fileselector Question
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
RSH


Joined: 05 Sep 2011
Posts: 1564
Location: Germany

PostPosted: Fri 30 Mar 2012, 08:30    Post subject:  GtkDialog fileselector Question  

How can i make the gtkdialog fileselector showing only files with a given extension?

- how to make it shows only *.sfs
- how to make it shows only *.jpg
- how to make it shows only *.odt

etc.pp.

_________________
Useful Software for Puppy!
LazY Puppy - a Paradise Puppy! - DE & EN ISO 2.0.2-0.0.5 available
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5243
Location: Valåmoen, Norway

PostPosted: Fri 30 Mar 2012, 11:18    Post subject:  

Code taken from the save-dialog of pmusic which shows only *.m3u files.

Code:
      <hbox>
       <text><label>'$LOC281'</label></text>
       <entry accept="file" width-request="300" fs-filters="*.m3u" fs-folder="'$DIR'" fs-title="Pmusic - '$LOC102'">
        <variable>SAVEFILE</variable>
        <input>cat '$WORKDIR'/last_added_playlist</input>
       </entry>
       <button>
        <input file stock="gtk-open"></input>
        <action type="fileselect">SAVEFILE</action>
       </button>
      </hbox>

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
RSH


Joined: 05 Sep 2011
Posts: 1564
Location: Germany

PostPosted: Fri 30 Mar 2012, 12:58    Post subject:  

zigbert wrote:
Code taken from the save-dialog of pmusic which shows only *.m3u files.

Code:
      <hbox>
       <text><label>'$LOC281'</label></text>
       <entry accept="file" width-request="300" fs-filters="*.m3u" fs-folder="'$DIR'" fs-title="Pmusic - '$LOC102'">
        <variable>SAVEFILE</variable>
        <input>cat '$WORKDIR'/last_added_playlist</input>
       </entry>
       <button>
        <input file stock="gtk-open"></input>
        <action type="fileselect">SAVEFILE</action>
       </button>
      </hbox>


Thanks a lot, zigbert!

I know, i should have post my next question also in the first post - but did forget it. Embarassed

Is there any possibility to combine these extensions/filters? So it does show f.e. *.jpg and *.png?

_________________
Useful Software for Puppy!
LazY Puppy - a Paradise Puppy! - DE & EN ISO 2.0.2-0.0.5 available
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
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.0474s ][ Queries: 11 (0.0116s) ][ GZIP on ]