Menu Entry Maker 1.1

Miscellaneous tools
Message
Author
User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#31 Post by Geoffrey »

Hi smokey01

Thanks for the kinds words, the icon in the screenshot is because I'm using the Blue-Moon icon theme.

As for drag and drop you can do the same with this version also.

I just made a pet package of it so I'll upload it here

Geoffrey
Attachments
menumaker-1.1.4.pet
(2.16 KiB) Downloaded 556 times

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#32 Post by smokey01 »

Geoffrey wrote:Hi smokey01

As for drag and drop you can do the same with this version also.

Geoffrey
Yes but it doesn't take you to where the icons are located which makes it easier to drag and drop them into the white space.

The same principle with the executable.

Sorry I must not have made myself clear.

Thanks

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#33 Post by Geoffrey »

smokey01 wrote:
Geoffrey wrote:Hi smokey01

As for drag and drop you can do the same with this version also.

Geoffrey
Yes but it doesn't take you to where the icons are located which makes it easier to drag and drop them into the white space.

The same principle with the executable.

Sorry I must not have made myself clear.

Thanks
smokey01

Yes, I had a look at your script, I see what you mean now, though I'm thinking that I may find a more elegant way to do it.

It doesn't really need the path to the icon included, only the icon name as it will be found anyway as it is already in the path,

so you could just type the name of the icon and it will work just the same, you can try that and you will see what I mean.

icons will be found if they are in /usr/share/icons and /usr/share/pixmaps as well.

As an example if I want to add the icon /usr/local/lib/X11/mini-icons/abiword_16.xpm

I only need type in abiword_16 the xpm extension isn't needed either

the only time you need the path to the icon is if it's located in a different directory, such firefox for instance

then the path to the icon would be /usr/lib/firefox/icons/mozicon128.png.

Here's a test you can do to see how it works, copy the feed_icon.png to /usr/share/icons then create a menu entry, just give it a title and description

no need for a app and for the icon just type in "feed_icon" and look at the menu, it should have that icon.

Geoffrey
Attachments
feed_icon.png
(1.54 KiB) Downloaded 1395 times

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#34 Post by Geoffrey »

Well I've done some more work on this script,

before I get on with it, in my previous post I stated that "icons will be found if they are in /usr/share/icons and /usr/share/pixmaps as well."

I was wrong, they won't be found in /usr/share/pixmaps.

As for the script I've done some more improvements, this will be called 1.1.5, the first thing I've changed is that it now removes the

path text for the exec, only for /usr/bin, /usr/sbin, /usr/local/bin and the icons if their in /usr/share/icons and /usr/local/lib/X11/mini-icons.

It would have looked like this:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=menu entry maker 
Icon=/usr/local/lib/X11/mini-icons/mini.letter.xpm
Comment=menu entry maker 
Exec=/usr/sbin/menumaker
Terminal=false
Type=Application
Categories=AudioVideo
GenericName=menu entry maker 
But now looks like this, which is more inline with the standard:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=menu entry maker 
Icon=mini.letter.xpm
Comment=menu entry maker 
Exec=menumaker
Terminal=false
Type=Application
Categories=AudioVideo
GenericName=menu entry maker 
The other thing I did was to incorporate xdialog editbox, so now you can edit as well as delete existing menu entries.

I think someone was asking for that feature, which I feel is needed to make it a more useful application.

I will only upload a gz of it so those that are interested can test it for me, I did have a few bugs with the editor but it seems ok now.

once I know it's all ok I'll package it up,
Attachments
menumaker.gz
Menu Entry Maker 1.1.5
(2.26 KiB) Downloaded 470 times
Last edited by Geoffrey on Thu 05 May 2011, 05:23, edited 1 time in total.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#35 Post by Geoffrey »

well it still has a bug with the edit, if menumaker is run from the menu edit won't work, it's a path problem.

Edit looks for menumaker in root and can't find it, it works fine if the script is run directly no matter where it is.

I can't seem to be able to get my head around this, I must be missing something.
EDIT:
I found the problem it couldn't find the "pwd" for menuedit, so I defaulted it /usr/sbin, this means that menumaker as to be in that dir.

That should be ok it's a good place for it to live, I'll replace the gz file in the previous post, so the 7 people that downloaded it should get it again if they wish

It's still for testing, I just need some feedback as to whether it's acceptable as it is.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#36 Post by Geoffrey »

Here's another update, I added a conformation box for the delete, it was dangerous the way it was, resized the delete/edit menu window.

It's looking a lot better now, I haven't changed how it acquires icons or applications, if used with thunar file manager there is no drag and drop.

Will have to find another way to select icons, maybe a list with icon preview would be the way to go for stock icons.

It still needs to be in the /usr/sbin directory.
Image
Attachments
menumaker.gz
menumaker 1.1.6
(2.39 KiB) Downloaded 487 times

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#37 Post by Geoffrey »

Well this will be my last one, I'm happy with it, does all I need it to do.

this is version 1.1.7, basically a tidy up of the GUI's so that it is more uniform with different themes.

someone else maybe able to improve it.
Attachments
menumaker-1.1.7.pet
(2.86 KiB) Downloaded 526 times

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#38 Post by DaveS »

Geoffrey wrote:Well this will be my last one, I'm happy with it, does all I need it to do.

