Reply
Thread Tools
Posts: 66 | Thanked: 9 times | Joined on Mar 2010 @ Netherlands
#101
Originally Posted by uncleboarder View Post
Grimm,

Thanks for your example! Yes I'd changed mine to Ed.menu but I didn't want to confuse things by trying to explain that as well.

Oh... your instructions for the hildon.menu still show <MergeDir>hildon/</MergeDir>

It didn't work until I changed it to <MergeDir>Grimm/</MergeDir>

I just wanted to add that in case others try to follow along.
this is because you put your custom .menu in /grimm

if you had put it in /hildon it would would have worked as is.
so for future reference, you can just put your custom .menu's in the /hildon directory.
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#102
It will. be in the regular m-h-d. I am now working on another issue - opening status menu with a dbus command, and when it works, I'll release 1.15.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 
Posts: 46 | Thanked: 25 times | Joined on Nov 2009 @ Michigan, USA
#103
Bump!

Sorry if there's another thread for that I missed (there are way too many PR1.2 complaint threads), but is there anyway to get the More... folder back after PR1.2?

I tried a couple things with the leaked PR1.2, but now that the official is out and everybody had time to mess with it, could anyone get folders back? Here are my er... observations (?) of sorts: http://www.fwrnando.com/2010/05/no-folders-on-pr1-2/ If I have anything wrong there, please correct me!

Thanks.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#104
I couldn't get the More folder back, but I've had no problem creating other folders.

Here's my ~/.config/menus/hildon.menu:
Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>

  <Name>Main</Name>

  <!-- Search only in the hildon directory. -->
  <AppDir>/usr/share/applications/hildon</AppDir>
  <AppDir>/home/user/.local/share/applications/hildon</AppDir>
  <DirectoryDir>/usr/share/applications/hildon</DirectoryDir>
  <DirectoryDir>/home/user/.local/share/applications/hildon</DirectoryDir>

  <OnlyUnallocated/>
  <Include>
    <All/>
  </Include>

  <MergeDir>submenus</MergeDir>

  <Layout>
    <Filename>browser.desktop</Filename>
    <Filename>FBReader.desktop</Filename>
    <Filename>calendar.desktop</Filename>
    <Filename>osso-addressbook.desktop</Filename>
    <Filename>rtcom-call-ui.desktop</Filename>
    <Filename>hildon-application-manager.desktop</Filename>
    <Filename>osso-xterm.desktop</Filename>
    <Filename>modest.desktop</Filename>
    <Filename>rtcom-messaging-ui.desktop</Filename>
    <Filename>hildon-control-panel.desktop</Filename>
    <Menuname>debian.directory</Menuname>
    <Menuname>games.directory</Menuname>
    <Menuname>media.directory</Menuname>
    <Menuname>network.directory</Menuname>
  </Layout>

</Menu>
And the ~/.config/menus/submenus/travel.menu file:
Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>
  <Name>Main</Name>
  
  <Menu>
    <Name>Travel</Name>
    <Directory>travel.directory</Directory>
    <Include>
      <Filename>cservices.desktop</Filename>
      <Filename>easypark.desktop</Filename>
      <Filename>libellule.desktop</Filename>
      <Filename>location-test-gui.desktop</Filename>
      <Filename>nokia-maps.desktop</Filename>
      <Filename>offscr-speedometer.desktop</Filename>
      <Filename>qypy.desktop</Filename>
      <Filename>sygic.desktop</Filename>
      <Filename>travelapp.desktop</Filename>
      <Filename>tubes.desktop</Filename>
      <Filename>worldclock.desktop</Filename>
      <Filename>uktrainplanner.desktop</Filename>
    </Include>
  </Menu>
</Menu>
 

The Following 5 Users Say Thank You to Rob1n For This Useful Post:
Nathraiben's Avatar
Posts: 267 | Thanked: 408 times | Joined on May 2010 @ Austria
#105
Thanks a lot to all the genii in this thread! No more scrolling through 75+ icons...



Though I really hope that one day there'll be a graphical interface for this - I had a lot of fun messing with those XML-Files, but being forced to use CTRL-Shift-X every time I made a typo in one of them... well, let's just say I really don't believe the N900's keyboard was made for using key combinations...

Special thanks to Rob1n for posting those example files. I rather enjoy the concept of simply MergeDir-ing the folders in, especially since that way one only has to edit the hildon.menu file once (other than for re-ordering reasons - but I myself even completely removed the Layout-Tags).

That's actually a big advantage to me, since I tend to keep my podgy fingers over those icons far too long, thus activating the new re-positioning mode. Which then completely overwrites my hildon.menu...

But thanks to that concept all the important information's savely stored away in the submenu folder.
 
