Skip navigation.
Home
The QNX Community Portal

View topic - Adding a menu Item to the desktop Menu Pannel

Adding a menu Item to the desktop Menu Pannel

Isn't the name clear?

Adding a menu Item to the desktop Menu Pannel

Postby prinz » Fri Oct 16, 2009 12:04 pm

Hello all of you
I would like to ask if its possible to add a menu Item to the menu pannel on the desktop (right pannel under Internet,
utilities, Multimedia, Games).
this Item menu which i wanna add, have to start a QNX C Project which i programmed.

can anyone help me`?

Thank you
Attachments
Untitled - 2.jpg
(22.15 KiB) Downloaded 44 times
prinz
Active Member
 
Posts: 23
Joined: Tue Mar 24, 2009 11:37 am

Postby Tim » Fri Oct 16, 2009 1:28 pm

Prinz,

Yes it's definitely possible to add your own menu.

I don't normally work in photon so I don't know if there is an 'official' way to do it from within the GUI (I tried right clicking on the right hand side menu but I didn't see an obvious way to add a new menu).

However, in your home directory there is a .ph (photon) directory. Under that directory is a shelf directory and in therer is a shelf.cfg file. You can edit that (just a text file) and put your menu there following the format of the file.

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby stevenlougheed » Fri Oct 16, 2009 6:05 pm

I'm not sure if it exists in previous versions but in 6.4.0 you can edit the shelf under Launch->Configure->Shelf. You can add a new group or just a "Launch Application" item.

Steve
stevenlougheed
Active Member
 
Posts: 11
Joined: Thu Oct 15, 2009 3:55 pm

Postby prinz » Thu Oct 22, 2009 12:39 pm

Hi guys,

Thank you for the Help, i tried to add a new item as u described below, but it allows just .so or .dll file extension.
I wanna launch my own programmed C Project. ist it possible ?

thx
prinz
Active Member
 
Posts: 23
Joined: Tue Mar 24, 2009 11:37 am

Postby Tim » Thu Oct 22, 2009 1:19 pm

Prinz,

Yes, it's possible.

Take a look in the shelf.cfg file. Searching for terminal you find:

{name = Terminal
external = /usr/photon/dll/shelf/launcher.so
pterm -l}plugin

Note the launcher.so is just how the shelf spawns off the program. The 'pterm -l' part is the actual executable that provides your terminals.

So you just need a similar entry for your own project.

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Postby stevenlougheed » Thu Oct 22, 2009 1:47 pm

I'm apparently a bit late as Tim has just answered the question but I'll describe the procedure from the GUI shelf configuration ('shelf -c', available from at least 6.2.1).

I believe the confusion is that you are trying to add your application as a new type of shelf plugin. From the shelf configuration utility after you click on Before/After if you click Browse... to add your item it will only let you add a .so or .dll as you described.
Instead of clicking "Browse...", you should select "Launch Application" in the "New Type:" list and click Apply. You'll now have created a "Launch Application" item, and if you click on it you'll see a box called "Program to Launch" to the right where you can select your application (or any file for that matter).

All the applications that are started from the shelf use this same procedure. Have a look at one of them, say the File Manager under Utilities, and you'll see it's name is "File Manager", type "Launch Application" and Program to Launch is pfm. The Launch Application type is the launcher.so plugin that Tim discussed.
stevenlougheed
Active Member
 
Posts: 11
Joined: Thu Oct 15, 2009 3:55 pm


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests