Re: missing stock images?
- From: Skip Montanaro <skip pobox com>
- To: gtk-list gnome org
- Subject: Re: missing stock images?
- Date: Wed, 24 Oct 2001 16:54:40 -0500
Havoc> They should be working. Try gtk-demo, see if they work there
Havoc> ("stock browser").
me> Sure enough, they all seem to work there. I'll have to dig into
me> things a little on the PyGtk side.
Well, after trying some stuff out on the PyGtk side I couldn't figure out
what was wrong, so I broke down and wrote a little example in C. The code
below exhibits the same problem I see in my Python script(s) -- up and down
stock items just display the string names, but back and forward work as
expected.
#include <gtk/gtk.h>
int main( int argc,
char *argv[] )
{
GtkWidget *window;
GtkWidget *table;
GtkWidget *b;
guint aopt = GTK_EXPAND|GTK_FILL|GTK_SHRINK;
gchar *stock[] = {GTK_STOCK_GO_UP, GTK_STOCK_GO_DOWN,
GTK_STOCK_GO_FORWARD, GTK_STOCK_GO_BACK};
guint i;
gtk_init(&argc, &argv);
/* Standard window-creating stuff */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
gtk_window_set_title (GTK_WINDOW (window), "stock item example");
table = gtk_table_new(4, 1, TRUE);
gtk_container_add(GTK_CONTAINER(window), table);
for (i=0; i<4; i++) {
b = gtk_button_new_from_stock(stock[i]);
gtk_table_attach(GTK_TABLE (table), b, 0, 1, i, i+1,
aopt, aopt, 0, 0);
}
gtk_widget_show_all (GTK_WIDGET(window));
gtk_main();
return(0);
}
I placed a GIF image of what I see when I run this code at
http://musi-cal.mojam.com/~skip/stock.gif
Can someone else reproduce this problem? If not, can someone (else) explain
what's happening?
Thanks,
--
Skip Montanaro (skip pobox com)
http://www.mojam.com/
http://www.musi-cal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]