toolbuttons and icons
- From: Philippe Leroux <leroux00 yahoo fr>
- To: Gtkmm Mailing List <gtkmm-list gnome org>
- Subject: toolbuttons and icons
- Date: Sat, 12 Feb 2005 14:39:21 -0500
Hy there,
i'm converting an app from gtkmm 2.2 to 2.4
i can't get icons to work in toolbuttons
currently i have the following (after having a look at how glade creates
the code)
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));
executing the program leads to
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
Aborted
the Gtk::Image(image_file) leads to the same error
I presume i'mn missing something but couldn't figure what
it used to work fine with the provided functions in gtkmm 2.2
isn't there a function like for the button widget
button.add_pixlabel(pixmap_file, "label");
I couldn't find anything in the documentation
Thanks in advance
Philippe L.
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]