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 Mon 01 Sep 2014, 22:14
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Default Applications Wizard - version 003
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
Iguleder


Joined: 11 Aug 2009
Posts: 1889
Location: Israel, somewhere in the beautiful desert

PostPosted: Mon 31 May 2010, 07:41    Post subject:  Default Applications Wizard - version 003
Subject description: A useful wizard for selecting the default applications
 

Well ... I think Puppy really needs this thing.

It's not ready, but it works. It needs to be more user friendly and less ugly. Currently it is able to determine and set the default applications, but it needs to be designed better.

It's my first gtkdialog project, but I'm an experienced programmer. Using HTML syntax with a PyGTK-like thing is killing me Smile

Any suggestions/comments are welcome.

Changelog:
- 31/5: version 001, an ugly version that does whatever it does and works
- 10/6: 002, detection of installed applications, UI fixes
- 10/6: 003, 6 times faster detection, minor fixes, way more efficient

See the replies for newer versions Idea
pdefaultapps.png
 Description   
 Filesize   23.94 KB
 Viewed   2083 Time(s)

pdefaultapps.png

pdefaultapps-001.pet
Description 
pet

 Download 
Filename  pdefaultapps-001.pet 
Filesize  1.24 KB 
Downloaded  523 Time(s) 

_________________
My homepage

Last edited by Iguleder on Thu 10 Jun 2010, 13:53; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
tasmod


Joined: 04 Dec 2008
Posts: 1461
Location: North Lincolnshire. UK

PostPosted: Mon 31 May 2010, 09:58    Post subject:  

Like this?
apppic.jpg
 Description   
 Filesize   34.98 KB
 Viewed   2096 Time(s)

apppic.jpg


_________________
Rob
-
The moment after you press "Post" is the moment you actually see the typso Cool
Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2376
Location: UK

PostPosted: Mon 31 May 2010, 10:17    Post subject:  

Damn!! I was gonna post something very similar in a couple of days.. Oh well..
_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
tasmod


Joined: 04 Dec 2008
Posts: 1461
Location: North Lincolnshire. UK

PostPosted: Mon 31 May 2010, 10:19    Post subject:  

This is really a programmers app.

A 'newbie' would have no idea what mozstart was.

You need to construct a translation/lookup table to determine what apps are available in the iso in easy to understand terms.

i.e. mozstart = SeaMonkey or whatever (Firefox maybe)

_________________
Rob
-
The moment after you press "Post" is the moment you actually see the typso Cool
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1889
Location: Israel, somewhere in the beautiful desert

PostPosted: Mon 31 May 2010, 14:12    Post subject:  

tasmod, thank you very much for your help!

Yes, I think I'm going to make drop-down lists with available applications or something, I'll do that till Saturday.

Should be cool Smile

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
sc0ttman


Joined: 16 Sep 2009
Posts: 2376
Location: UK

PostPosted: Mon 31 May 2010, 17:14    Post subject:  

I have a quick question.. Does the function 'set program' support adding parameters to the command to be used as the default?

For example, for a mail client, many people will want to use "seamonkey -mail", but I believe the set_program function will not support such inputs..

Code:
if [ "`which $2`" != "" ]; then

  echo "#!/bin/sh" > /usr/local/bin/$1
  echo "exec $2 \"\$@\"" >> /usr/local/bin/$1


This code is very similar to something I am using, but mine does not support adding parameters... Sad

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
tasmod


Joined: 04 Dec 2008
Posts: 1461
Location: North Lincolnshire. UK

PostPosted: Tue 01 Jun 2010, 04:21    Post subject:  

This has minor changes to achieve the above gui.

Text spacings formatting and centering of gui onscreen.

Note: -c -p mean centre and program respectively.
pdefaultapps-001.pet
Description 
pet

 Download 
Filename  pdefaultapps-001.pet 
Filesize  1.34 KB 
Downloaded  405 Time(s) 

_________________
Rob
-
The moment after you press "Post" is the moment you actually see the typso Cool
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1889
Location: Israel, somewhere in the beautiful desert

PostPosted: Tue 01 Jun 2010, 05:06    Post subject:  

sc0ttman wrote:
I have a quick question.. Does the function 'set program' support adding parameters to the command to be used as the default?


Yes, it does.

Basically, it writes a simple script.

Code:
#!/bin/sh
exec <what you entered> "$@"

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Iguleder


Joined: 11 Aug 2009
Posts: 1889
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 10 Jun 2010, 04:26    Post subject:  

Here's a new version. Now it finds all the applications you have installed and lists them. Something sc0tt's wizard doesn't do (btw, take it and apply it on yours, I like your wizard enough to let you) Smile

TODO: make it auto-select the one you are using right now. Piece of cake, I'll do it within a couple of days. Wink
pdefaultapps-002.gz
Description 
gz

 Download 
Filename  pdefaultapps-002.gz 
Filesize  1.14 KB 
Downloaded  386 Time(s) 
defwiz-002.png
 Description   
 Filesize   44.47 KB
 Viewed   1934 Time(s)

defwiz-002.png


_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11034
Location: Arizona USA

PostPosted: Thu 10 Jun 2010, 08:04    Post subject:  

If I install a program (say, from the .pet list,) will it be automatically added to the drop-down list? If not, how can I add it to the list, so I can choose to make it the default application?
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1889
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 10 Jun 2010, 08:49    Post subject:  

If the .desktop file has the right syntax and proper category/description, it should be added automatically Smile

Working on a more efficient 003, less usage of "cat".

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Iguleder


Joined: 11 Aug 2009
Posts: 1889
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 10 Jun 2010, 09:37    Post subject:  

Here it is.

Improvements:
- Prevents the user from entering invalid programs
- Starts about 6 times faster, does everything at once instead of repeating the procedure 6 times and running "cat" so many times for nothing
- Way more efficient
- Selects the current default application and puts it on the top of the list

EDIT: reuploaded, 2 typos ... as you can see, Geany is an image editor Embarassed
pdefaultapps-003.gz
Description 
gz

 Download 
Filename  pdefaultapps-003.gz 
Filesize  1.47 KB 
Downloaded  500 Time(s) 
003.png
 Description   
 Filesize   40.64 KB
 Viewed   1996 Time(s)

003.png


_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
sc0ttman


Joined: 16 Sep 2009
Posts: 2376
Location: UK

PostPosted: Thu 10 Jun 2010, 10:29    Post subject:  

Iguleder wrote:
Here it is.

Improvements:
- Prevents the user from entering invalid programs
- Starts about 6 times faster, does everything at once instead of repeating the procedure 6 times and running "cat" so many times for nothing
- Way more efficient
- Selects the current default application and puts it on the top of the list

EDIT: reuploaded, 2 typos ... as you can see, Geany is an image editor Embarassed

Nice work.. I like the way you automatically search the .desktop files..

But I just installed your tool and it didn't find my firefox or browser-installer .desktop files (not created by myself)
The reason is that they both seem to use the category "WebBrowser", not the normal "Internet" category..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1889
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 10 Jun 2010, 10:33    Post subject:  

Yeah, I need to see how things are arranged in different PETs. I did all tests against vanilla 4.3.1 with only GIMP installed, so it's not perfect.

Gotta add all categories ... the underlying structure is ready and working, so it won't be a problem, just some extra conditions.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
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.0744s ][ Queries: 12 (0.0041s) ][ GZIP on ]