gtk stock icons missing

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

 



I don't know if this is a fedora problem or a gtk one...

I have been writing some short gtk programs, as a learning exercise. So
far as I can see, I should be able to add items from stock, but the
images are missing and all I get are the default items as mnemonics. I
have attached a short example. It compiles with:
gcc  stock.c `pkg-config --cflags gtk+-2.0 --libs gtk+-2.0`

It seems that gtk can't find the directory with the images. The files
needed seem to be in /usr/share/icons/gnome and show up in the gtk-demo
program. However, Glade buttons selected from stock do not have the
icons either.

Any suggestions most welcome!
-- 
N James Bridge <james@xxxxxxxxxxxxxxxx>
#include <gtk/gtk.h>

static void destroy (GtkWidget *window, gpointer data);

int main (int argc, char *argv[])
{
   GtkWidget *window, *close;
   
   gtk_init (&argc, &argv);
   
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_widget_set_size_request (window, 200,100);
   g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL);
   
/* This line should produce a buttone with a stock close image but it only
   produces the default (a mnemonic) */
   close = gtk_button_new_from_stock ("gtk_close");
   g_signal_connect (G_OBJECT (close), "clicked", G_CALLBACK (destroy), NULL);
   
   gtk_container_add (GTK_CONTAINER (window), close);
   gtk_widget_show_all (window);
   
   gtk_main ();
   return 0;
}

static void destroy (GtkWidget *window, gpointer data)
{
   gtk_main_quit ();
}

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux