XtVaSetValues equivalent for Gtk/Gdk/Glib
- From: JM <jm22033 yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: XtVaSetValues equivalent for Gtk/Gdk/Glib
- Date: Sat, 26 May 2007 14:44:15 -0700 (PDT)
I'm using the Motif Window Manager and am constructing
my GUI windows using Gtk-2.0. I need to add some
custom menu items to the windows and can do this by
modifying the ".mwmrc" file. However, I need to add a
custom protocol and was wondering how to connect the
protocol to the menu item.
If I was programming in X, I could do something like
the following:
MY_PROTOCOL = XInternAtom (XtDisplay (toplevel),
"_MY_PROTOCOL", False);
MOTIF_MSGS = XInternAtom (XtDisplay (toplevel),
"_MOTIF_WM_MESSAGES", False);
XmAddProtocols (toplevel, MOTIF_MSGS, &MY_PROTOCOL,
1);
XmAddProtocolCallback (toplevel, MOTIF_MSGS,
MY_PROTOCOL, my_proto_callback, NULL);
sprintf (buf, "MyProtocol _P Ctrl<Key>P f.send_msg
%d", MY_PROTOCOL);
XtVaSetValues (toplevel, XmNmwmMenu, buf, NULL);
This allows new items to show up in the drop down
system menu and the custom protocol to be created as
well. The question I have is how can I add new items
to the Motif Window manager system menu using
Gtk/Gdk/Glib in a similar fashion?
Thanks
____________________________________________________________________________________Boardwalk for $500? In
2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]