this is version 1.1.7, basically a tidy up of the GUI's so that it is more uniform with different themes.

someone else maybe able to improve it.
Something is wrong with the code here. Try as a command line say,

Code: Select all

rox /root/'some directory'
and see what happens :)
Works in Trios original :)
Spup Frugal HD and USB
Root forever!

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#39 Post by Geoffrey »

DaveS wrote:
Geoffrey wrote:Well this will be my last one, I'm happy with it, does all I need it to do.

this is version 1.1.7, basically a tidy up of the GUI's so that it is more uniform with different themes.

someone else maybe able to improve it.
Something is wrong with the code here. Try as a command line say,

Code: Select all

rox /root/'some directory'
and see what happens :)
Works in Trios original :)
I don't seem to understand what you mean, It works fine for me, though I edited the script with and am using it with quirky 120 NOP.

With no rox only thunar I don't have drag and drop functionality using thunar.

All the fields need to be filled for it to function correctly, this is about the only fault I've found with it,

example, if were to miss a entry, all entries after that wouldn't be added to the "xxx.desktop" file

Could you explain in a little more detail the problem, or suggest what needs to be fixed, I find this script very useful and would like fix it.

edit: I found a error, don't know if it as anything to do with the problem your having thought, I'll upload a new pet.
Attachments
menumaker-1.1.8.pet
new pet with a minor fix of a error in the script
(3 KiB) Downloaded 442 times

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#40 Post by DaveS »

Tried latest version, same problem. Here is the output when using rox /root/downloads/ as cmd line

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Downloads2
Icon=/usr/share/midi-icons/folder48.png
Comment=Downloads2
Exec=rox
Terminal=false
Type=Application
Categories=X-FilesystemUtility
GenericName=Downloads2
Exec=/root/downloads/
Terminal=false
Type=Application
Categories=X-FilesystemUtility
GenericName=Downloads2
Notice two exec commands. I did not use drag and drop to create command line, typed it in direct.
Spup Frugal HD and USB
Root forever!

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#41 Post by Geoffrey »

DaveS,

Ah, I see the problem, I will fix that, it's the way It cuts the data from the temp file, it won't copy the space in the field so sees it as two entries.

I'll get on to it ASAP, thanks for the feedback, let me know if you find anything else wrong. :wink:

Geoffrey

Edit: I fixed that problem, should be ok now DaveS, works a lot better, the code now look like this, the way it should

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Downloads2 
Icon=/usr/share/midi-icons/folder48.png
Comment=Downloads2 
Exec=rox /root/downloads/
Terminal=false
Type=Application
Categories=X-FilesystemUtility
GenericName=Downloads2 
Attachments
menumaker-1.1.9.pet
fixed problem as described by DaveS, please test this, let me know if any faults or functions missing compared to the original by Trio
(3 KiB) Downloaded 495 times

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#42 Post by Geoffrey »

DaveS,

I fixed it, see previous post

Geoffrey

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#43 Post by DaveS »

Working very nicely now thanks. I love the edit and delete functions :)
Spup Frugal HD and USB
Root forever!

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#44 Post by Geoffrey »

DaveS wrote:Working very nicely now thanks. I love the edit and delete functions :)
Thanks DaveS,

the edit function was already there, I just added the confirmation box to stop accidents and the edit is something that I thought it needed.

Over all it hasn't turned out to bad, I use it quite a bit, though I've never used in the manner that you showed me,

thanks I would never of realized, now I'm happy to see that it's working for you.

oh! yes, the problem of the with the (xxx.desktop) file not being usable if a entry preceding the exec entry is missed, seem to be fixed

so thats a bonus

Geoffrey

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#45 Post by DaveS »

Yes, its great to be able to add shortcuts to file locations, and even to be able to load a file in its parent application using a menu entry. This is especially useful for Puppies that use maybe Tint2 or Fbpanel where launcher options are more limited.
Much lighter on code than adding a launcher program.
I guess using this would make it reasonably easy to use say Openbox with no taskbar at all. :)
Spup Frugal HD and USB
Root forever!

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#46 Post by Geoffrey »

Yes DaveS,
Here is one of my creations, using the menu entry and alltray to build a dropdown menu in the system tray, works a treat.

Code: Select all

[Desktop Entry]
Version=1.0
Encoding=UTF-8
GenericName=WebCam Server
Comment=WebCam Server
Type=Application
Exec=alltray webcamserver -stask -na -s -m 'Start Server:webcam_start &' -m 'Stop Server:webcam_stop &' -m 'Open Viewer:/usr/share/webcam/webcam-viewer &' -m 'Close Viewer:/usr/share/webcam/webcam-viewer-stop &' -m 'Take Snapshot:/usr/share/webcam/snapshot &' -m 'Snapshots:rox -d /root/my-documents/webcam_snapshots/' -m 'Help:/usr/share/webcam/manual &'
Icon=camera-web.png
Categories=Network
Name=WebCam Server


User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#47 Post by Geoffrey »

Started a new thread here http://www.murga-linux.com/puppy/viewto ... 381#539381 so it makes it easier for me to update, won't get so messy.

User avatar
mahaju
Posts: 487
Joined: Mon 11 Oct 2010, 07:11
Location: between the keyboard and the chair

#48 Post by mahaju »

<just posting for further notifications>

Post Reply