Posts: 4,556 | Thanked: 1,624 times | Joined on Dec 2007
#106
Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>
	<Name>Main</Name>
<!-- Search only in the hildon directory -->
	<AppDir>/home/user/.local/share/applications/hildon</AppDir>
<DirectoryDir>/usr/share/applications/hildon</DirectoryDir>
	<DirectoryDir>/home/user/.local/share/applications/hildon</DirectoryDir>
<OnlyUnallocated/>
<Include>
<All/>
</Include>

<MergeDir>submenus</MergeDir>
	<Layout>
		<Filename>browser.desktop</Filename>
		<Filename>mediaplayer.desktop</Filename>
		<Filename>calendar.desktop</Filename>
		<Filename>image-viewer.desktop</Filename>
		<Filename>osso-addressbook.desktop</Filename>
		<Filename>rtcom-call-ui.desktop</Filename>
		<Filename>nokia-maps.desktop</Filename>
		<Filename>camera-ui.desktop</Filename>
		<Filename>modest.desktop</Filename>
		<Filename>rtcom-messaging-ui.desktop</Filename>
		<Filename>worldclock.desktop</Filename>
		<Filename>osso_calculator.desktop</Filename>
		<Filename>ovi.desktop</Filename>
		<Filename>osso_notes.desktop</Filename>
		<Filename>hildon-control-panel.desktop</Filename>
		<Filename>hildon-application-manager.desktop</Filename>
		<Filename>osso_pdfviewer.desktop</Filename>
		<Filename>filemanager.desktop</Filename>
		<Filename>osso_rss_feed_reader.desktop</Filename>
		<Filename>osso_sketch.desktop</Filename>
		<Filename>osso-backup.desktop</Filename>
		<Filename>maemoblocks.desktop</Filename>
		<Filename>chess_startup.desktop</Filename>
		<Filename>mahjong_startup.desktop</Filename>
		<Filename>osso_lmarbles.desktop</Filename>
		<Filename>user-guide.desktop</Filename>
		<Filename>osso-xterm.desktop</Filename>
		<Filename>alienblaster.desktop</Filename>
		<Filename>ati85.desktop</Filename>
		<Filename>BatteryGraph.desktop</Filename>
		<Filename>brainparty.desktop</Filename>
		<Filename>closechroot.desktop</Filename>
		<Filename>comix.desktop</Filename>
		<Filename>conboy2.desktop</Filename>
		<Filename>conky.desktop</Filename>
		<Filename>currencyconverter.desktop</Filename>
		<Filename>debchroot.desktop</Filename>
		<Filename>lxde.desktop</Filename>
		<Filename>image-install.desktop</Filename>
		<Filename>de-lite.desktop</Filename>
		<Filename>dialcentral.desktop</Filename>
		<Filename>drnoksnes.desktop</Filename>
		<Filename>ecoach.desktop</Filename>
		<Filename>eightyone.desktop</Filename>
		<Filename>FBReader.desktop</Filename>
		<Filename>FeedingIt.desktop</Filename>
		<Filename>fennec.desktop</Filename>
		<Filename>lxdefocus.desktop</Filename>
		<Filename>fm-boost.desktop</Filename>
		<Filename>fmradio.desktop</Filename>
		<Filename>glogarchive.desktop</Filename>
		<Filename>gltron.desktop</Filename>
		<Filename>gnome-alsamixer.desktop</Filename>
		<Filename>gnuplot.desktop</Filename>
		<Filename>gonvert.desktop</Filename>
		<Filename>gpodder.desktop</Filename>
		<Filename>grsync.desktop</Filename>
		<Filename>gweled.desktop</Filename>
		<Filename>HealthCheck.desktop</Filename>
		<Filename>hermes.desktop</Filename>
		<Filename>hex-a-hop.desktop</Filename>
		<Filename>htop.desktop</Filename>
		<Filename>iceweasel.desktop</Filename>
		<Filename>ines.desktop</Filename>
		<Filename>jamaendo.desktop</Filename>
		<Filename>joikuspot.desktop</Filename>
		<Filename>kmplayer.desktop</Filename>
		<Filename>knots2.desktop</Filename>
		<Filename>kobodeluxe.desktop</Filename>
		<Filename>leafpad.desktop</Filename>
		<Filename>liqtorch.desktop</Filename>
		<Filename>maelstrom.desktop</Filename>
		<Filename>maep.desktop</Filename>
		<Filename>maepad.desktop</Filename>
		<Filename>mg.desktop</Filename>
		<Filename>mastory.desktop</Filename>
		<Filename>mbarcode.desktop</Filename>
		<Filename>mediabox-mc.desktop</Filename>
		<Filename>metromap.desktop</Filename>
		<Filename>mgutenberg.desktop</Filename>
		<Filename>mirror.desktop</Filename>
		<Filename>sygic.desktop</Filename>
		<Filename>mspede.desktop</Filename>
		<Filename>omweather.desktop</Filename>
		<Filename>ooo.desktop</Filename>
		<Filename>openttd.desktop</Filename>
		<Filename>opera.desktop</Filename>
		<Filename>orrery.desktop</Filename>
		<Filename>panucci.desktop</Filename>
		<Filename>picodrive.desktop</Filename>
		<Filename>pidgin.desktop</Filename>
		<Filename>prboom.desktop</Filename>
		<Filename>pygtkeditor.desktop</Filename>
		<Filename>pyPianobar.desktop</Filename>
		<Filename>qstardict.desktop</Filename>
		<Filename>qtirreco.desktop</Filename>
		<Filename>roadrunner.desktop</Filename>
		<Filename>searchtool.desktop</Filename>
		<Filename>sense.desktop</Filename>
		<Filename>seriesfinale.desktop</Filename>
		<Filename>xbindkeys.desktop</Filename>
		<Filename>stg.desktop</Filename>
		<Filename>sstg.desktop</Filename>
		<Filename>solarwolf.desktop</Filename>
		<Filename>storageusage.desktop</Filename>
		<Filename>smw.desktop</Filename>
		<Filename>supertux.desktop</Filename>
		<Filename>synaptic.desktop</Filename>
		<Filename>tecnoballz.desktop</Filename>
		<Filename>tickstill.desktop</Filename>
		<Filename>transmission.desktop</Filename>
		<Filename>tuxrace.desktop</Filename>
		<Filename>vagalume.desktop</Filename>
		<Filename>vectormine.desktop</Filename>
		<Filename>vgb.desktop</Filename>
		<Filename>vgba.desktop</Filename>
		<Filename>vncviewer.desktop</Filename>
		<Filename>vor.desktop</Filename>
		<Filename>vultures.desktop</Filename>
		<Filename>wifieye.desktop</Filename>
		<Filename>wifiinfo.desktop</Filename>
		<Filename>witter.desktop</Filename>
		<Filename>wok.desktop</Filename>
		<Filename>wtg.desktop</Filename>
		<Filename>wormux.desktop</Filename>
		<Filename>xchat.desktop</Filename>
		<Filename>xournal.desktop</Filename>
		<Filename>zoutube.desktop</Filename>
		<Filename>alarmed.desktop</Filename>
		<Filename>angrybirds.desktop</Filename>
		<Filename>offscr-banderol.desktop</Filename>
		<Filename>offscr-banner.desktop</Filename>
		<Filename>cservices.desktop</Filename>
		<Filename>offscr-coin-toss.desktop</Filename>
		<Filename>offscr-discs.desktop</Filename>
		<Filename>easypark.desktop</Filename>
		<Filename>emelfm2.desktop</Filename>
		<Filename>espeakcaller.desktop</Filename>
		<Filename>evernote.desktop</Filename>
		<Filename>facebrick.desktop</Filename>
		<Filename>offscr-fifteen.desktop</Filename>
		<Filename>foreca-weather.desktop</Filename>
		<Filename>grr.desktop</Filename>
		<Filename>gtranslate.desktop</Filename>
		<Filename>macuco2.desktop</Filename>
		<Filename>maemo-mapper.desktop</Filename>
		<Filename>mussorgsky.desktop</Filename>
		<Filename>Qik.desktop</Filename>
		<Filename>quickpanorama.desktop</Filename>
		<Filename>offscr-sand.desktop</Filename>
		<Filename>tunewiki-community.desktop</Filename>
		<Filename>weatherbug.desktop</Filename>
		<Filename>x11vnc.desktop</Filename>
