View Full Version : main menu screenlet?
adamruss
August 12th, 2007, 02:46 AM
can anyone help me out here with a main menu, system tray, good digital clock screenlets?
appriciate
xl_cheese
August 12th, 2007, 03:44 AM
can anyone help me out here with a main menu, system tray, good digital clock screenlets?
appriciate
I've been looking into it. Things I can't figure out are how to make the screenlet appear on top of the panel and how to make the screenlet open the main menu.
One method is to figure out how to make python execute an Alt+F1 or find the command to launch the main menu.
I've asked these questions on the ubuntu forums, but have not had an answer.
adamruss
August 12th, 2007, 12:16 PM
dont need on top of the panel. the hole idea is to get rid of it :)
RYX
August 12th, 2007, 01:43 PM
There is no way of having screenlets be on top of the panel because the panel is a dock-window (and, as adam said, the whole idea is to get rid of the panel sooner or later :)).
The main-menu thing is a question I had, too - I am sure there should be some way of generating the main menu from within other apps. Maybe the gnome-devs would be the better persons to ask here ...
I don't exactly know what Alt+F1 does, on my setup it has no effect. Most likely it sends some window message to the root window that makes the gnome-panel pop up the main menu ... so not really what you need.
(And the system-tray is a really heavy task, I recommend focusing on the mainmenu first ;))
adamruss
August 12th, 2007, 02:57 PM
RYX if you look at my desktop you'll see why i want the screenlets... i use gnome-panel as a screenlet now :(:
http://www.russ.co.il/images/linux9.jpg
RYX
August 12th, 2007, 03:12 PM
I understand the problem, it's the same for me. With a "real" mainmenu in the ControlScreenlet and an additional SystemTrayScreenlet I could completely get rid of the gnome-panel ... (my original goal :))
But the tray-thing is not very simple stuff - it has to be done using the rather low-level properties on the root window because it has to be desktop-independent. You could check the systemtray-specs on freedesktop.org (http://standards.freedesktop.org/systemtray-spec/systemtray-spec-latest.html) for details on that.
I planned to do it myself, but there are a couple of other things I need to do first. If you want to give it a try, feel free to do so :) ...
hells_dark
August 13th, 2007, 10:41 AM
I hope such a screenlet exist in the future :)
whise
August 13th, 2007, 01:15 PM
if there was a way to open the menu i would be quite simple
there is a submission o awn forums about a menu plugin for it , but i think all is drawn manually , witch kinda sucks
RYX
August 13th, 2007, 02:14 PM
I could imagine that the python-gnome2-desktop offers something that allows creating the mainmenu, but I don't know. Maybe having a look at the gnome-panel's menu-applet could give some info about if there is some library that aids in creating that menu ...
I tried my own approach to that. Check the XmlMenu-class if you're interested. My mainmenu simply reads in all desktop-files from all app-directories and creates menuitems from them, but there were some problems with duplicate entries and/or missing icons so I made it a "hidden" feature ...
:)
xl_cheese
August 13th, 2007, 04:21 PM
On my ubuntu box the alt+f1 opens the main menu.
I found this module for python, but it references a windows.h file so it is not good for linux.
http://www.rutherfurd.net/python/sendkeys/index.html
The source code is posted which may help.
RYX
August 13th, 2007, 05:22 PM
Thanks for your help. :)
But sending Alt+F1 doesn't work on systems that don't have this keybinding set. Pressing Alt+F1 only triggers an event that a running application (like the menu-applet in the panel) can catch and then do something (i.e. show its menu).
The menuscreenlet would have to handle this event, too (by listening to property-changes of a certain property on the rootwindow) and then would automatically show the menu if you press Alt+F1 ...
The answer to the question lies in the menu-applet ... (or in any other menu-app from one of the many DEs)
(Even though I think that a fully owner-drawn menu would be ten times cooler than having a toolkit-dependent one ... :D)
whise
August 13th, 2007, 08:38 PM
the gnome-menu-spec-test command shows us all of the list entrys in the menu , we could use it to draw the menu ourself's with some extra features i guess it would require alot of work
xl_cheese
August 13th, 2007, 08:42 PM
I have a potential method of doing this.
I have it working, but you have to have a panel and menu launcher or the menu will get stuck open.
I installed open box and using the command:
gnome-panel-control --main-menu
I can get the screenlet to launch the main menu. Although it is hokey. Sometimes it would take up to five fast clicks to open it. I made a script like this and it will get the menu open every time.
#!/bin/bash
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu && gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu &
gnome-panel-control --main-menu && gnome-panel-control --main-menu &
Now only if the screenlet would show up on top of the panel it'd work great for what I'm trying to do.
RYX
August 13th, 2007, 11:12 PM
Those are interesting suggestions, but I am afraid it doesn't work either way. It would be really unfair to all non-gnome users to use such gnome-specific methods or workarounds of creating/showing the menu. The menu should be created by the Screenlet itself, I think there is no way around that ... The XmlMenu-class is a really good starting point for this and just needs to be extended to more properly scan the files and dirs ...
:)
whise
August 14th, 2007, 12:58 AM
Those are interesting suggestions, but I am afraid it doesn't work either way. It would be really unfair to all non-gnome users to use such gnome-specific methods or workarounds of creating/showing the menu. The menu should be created by the Screenlet itself, I think there is no way around that ... The XmlMenu-class is a really good starting point for this and just needs to be extended to more properly scan the files and dirs ...
:)
agreed ... the menu must be owner drawn .
im afraid this is way over my league , i hope someone manages to make it , would be great , gnome users dont have alternatives to gnome menu unless slab stuff (hate it) kde users have alot of menu replacements like kbfx , im still waiting for the gnome menu aplet for awn
adamruss
August 14th, 2007, 01:39 PM
is there a mainmenu widget? like from gdesklets?
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.