topic title: .desktop files
Posts: 1,081
OU812
Joined: 29 Sep 2007
#1
Hello. There are several taskbars available that rely on .desktop files to generate menu entries: fbpanel, lxpanel, and xfce panel to name of few. Also, there's this handy python script that will do the same for the icewm taskbar:


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.box-look.org/content/show.php/icemenuyap?content=88340"
linktext was:"http://www.box-look.org/content/show.ph ... tent=88340"
====================================


However, not all applications have .desktop files. So I took a cue from Dreamlinux and wrote a little script for generating .desktop files. Here's a screenshot:


If you're interested in testing it, here's the file. Just extract it, make sure it's executable, and move it to /usr/local/bin. You will need to run the app as root since it writes to the root directory. Please provide comments and feedback.


Updated 12/5/09

Thanks.

john
Last edited by OU812 on 05 Dec 2009, 18:37, edited 3 times in total.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#2
Great idea john! This is very nice to keep menus organized (not tested yet). And it's the antiX way of tweaking the system.
Next would be an app to build .deb files __{{emoticon}}__ (call eriefisher, maybe...)
Posts: 1,081
OU812
Joined: 29 Sep 2007
#3
Changelog:

1. Added option to select an application using a file browser. (You should still be able to enter the name or path"by hand.")

2. Added some categories based on xfce. (Previous categories mostly based on fbpanel.)

john

BTW Unless someone finds a bug, this should be complete.
Posts: 1,081
OU812
Joined: 29 Sep 2007
#4
Changelog:

1. Edited category options
2. Changed layout
3. Added a name of file option

john
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#5
I'll review and translate it.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#6
John, the 'Filename prefix for save:' field is quite confounding. Yesterday when I used this app for the first time I didn't figure what it meant and left blank (not a good idea, of course). It could perhaps be changed to 'File name:' instead.

I've translated it and this pt_BR version has the equivalents of 'Name in menu' for 'Menu name' (which is the same thing but the pt term makes a better distinction) and 'File name' for 'Filename prefix for save'.

EDIT- anti, I replaced the file with fixed application categories. They are:

Code: Select all

    <frame Menu category:>
    <combobox>
      <variable>CATEGORY</variable>
      <item>AudioVideo</item>
      <item>Development</item>
      <item>Education</item>
      <item>Game</item>
      <item>Graphics</item>
      <item>Network</item>
      <item>Office</item>
      <item>Settings</item>
      <item>System</item>
      <item>Utility</item>
    </combobox>
    </frame>
Last edited by secipolla on 04 Dec 2009, 11:50, edited 2 times in total.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#7
John, while the categories in the app are pretty close, they should be changed to the main standard categories:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://standards.freedesktop.org/menu-spec/latest/apa.html"
linktext was:"http://standards.freedesktop.org/menu-s ... t/apa.html"
====================================
" onclick="window.open(this.href);return false
AudioVideo Development Education Game Graphics Network Office Settings System Utility

One of the above categories must be in the .desktop file. If there is two of them then the app will appear in two places in the menu. I tested a file with 'Utilities' and it would go to 'Other' in the menu while 'Utility' would go to 'Accessories' which is an alias for it.

obs- I'll update them on the br version and re-upload.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#8
I left the last field with the equivalent of 'File name (.desktop):'
Posts: 1,081
OU812
Joined: 29 Sep 2007
#9
Changelog:

1. Edited filename for save option for clarification.
2. Edited category options for compliance.
3. Changed layout to be more consistent with screenshot, icewmcc, etc. apps.


john
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#10
Here's in pt_BR with the new layout.
Posts: 1,081
OU812
Joined: 29 Sep 2007
#11
I wonder if we should change"Menu name" to"Menu description" and"File name" to"App name".

john
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#12
OU812 wrote:I wonder if we should change"Menu name" to"Menu description" and"File name" to"App name".

john
For me it's ok the way it is. In Portuguese I left 'File name (.desktop)' to be very clear and I find it's clear enough now.
Posts: 1,081
OU812
Joined: 29 Sep 2007
#13
OK, thanks. I'll see if I can find a way to error check so that if the user enters"name.desktop" it will be stripped.

john

Perhaps I can send it to one of the perl scripts we already have.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#14
Which are the pre-requisites to run it? I tried to in a Debian install and it didn't run.
Posts: 1,081
OU812
Joined: 29 Sep 2007
#15
gtkdialog and zenity

john