<Menuname>games.directory</Menuname>
	</Layout>


</Menu>
When I try this, the only thing that happens is my application menu dissapears. Granted I didn't jump full in (I only created the games directory to see if something would show up). I also took out a few text.

Here was my original.

Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>
	<Name>Main</Name>
	<MergeFile type="parent">/etc/xdg/menus/hildon.menu</MergeFile>
	<AppDir>/home/user/.local/share/applications/hildon</AppDir>
	<DirectoryDir>/home/user/.local/share/applications/hildon</DirectoryDir>

	<Layout>
		<Filename>browser.desktop</Filename>
		<Filename>mediaplayer.desktop</Filename>
		<Filename>calendar.desktop</Filename>
		<Filename>image-viewer.desktop</Filename>
		<Filename>osso-addressbook.desktop</Filename>
		<Filename>rtcom-call-ui.desktop</Filename>
		<Filename>nokia-maps.desktop</Filename>
		<Filename>camera-ui.desktop</Filename>
		<Filename>modest.desktop</Filename>
		<Filename>rtcom-messaging-ui.desktop</Filename>
		<Filename>worldclock.desktop</Filename>
		<Filename>osso_calculator.desktop</Filename>
		<Filename>ovi.desktop</Filename>
		<Filename>osso_notes.desktop</Filename>
		<Filename>hildon-control-panel.desktop</Filename>
		<Filename>hildon-application-manager.desktop</Filename>
		<Filename>osso_pdfviewer.desktop</Filename>
		<Filename>filemanager.desktop</Filename>
		<Filename>osso_rss_feed_reader.desktop</Filename>
		<Filename>osso_sketch.desktop</Filename>
		<Filename>osso-backup.desktop</Filename>
		<Filename>maemoblocks.desktop</Filename>
		<Filename>chess_startup.desktop</Filename>
		<Filename>mahjong_startup.desktop</Filename>
		<Filename>osso_lmarbles.desktop</Filename>
		<Filename>user-guide.desktop</Filename>
		<Filename>osso-xterm.desktop</Filename>
		<Filename>alienblaster.desktop</Filename>
		<Filename>ati85.desktop</Filename>
		<Filename>BatteryGraph.desktop</Filename>
		<Filename>brainparty.desktop</Filename>
		<Filename>closechroot.desktop</Filename>
		<Filename>comix.desktop</Filename>
		<Filename>conboy2.desktop</Filename>
		<Filename>conky.desktop</Filename>
		<Filename>currencyconverter.desktop</Filename>
		<Filename>debchroot.desktop</Filename>
		<Filename>lxde.desktop</Filename>
		<Filename>image-install.desktop</Filename>
		<Filename>de-lite.desktop</Filename>
		<Filename>dialcentral.desktop</Filename>
		<Filename>drnoksnes.desktop</Filename>
		<Filename>ecoach.desktop</Filename>
		<Filename>eightyone.desktop</Filename>
		<Filename>FBReader.desktop</Filename>
		<Filename>FeedingIt.desktop</Filename>
		<Filename>fennec.desktop</Filename>
		<Filename>lxdefocus.desktop</Filename>
		<Filename>fm-boost.desktop</Filename>
		<Filename>fmradio.desktop</Filename>
		<Filename>glogarchive.desktop</Filename>
		<Filename>gltron.desktop</Filename>
		<Filename>gnome-alsamixer.desktop</Filename>
		<Filename>gnuplot.desktop</Filename>
		<Filename>gonvert.desktop</Filename>
		<Filename>gpodder.desktop</Filename>
		<Filename>grsync.desktop</Filename>
		<Filename>gweled.desktop</Filename>
		<Filename>HealthCheck.desktop</Filename>
		<Filename>hermes.desktop</Filename>
		<Filename>hex-a-hop.desktop</Filename>
		<Filename>htop.desktop</Filename>
		<Filename>iceweasel.desktop</Filename>
		<Filename>ines.desktop</Filename>
		<Filename>jamaendo.desktop</Filename>
		<Filename>joikuspot.desktop</Filename>
		<Filename>kmplayer.desktop</Filename>
		<Filename>knots2.desktop</Filename>
		<Filename>kobodeluxe.desktop</Filename>
		<Filename>leafpad.desktop</Filename>
		<Filename>liqtorch.desktop</Filename>
		<Filename>maelstrom.desktop</Filename>
		<Filename>maep.desktop</Filename>
		<Filename>maepad.desktop</Filename>
		<Filename>mg.desktop</Filename>
		<Filename>mastory.desktop</Filename>
		<Filename>mbarcode.desktop</Filename>
		<Filename>mediabox-mc.desktop</Filename>
		<Filename>metromap.desktop</Filename>
		<Filename>mgutenberg.desktop</Filename>
		<Filename>mirror.desktop</Filename>
		<Filename>sygic.desktop</Filename>
		<Filename>mspede.desktop</Filename>
		<Filename>omweather.desktop</Filename>
		<Filename>ooo.desktop</Filename>
		<Filename>openttd.desktop</Filename>
		<Filename>opera.desktop</Filename>
		<Filename>orrery.desktop</Filename>
		<Filename>panucci.desktop</Filename>
		<Filename>picodrive.desktop</Filename>
		<Filename>pidgin.desktop</Filename>
		<Filename>prboom.desktop</Filename>
		<Filename>pygtkeditor.desktop</Filename>
		<Filename>pyPianobar.desktop</Filename>
		<Filename>qstardict.desktop</Filename>
		<Filename>qtirreco.desktop</Filename>
		<Filename>roadrunner.desktop</Filename>
		<Filename>searchtool.desktop</Filename>
		<Filename>sense.desktop</Filename>
		<Filename>seriesfinale.desktop</Filename>
		<Filename>xbindkeys.desktop</Filename>
		<Filename>stg.desktop</Filename>
		<Filename>sstg.desktop</Filename>
		<Filename>solarwolf.desktop</Filename>
		<Filename>storageusage.desktop</Filename>
		<Filename>smw.desktop</Filename>
		<Filename>supertux.desktop</Filename>
		<Filename>synaptic.desktop</Filename>
		<Filename>tecnoballz.desktop</Filename>
		<Filename>tickstill.desktop</Filename>
		<Filename>transmission.desktop</Filename>
		<Filename>tuxrace.desktop</Filename>
		<Filename>vagalume.desktop</Filename>
		<Filename>vectormine.desktop</Filename>
		<Filename>vgb.desktop</Filename>
		<Filename>vgba.desktop</Filename>
		<Filename>vncviewer.desktop</Filename>
		<Filename>vor.desktop</Filename>
		<Filename>vultures.desktop</Filename>
		<Filename>wifieye.desktop</Filename>
		<Filename>wifiinfo.desktop</Filename>
		<Filename>witter.desktop</Filename>
		<Filename>wok.desktop</Filename>
		<Filename>wtg.desktop</Filename>
		<Filename>wormux.desktop</Filename>
		<Filename>xchat.desktop</Filename>
		<Filename>xournal.desktop</Filename>
		<Filename>zoutube.desktop</Filename>
		<Filename>alarmed.desktop</Filename>
		<Filename>angrybirds.desktop</Filename>
		<Filename>offscr-banderol.desktop</Filename>
		<Filename>offscr-banner.desktop</Filename>
		<Filename>cservices.desktop</Filename>
		<Filename>offscr-coin-toss.desktop</Filename>
		<Filename>offscr-discs.desktop</Filename>
		<Filename>easypark.desktop</Filename>
		<Filename>emelfm2.desktop</Filename>
		<Filename>espeakcaller.desktop</Filename>
		<Filename>evernote.desktop</Filename>
		<Filename>facebrick.desktop</Filename>
		<Filename>offscr-fifteen.desktop</Filename>
		<Filename>foreca-weather.desktop</Filename>
		<Filename>grr.desktop</Filename>
		<Filename>gtranslate.desktop</Filename>
		<Filename>macuco2.desktop</Filename>
		<Filename>maemo-mapper.desktop</Filename>
		<Filename>mussorgsky.desktop</Filename>
		<Filename>Qik.desktop</Filename>
		<Filename>quickpanorama.desktop</Filename>
		<Filename>offscr-sand.desktop</Filename>
		<Filename>tunewiki-community.desktop</Filename>
		<Filename>weatherbug.desktop</Filename>
		<Filename>x11vnc.desktop</Filename>
		<Merge type="all"/>
	</Layout>

	<MergeDir>/home/user/.config/menus/hildon</MergeDir>

