Jonathon Jongsma wrote:
> On 11/2/06, Paul Pogonyshev <[EMAIL PROTECTED]> wrote:
> > Hi.
> >
> > Where is error in this code fragment?
> >
> >       std::vector <std::string>  yelp_arguments;
> >
> >       yelp_arguments.push_back ("yelp");
> >       yelp_arguments.push_back 
> > ("ghelp:///usr/share/gnome/help/gedit/C/gedit.xml");
> >
> >       try
> >         {
> >           Glib::spawn_async (".", yelp_arguments, std::vector <std::string> 
> > (),
> >                              Glib::SPAWN_SEARCH_PATH);
> >           return;
> >         }
> >       catch (Glib::Error& exception)
> >         {
> >           g_print ("%s...\n", exception.what ().c_str ());
> >         }
> >
> > I get this in terminal:
> >
> >     (yelp:14036): Gtk-WARNING **: cannot open display:
> >
> > and Yelp window is never shown.
> >
> > Paul
> 
> Looking at the glibmm source, it looks like there may be a bug in the
> wrapper.  In the C version g_spawn_async, you're supposed to pass a
> NULL pointer for the envp parameter if you want to inherit the
> environment of the parent (e.g. the DISPLAY variable, etc).  But when
> you pass an empty vector to the glibmm version, it doesn't appear to
> translate that to NULL, which is probably what you want

I see.  Yet another bug in Glibmm/Gtkmm.  I'll use C function then.
Thank you.

Paul
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to