Hello,

I'm trying to use the PanelApplet stuff from gtk-sharp version 1.9.5 and
I can't seem to bind the menu XML to the applet.  The applet shows up in
the "Add to Panel" dialog just fine, and it puts an Icon there.
However, there's no menu when I right click.  I'm using the Tomboy
applet as a guide, but there's a few differences in the implementations
of the Panel Applet code.

When the applet loads I get a whole bunch of these, I'm betting this has
something to do with it, but the errors aren't verbose enough to tell me
why.  If I don't create the ObolusTray object, it seems to give these
errors AFTER I terminate the app instead of when adding the applet to
the panel:

(Obolus:4365): GLib-GObject-CRITICAL **: g_object_get_data: assertion
`G_IS_OBJECT (object)' failed

(Obolus:4365): GLib-GObject-CRITICAL **: g_object_set_data_full:
assertion `G_IS_OBJECT (object)' failed

(Obolus:4365): GLib-GObject-CRITICAL **: g_object_set_data: assertion
`G_IS_OBJECT (object)' failed

(Obolus:4365): GLib-GObject-CRITICAL **: g_object_get_data: assertion
`G_IS_OBJECT (object)' failed

(Obolus:4365): GLib-GObject-CRITICAL **: g_object_set_data_full:
assertion `G_IS_OBJECT (object)' failed

(Obolus:4365): GLib-GObject-CRITICAL **: g_object_set_data: assertion
`G_IS_OBJECT (object)' failed


Here is the XML for the menu:

<Root>
  <popups>
    <popup name="button3">
      <menuitem name="Item 1" verb="TicketDisplay" _label="_Tickets..."
pixtype="stock" pixname="gtk-properties" />
    </popup>
  </popups>
</Root>


And the Creation() from the applet:

tray = new ObolusTray();
Add(tray);
ShowAll();

StreamReader menufile = new StreamReader( Defines.DATADIR +
"/gnome-2.0/ui/GNOME_ObolusApplet.xml", ) );

string menu_xml = menufile.ReadToEnd();

menufile.Close();

menu_verbs = new BonoboUIVerb[] { new BonoboUIVerb("TicketDisplay", new
ContextMenuItemCallback(MainDialogShow)) };

this.SetupMenu(menu_xml, menu_verbs);


In fact, the whole thing is in subversion:

https://anthracite.sys.oakland.edu/svn/obolus

https://anthracite.sys.oakland.edu/cgi-bin/viewcvs.cgi/?root=Obolus


Thanks for any help you can give me,

Andrew

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to