</Menu>
__________________
Originally Posted by ysss View Post
They're maemo and MeeGo...

"Meamo!" sounds like what Zorro would say to catherine zeta jones... after she slaps him for looking at her dirtily...
 
Nathraiben's Avatar
Posts: 267 | Thanked: 408 times | Joined on May 2010 @ Austria
#107
Since I was asked for easy to follow instructions and as a kind of thank you to everybody who made this possible by contributing to this thread, here's a step-by-step tutorial on how I categorised my folders:

Disclaimer[1]: I did not, in any way, invent these techniques. Almost everybody was pulled from this thread, so thanks to those great people who deliberately messed up their phones countless times to bring us these pieces of information.

Disclaimer[2]: !!!IMPORTANT!!! I've included instructions for those who are less Linux savvy and also provide small tricks to get your phone back up when you happened to mess up. BUT I would really like to discourage anybody who doesn't yet feel comfortable with both Linux and their device to stay away from these techniques until either they were able to collect more experience or a stable, graphical application has been developed to make these changes.

Disclaimer[3]: These instructions work on my N900 with the PR 1.2 update - I don't know if/how it works on other devices and other versions. Also, I'm born lazy, so I only created top-level folders and thus cannot share any experiences on creating nested folders. It's not impossible, though, and has already been done in this thread.


