[Gtk-sharp-list] Trouble with PanelApplets

Andrew Forgue forgue at oakland.edu
Tue Aug 9 16:14:22 EDT 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20050809/ee93e046/attachment.bin


More information about the Gtk-sharp-list mailing list