RE: [gnomemm] how should I use Gnome::Program::locate_file?



Since it is a static object, you need to use the get() function to get a
pointer to Gnome::Program:

Gnome::Program::get()->locate_file((GnomeFileDomain)10, "pixmap_open.png")

or:

Glib::RefPtr<Gnome::Program> ptrProg = Gnome::Program::get();
ptrProg->->locate_file((GnomeFileDomain)10, "pixmap_open.png");

Dale


-----Original Message-----
From: Manuel Clos [mailto:llanero eresmas net]
Sent: Saturday, September 14, 2002 8:47 AM
To: gnomemm-list
Subject: [gnomemm] how should I use Gnome::Program::locate_file?


Hi all,

I'm trying to get the path for the pixmaps used in my app.

I need to use something like this:

Gnome::Program::locate_file((GnomeFileDomain)10, "pixmap_open.png")

but when doing so, the compiler says:

cannot call member function 
`Gnome::Program::locate_file(GnomeFileDomain, const Glib::ustring &, 
bool)' without object

but I really don't know how do I get to my Program object. There is no 
constructor in program.h, Gnome::Main derives from Gtk::Main, and 
Gnome::Program derives from Glib::Object.

So how do I use this function?

Thank you.

-- 
Manuel Clos
llanero eresmas net

TCPA y Palladium: http://bulmalug.net/body.phtml?nIdNoticia=1398
TCPA and Palladium: http://www.cl.cam.ac.uk/~rja14/tcpa-faq.html

_______________________________________________
gnomemm-list mailing list
gnomemm-list gnome org
http://mail.gnome.org/mailman/listinfo/gnomemm-list



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