Tutorial on Making Folders (variable version)

Step 1: Get to know your icons

It doesn't really matter where you begin, but since icons don't include any references to other files we're going to create they seem to be the best place to start.

Application menu icons are .png graphic files with dimensions of 48x48 pixel and arbitrary colour depth (with support for alpha transparancy), so you can easily create your own.

But before you even consider that, let's take a look at the icons already loaded to your device (either from the vanilla installation or added by applications downloaded with the application manager).

They are located in /usr/share/icons/hicolor/48x48/hildon/

Since that folder cannot be reached by the maemo File Manager, let's make a copy either on the MicroSD card or the folder /home/user/MyDocs, both of which can be opened with the file manager AND are available to your PC when you connect the device in mass storage mode. In this example we'll create a folder "Icons" directly on the device.

To do that, load XTerminal and perform the following command:
Code:
mkdir /home/user/MyDocs/Icons
(Note: To make sure there are no typos, after typing the first few letters of each folder hit the "Tab" button at the bottom of your screen for auto-completion. This works for all the commands using folder paths and has the additional advantage of saving a LOT of typing... )

Next time you open your file manager and click on "Nokia N900", you'll find this new folder under the name "Icons" there.

After that let's copy the content of the original folder to this new one:
Code:
cp /usr/share/icons/hicolor/48x48/hildon/* /home/user/MyDocs/Icons
(This might take a while, depending on how many applications you already installed)

Thanks to the * at the end of your source folder, all of the files within have been copied to our new Icons folder - that means in the file manager you can actually already browse them.

Write down the filenames of those you want to use for your folders and/or create your own files (but don't forget to copy any self created files back to the /usr/share/icons/hicolor/48x48/hildon/ folder).

Step 2: So who's this Hildon?

Hildon is the application framework behind Maemo's current UI and our application menu is part of it. So it's no wonder our next step will be done in Hildon's application folder. Actually, one of two folders, since we can either add our files to

/usr/share/applications/hildon
or
/home/user/.local/share/applications/hildon

The first is for system-wide settings, while the latter is for user-specific ones. On our device, which only has one user, this doesn't make much of a difference, but it can be considered "cleaner" to only make changes within the /home/user/ folder. And then there's also the advantage of there being no need for getting root access.

We will have to create a text file next, so unless you're one of the geeks who like to work with VI, open your application manager and get yourself one of the text editors. I like PyGTKEditor best so far, but the most common editor would be Leafpad, both of which should be in Maemo Extras (I think).

Back in X Terminal, let's create a file that will represent the general properties of our folder:

Code:
pygtkeditor /home/user/.local/share/applications/hildon/games.directory
(Replace "pygtkeditor" with the editor of your choice and "games" with a name that will later let you know which folder this file is supposed to describe. So obviously for our Games folder, games.directory will provide the settings.)

At this moment, your editor should pop up and warn you about the file not existing (well, at least PyGTKEditor does ), but we already knew that - we're going to create it now, after all!

For that, copy the following template into your empty text file:
Code:
[Desktop Entry]
Type=Directory
Name=
Icon=
X-Osso-User-Position=1
X-Maemo-Category=Main
X-Text-Domain=maemo-af-desktop
Just leave the last three lines as they are (at least for me, changing X-Osso-User-Position didn't have any influence on the order in which the folders are displayed...) and only enter values for Name and Icon.

In this example, Name would be set to "Games", for hopefully obvious reasons.

As for the Icon, now the results of Step1 come into play: From the list of icons we want to use we'll have to choose the one for the Games folder and enter it's filename (WITHOUT the extension - so cut off the .png). I used "filemanager_games_folder", the yellow folder icon featuring a die.

So now the games.directory file should look about like this:
Code:
[Desktop Entry]
Type=Directory
Name=Games
Icon=filemanager_games_folder
X-Osso-User-Position=1
X-Maemo-Category=Main
X-Text-Domain=maemo-af-desktop
Save and exit.

Step 3: Let's screw up our system!

So far all we have done was pretty uncritical, since we didn't edit any standard files but only created our own. Now we'll actually mess with on of the system-generated files, so beware: Whatever you do in there, it might completely knockout Hildon (take a look at the appendix for possible solutions).

The file we're going to edit is /home/user/.config/menus/hildon.menu

You might want to backup the file, but it's not necessary - if you mess up, just delete the file and during the next boot routine it will be restored (actually, like with the files in the Hildon application folder, there's a system-wide and a user-specific version: if you delete the user-specific one, a copy of the system-wide will be copied in at boot time).

Take a deep breath and open the file in your text editor:
Code:
pygtkeditor /home/user/.config/menus/hildon.menu
If you've ever worked with XML files before, the original content of the file should look rather familiar. It's a structured representation of what the application menu should look like - that is, at the moment it simply displays all applications that are not displayed in another folder (well, and since there IS no other folder, it displays all of them).

We're going to overwrite this with our own code now:
Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>

  <Name>Main</Name>

  <!-- Search only in the hildon directory. -->
  <AppDir>/usr/share/applications/hildon</AppDir>
  <AppDir>/home/user/.local/share/applications/hildon</AppDir>
  <DirectoryDir>/usr/share/applications/hildon</DirectoryDir>
  <DirectoryDir>/home/user/.local/share/applications/hildon</DirectoryDir>

  <OnlyUnallocated/>
  <Include><All/></Include>

  <MergeDir>submenus</MergeDir>

</Menu>
Wait... that's all?

Actually, yes. This approach is very generic, which has the benefit that you only have to edit this file ONCE and never have to touch it again. If ever you feel like adding another folder (or editing/removing an existing one), you can switch this step completely. Less messing with standard files is always an advantage.

Let's take a short look at what the various parts of this XML coding actually do:
Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
This simply tells the system what kind of file it has to expect and includes a link to a set of rules for the elements that are allowed in this file. If you want to know more, follow the link - else, just make sure you always have this at the top of your menu file.

Code:
  <!-- Search only in the hildon directory. -->
  <AppDir>/usr/share/applications/hildon</AppDir>
  <AppDir>/home/user/.local/share/applications/hildon</AppDir>
  <DirectoryDir>/usr/share/applications/hildon</DirectoryDir>
  <DirectoryDir>/home/user/.local/share/applications/hildon</DirectoryDir>
Here we tell Hildon where to look for the various files.

AppDir sets the director(y/ies) in which the .desktop files can be found that describe the various applications. Those files are similar to the .directory file we created earlier but also include shell code for actually starting the application when it is clicked.

DirectoryDir does the same for .directory files.

(As you can see, per default directories and applications are stored in the same folders.)

Code:
  <OnlyUnallocated/>
  <Include><All/></Include>
This is the part that makes sure that all applications are displayed in the main folder - but only when they are not already allocated to another folder.

Code:
  <MergeDir>submenus</MergeDir>
And that's our "variable" part. Instead of manually adding folders and applications, we simply tell Hildon to look for include-able .menu files in the submenus subfolder (/home/user/.config/menus/submenus).

Since there are no files in there (actually, right now not even the subfolder itself has been created), no folders will be displayed. That also means that none of the applications are allocated in any folders, so the current behaviour of Hilden will be:

Display all of the applications in the main folder. Great, all this work so far for nothing...

Still, let's save and exit back to X Terminal again.

Before we move one, here's a quick note on how fickle hildon.menu is: As soon as you touch the screen for too long while in the application menu, the new re-order feature will kick in. While normally quite the nice feature, in our case it means certain exodus for our beautiful folders, since it completely overwrites the hildon.menu file.

So, just in case this ever happens, let's create a backup file for this file:

Code:
cp /home/user/.config/menus/hildon.menu /home/user/.config/menus/hildon.backup
Step 4: Can we make our folder display now, please?

First we have to create the subfolder we stated above in the MergeDir tag:
Code:
mkdir /home/user/.config/menus/submenus
This will hold all the .menu files that will later be included. Whenever we add/delete/modify one of these, it will immediately influence our application menu - as stressed above, there's no necessity to touch the hildon.menu file again.

As proof of concept, create the .menu file for our Games folder:
Code:
pygtkeditor /home/user/.config/menus/submenus/games.menu
The content of this file will be a bit similar to the hildon.menu, since it's the same kind of XML file. Here's the framework for our Games folder:
Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>

  <Name>Main</Name>

  <Menu>
    <Name>Games</Name>
    <Directory>games.directory</Directory>
  </Menu>

</Menu>
The outer construct is the same as before, but instead of the folder declarations, the include and the directory merge there's a second Menu tag within the Main one.

That is actually our new subfolder, named Games (like the name we specified in the .directory file) and linked to the file games.directory - the one created before.

At this point the directory will be completely empty (and thus still all applications displayed in the main menu), but feel free to save and start the application menu to check whether the folder is already showing.

Then come back to your text editor for adding more content into the games.menu file.

Step 5: Into the folder you must go

Actually, before adding more content, let's exit the text editor and take a look at what we can actually add...

Remember the part about the .desktop files being stored in the same directories as the .directory files? With that knowledge we can now fetch a list of them by entering:

Code:
ls /usr/share/applications/hildon/
(Note: Again there's also the folder /home/user/.local/share/applications/hildon/ - so check in there, too, if you cannot find one of your applications.)

From that list, let's pick two games to add to our Games menu: maemoblocks.desktop and chess_startup.desktop - copy or not them down before you open games.menu in your text editor again:

Code:
pygtkeditor /home/user/.config/menus/submenus/games.menu
After the Directory tag (at the same level) we can now include those two applications:

Code:
    <Include>
      <Filename>maemoblocks.desktop</Filename>
      <Filename>chess_startup.desktop</Filename>
    </Include>
All the other games we might want to add later have to go between those Include tags, framed with their own Filename tags.

Your games.menu file should now look like this:

Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>

  <Name>Main</Name>

  <Menu>
    <Name>Games</Name>
    <Directory>games.directory</Directory>

    <Include>
      <Filename>maemoblocks.desktop</Filename>
      <Filename>chess_startup.desktop</Filename>
    </Include>

  </Menu>

</Menu>
Save, exit and... well, we're done! When you click the Games folder in the application menu, two icons should be displayed there: the Chess and Blocks application. In turn, those two should now be excluded from the main menu.

Rinse and repeat with as many folders as you would like to.

Last edited by Nathraiben; 2010-06-17 at 14:33.
 

The Following 16 Users Say Thank You to Nathraiben For This Useful Post:
Nathraiben's Avatar
Posts: 267 | Thanked: 408 times | Joined on May 2010 @ Austria
#108
(Wow... I exceeded the word limit )

Appendix 1: Help, I messed up!
(This section might be expanded when more problems and solutions are found )

I did something wrong and now nothing works! Not even my desktop icons!
The desktop is actually also a part of the Hildon framework, so if we mess around with hildon.menu we risk messing up EVERYTHING.

Luckily, there's a way to still access your X Terminal - all it takes are nimble fingers, since the (hardware) keyboard combination for that is Cntr+Shift+X... :P

Once in the terminal, you can either delete the faulty hildon.menu file
Code:
rm /home/user/.config/menus/hildon.menu
or open it with the text editor in order to replace the incorrect code (most probably a simple type - especially check for missing slashes in closing tags)
Code:
pygtkeditor /home/user/.config/menus/hildon.menu
After finishing my new folder simply doesn't show up and all it's content is still in the main folder...
In my experience, this hints on a typo in your [nameoffolder].menu file. If it is not valid XML (again, most probably simply thanks to a minor typo), Hildon will simply ignore it.

Thankfully, it seems like it's not messing up the whole system like hildon.menu does, so you should be fine simply looking for the typo and correct it. No breaking your fingers while trying to hit Ctrl-Shift-X...

My folder is there, but it's really ugly - why is it not showing the icon I assigned it???
So far I've found two possible errors that make the icon not show, both inside your [nameoffolder].directory file:
1) If it shows a simple blue block instead, it's most probably a typo in the icon=[] line.
2) If it shows the former "More..." icon (a colourful array of boxes), the .directory file is either not valid or missing (for example, when there's a typo in the reference to this file from within [nameoffolder].menu). In that case, especially check whether there are any typos in the header "[Desktop Entry]" or the line beneath - and whether the line <Directory>[nameoffile].directory</Directory> in your .menu file is okay, too.






If anything is unclear or you found any mistakes, please let me know so I can edit my posts in order to prevent others from following false instructions.

Also, feel free to do with this text as you please - modify, re-publish, print and hang it over your bed...
(Good karma to those who add a tiny little credit comment when re-publishing it )

Above all, please let me know whether this was at least moderately useful. And if not, just let me know why...

Last edited by Nathraiben; 2010-06-16 at 19:30.
 

The Following 11 Users Say Thank You to Nathraiben For This Useful Post:
Posts: 968 | Thanked: 974 times | Joined on Nov 2008 @ Ohio
#109
Also for some automagic catagorization:

You can add the following lines to your menu files:
Code:
      <Include>
        <Category>Game</Category>
        <Category>Games</Category>
        <Filename>100boxes.desktop</Filename>
Which would automatically include any apps that have Game, Games listed in their desktop file. *Most apps don't include categories, but some do. Categories here

If you do that you may also want to exclude specific apps from specific menus:

Code:
        <Filename>mussorgsky.desktop</Filename>
     </Include>
     <Exclude>
        <Filename>gnome-alsamixer.desktop</Filename>
     </Exclude>
This might *hopefully* save you some time and editing by including categories for each menu.
__________________
*Consumer*, not a developer! I apologize for any inconvenience.
My script to backup /home and /opt
Samsung Galaxy S Vibrant, Huawei S7, N900(retired), N800(retired)
 

The Following 3 Users Say Thank You to lemmyslender For This Useful Post:
Posts: 527 | Thanked: 121 times | Joined on Feb 2010
#110
Can somebody upload a complete package for me to use?
 
Reply


 
Forum Jump


All times are GMT. The time now is 22:53.