Re: [gnomemm] Gtkmm nautilus property pages cleanup



Murray Cumming <murrayc murrayc com> writes:

[...]

> Are you really really sure that it does not inherit from Gtk::Window?

I have the same problem with panel applets. In my case, the top level
widget is a PanelApplet (C type) with a gtkmm Gtk::EventBox inside.

I've never gotten around to investigating the problem because it only
appears when the panel is shut down or the applet dies (and then the
standard output most often ends up a place where I don't notice it).

The factory construction method looks like this (where my custom
Applet class derives from Gtk::EventBox):

  gboolean hardware_monitor_factory(PanelApplet *panel_applet, const gchar *iid,
                                    void *)
  {
    // construct applet
    Applet *applet = manage(new Applet(panel_applet));
    applet->show();

    gtk_container_add(GTK_CONTAINER(panel_applet), GTK_WIDGET(applet->gobj()));
    gtk_widget_show(GTK_WIDGET(panel_applet));

    return true;
  }

So there's no window involved.


If you interested in seeing the error, the applet can be downloaded
from here (or you could even use the Debian package):

  http://www.cs.aau.dk/~olau/hardware-monitor/

Run "hardware-monitor" in a terminal, then while it is running, add a
Hardware Monitor instance to the panel through the panel right-click
menu. Then remove the applet, and the error message appears in the
terminal:

  (hardware-monitor:7136): gtkmm-WARNING **: gtkmm: Attempt to call
  Gtk::manage() on a Gtk::Window, but a Gtk::Window has no parent
  container to manage its lifetime.

-- 
Ole Laursen
http://www.cs.aau.dk/~olau/



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