Fwd: Popup Menu



Thanks a lot for the replies. :-)

Yeah, I know that may sound like a weird app, so I'll tell you what
I'm developing.
My girlfriend wants me to install Linux on her computer, but she wants
a Windows-like Desktop Environment. I know that there is KDE and GNOME
out there, but they won't run smooth on her machine, as it's a Celeron
500 with 64Mb RAM.
So I decided to make her a light-weight desktop environment. It's
pretty simple, actually. I'll use FVWM as the window manager and iDesk
for the icons. And that's where my program comes in.
iDesk by default has no menus for it's icons. So i'm going to write a
small program that is going to be the icon's menu, so that program
will be launched everytime the user right-clicks the icon. Get the
idea? I need just a popup menu!


César


On Apr 11, 2005 11:33 PM, Freddie Unpenstein <fredderic excite com> wrote:

Is there a way I can make my application be just a popup menu?  I
mean, when the user opens it, there is no window, it automatically
pops up a menu right where the mouse pointer is. Is that possible?

Why not?  I wrote a console utility that uses GTK to rip text out of the clipboard (I still can't figure 
out how to put text back, and get it to stay there though).

But that program goes no where near actually creating any widgets in its entire lifetime.  A GTK+ can do as 
much or as little as it wants.  It can wait an hour before bringing up the main window, or wait for a file 
to appear, or wait for the junk food machine down the hall to give change (You'll need a hall-effect 
junk-flipflop for that! ;) ).

Just look at the gtk_menu_popup functions, I believe they pop the menu up right by the mouse by default 
anyhow.  And if you wanted, you can even bind gtk_main_quit to the destroy (?) signal of the popup menu 
once it's built, to have the program automatically quit when the menu closes (although more likely you'll 
want to actually do something first ;) ).

Fredderic

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]