Re: toolbuttons and icons

>I guess you mean glademm. glademm has its own mailing list.

I'm not actually using glademm, i just had a look at the code it made
yet glademm inserts the pixbuf in the code converting the svg file to
xpm or something

>> Glib::RefPtr<Gdk::PixbufLoader>_toolbutton_img=Gdk::PixbufLoader::create(std::string("../icons/sphere.svg"),false);
>> Gtk::Image *toolbutton_img = Gtk::manage(new class
>> Gtk::Image(_toolbutton_img->get_pixbuf()));
>>    _toolbutton_img=Glib::RefPtr<Gdk::PixbufLoader>();
>> Gtk::ToolButton* toolbuttontmp = Gtk::manage(new class
>> 		Gtk::ToolButton(*toolbutton_img,iM->Name)
>Surely you can break that down to discover where the problem is.

The problem here comes from loading the image
if i do 
	new Gtk::Image("image_file")
the program terminates with std::logic_error

is that a bug? should i fill in a bug report?
or is it just me not using the api right? 

>I recommend the UIManager in 2.4 anyway:

UI manager doesn't provide what i need, thought it looks nice
i'm doing some kind of dynamic UI creation where plug-ins can add
buttons to toolbars

the thing works, i just can't get an image to load :(

Thank you for your fast answer Murray
I'll now try to figure out what is wrong with loading the image

P. L.

Philippe Leroux <leroux00 yahoo fr>

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