Re: toolbuttons and icons
- From: Philippe Leroux <leroux00 yahoo fr>
- To: Murray Cumming <murrayc murrayc com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: toolbuttons and icons
- Date: Mon, 14 Feb 2005 13:47:31 -0500
On Mon, 2005-02-14 at 18:03 +0100, Murray Cumming wrote:
>Please use Reply To All with mailing lists.
>
yes, that's usually what i do, my error (i pushed the wrong button, i
need more cafe), sorry
I found ..my bug....
Gtk::Image(filename) takes an std::string instead of char* as the
previous function i used did
so i converted some variables from char* to std::strings
and some variables where initialized to NULL (no icons), which leads to
a std::logic error
i corrected to initialize the variables to an empty string, and
everything is fine.
Thank you for your valuable help
P.L.
>On Mon, 2005-02-14 at 11:49 -0500, Philippe Leroux wrote:
>> >
>> >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?
>
>Possibly.
>
>> should i fill in a bug report?
>
>Yes, with a simple-as-possible test case.
>
>> or is it just me not using the api right?
>
>>
>>
>>
>> >I recommend the UIManager in 2.4 anyway:
>> >http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch10.html
>> >
>>
>>
>> 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]