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 21 Nov 2014, 23:28
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 Posts_count  
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: 13644
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

Edited_time_total
Back to top
View user's profile Send_private_message Visit_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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0489s ][ Queries: 12 (0.0037s) ][ GZIP on ]