|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Libglade and stock iconsHi list!
I want to use my own icons in a libglade-loaded GUI. In Glade, I selected "Image Type: Icon Theme" and supplied my own stock ID under "Icon name". The icon is loaded in a GtkIconFactory which is installed via add_default(). Widgets from the glade file using the stock icon display show an image missing symbol, widgets created from PHP-Gtk directly work fine. Here is the sample code and glade definition to demonstrate: ----- icons.php ------ <?php $iconfactory = new GtkIconFactory(); $iconfactory->add('myapp-test', GtkIconSet::new_from_pixbuf(GdkPixbuf::new_from_file('test.png'))); $iconfactory->add_default(); $glade = new GladeXML('icons.glade'); $window = $glade->get_widget('window1'); $vbox = $glade->get_widget('vbox1'); $vbox->add(GtkImage::new_from_stock('myapp-test', Gtk::ICON_SIZE_MENU)); $window->show_all(); Gtk::main(); ?> ----- icons.glade ----- <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> <!--Generated with glade3 3.4.3 on Tue Sep 30 17:14:27 2008 --> <glade-interface> <widget class="GtkWindow" id="window1"> <child> <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> <child> <widget class="GtkToolbar" id="toolbar1"> <property name="visible">True</property> <child> <widget class="GtkToolButton" id="toolbutton1"> <property name="visible">True</property> <property name="icon_name">myapp-test</property> </widget> <packing> <property name="expand">False</property> </packing> </child> </widget> <packing> <property name="expand">False</property> </packing> </child> <child> <widget class="GtkImage" id="image1"> <property name="visible">True</property> <property name="icon_name">myapp-test</property> </widget> <packing> <property name="position">1</property> </packing> </child> </widget> </child> </widget> </glade-interface> I found a post about the topic concerning PyGTK (http://article.gmane.org/gmane.comp.gnome.gtk%2B.python/4951), so it might be a libglade issue. Just couldn't test it with libglade natively from within C so I report it here. I'm using the PHP-Gtk2 beta since my application segfaults in very strange places with 2.0.0 and 2.0.1. Need to investigate more on that, so I'll describe it in another post. Regards, Andre -- Greetings... From: Andre Colomb <acolomb@...> -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: Libglade and stock iconsHi Andre,
> I found a post about the topic concerning PyGTK > (http://article.gmane.org/gmane.comp.gnome.gtk%2B.python/4951), so it > might be a libglade issue. Just couldn't test it with libglade natively > from within C so I report it here. > > I'm using the PHP-Gtk2 beta since my application segfaults in very strange > places with 2.0.0 and 2.0.1. Need to investigate more on that, so I'll > describe it in another post. You're correct, that is a libglade issue. The PHP-GTK libglade extension is a thin v2 library wrapper for the most part. More interested in the segfaults :) Please describe them on http://bugs.php.net under PHP-GTK related. Thanks, - Steph -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: Libglade and stock iconsSteph Fox wrote:
> Hi Andre, > >> I found a post about the topic concerning PyGTK >> (http://article.gmane.org/gmane.comp.gnome.gtk%2B.python/4951), so it >> might be a libglade issue. Just couldn't test it with libglade >> natively from within C so I report it here. >> >> I'm using the PHP-Gtk2 beta since my application segfaults in very >> strange places with 2.0.0 and 2.0.1. Need to investigate more on that, >> so I'll describe it in another post. > > You're correct, that is a libglade issue. The PHP-GTK libglade extension > is a thin v2 library wrapper for the most part. > > More interested in the segfaults :) Please describe them on > http://bugs.php.net under PHP-GTK related. > > Thanks, > > - Steph > As Steph said, the segfaults we can fix...the libglade issues we can't ;) Please report the segfaults. thanks, Elizabeth -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
| Free embeddable forum powered by Nabble | Forum Help |