popup menus in .desktop files



Hi,

We have received several requests to make it possible for the user to 
specify additional entries in the contextual menu of a .desktop file
(shown by a LMB click) . So for example that a floppy icon on the .desktop
can be extended by a entry "Format Floppy" , just as example.

We implement this by storing the information about such entries in the
.desktop file itself (as well as providing mimetype/servicetype dependand
ways of specifying entries, but that's another issue) .

Now the reason why posting here is that I'd like to discuss whether
there's a chance to agree on a common standard for the menu entry
definition, as I guess that GNOME does/will provide this functionality as
well.

As a starting point I show what we currently use as keys in the
.desktop files:

1) All menu entry definitions are contained in a "[Menu]" group

2) The key "Menus", as string list, separated by a ",", contains the names
   of all menu keys.

3) The menu keys contain the actual information about the menu entry
   itself then, as a string list again (separated by "," , as you might
   have guessed ;-)

   This list contains three entries, the first being the name of the
   item (in the menu), the second being the name of the pixmap and the
   third entry being the command to execute.

Example for a .desktop file showing a floppy icon:

....
_other_stuff_here
....
[Menu]
Menus = FormatExt2, FormatDos

FormatExt2 = Format Floppy (EXT2), formatext2.xpm, floppy_format_app
FormatDos  = Format Floppy (DOS), formatdos.xpm, another_format_app_here
...

What do the GNOME guys think? Is there a chance to agree on a common
naming? What namings do you prefer?

Everything is open for discussion I think :-)

Greetings,
 Simon





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]