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 Fri 25 Apr 2014, 04:07
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Can Xdg Menus Hierarchy be changed???
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
AnewJeff

Joined: 02 Jun 2008
Posts: 16

PostPosted: Thu 04 Sep 2008, 14:52    Post subject:  Can Xdg Menus Hierarchy be changed???  

I've added some educational apps, and I'd like for them to be listed within their own Menu-category.

I assumed they would be listed under "Education" since that's one of the recognized category-options for .desktop files.

Do I need to edit the "hierarchy" file in etc/xdg/menus?
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 04 Sep 2008, 15:44    Post subject:  

Hi Jeff,
as I know that you use Muppy, I will talk about this, too.
Muppy already contains some files you need.

Muppy uses GtkBasic-Panel (Muppypanel) as default menu.
You also can use Icewm, JWM, KDE or others.

Muppypanel uses /etc/xdg/menus/applications.menu to build the categories.
Also KDE and Gnome use it, it has become a standard to use it.
I modified it using one from KDE as a template, so that it matches better Puppys categories.
Education is included, so Muppypanel/KDE/Gnome should display that category "out of the box".

The menu categories for JWM and Icewm are defined in the templates in
/etc/xdg/templates

To add education, add to:
_root_.jwmrc
Code:
  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-education.menu


now also create a file:
/etc/xdg/menus/puppy-education.menu

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xfdesktop-menu PUBLIC "-//freedesktop//DTD Menu 0.8//EN" "http://www.freedesktop.org/standards/menu-spec/menu-0.8.dtd">
<Menu>
  <Name>Education</Name>
  <DefaultAppDirs/>
  <DefaultDirectoryDirs/>
  <Directory>Puppy-Education.directory</Directory>
   <Include>
      <Category>Education</Category>
      <Category>Languages</Category>
      <Category>X-KDE-Edu-Language</Category>
      <Category>Math</Category>
      <Category>Science</Category>
      <Category>Teaching</Category>
      <Category>X-KDE-Edu-Teaching</Category>
   </Include>
</Menu>



In /usr/share/desktop-directories/ you will find:
Education.directory
Copy it to:
Puppy-Education.directory

Edit the line with the icon, to point to an existing, matching icon.

Now we also must take care of icewm.
Add to:
_root_.icewm_menu

Code:
menu "Education" face-win24 {
  PUPPYMENU icewm-xdgmenu /etc/xdg/menus/puppy-education.menu
}


You might us a different icon here, too.

That's it with editing files.
Now rebuild the menu in a consolewindow:
fixmenus -force

After restarting your windowmanager, you should have the new "Education" menu.

LXPanel:

Muppy uses lxpanel 2.9.0 modified by Plinej.
http://www.murga-linux.com/puppy/viewtopic.php?t=25118

Here the categories are not dynamic.
They are hardcoded in C.
So Plinej had to add a category "education" and recompile.
Please ask him in that thread to do it.

This is one of the reasons, why I use my own menu.
Because like this, lxpanel also cannot be localized, you always have english categories, but not german or other languages..

Mark

_________________
my recommended links

Last edited by MU on Thu 04 Sep 2008, 17:24; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
AnewJeff

Joined: 02 Jun 2008
Posts: 16

PostPosted: Thu 04 Sep 2008, 16:42    Post subject: Worked perfectly!!!  

I can't thank you enough.


Jeff
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 » House Training » Users ( For the regulars )
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.0512s ][ Queries: 12 (0.0080s) ][ GZIP on ]