Problem creating a toolbar with only icons



Hi,
I am trying to create a toolbar with only icons.

when I use 
toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,
GTK_TOOLBAR_ICONS);
it still shows the text.
I even try to change it in the testgtk example, and it doesn't 
change anything.

Then I add
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
just after the creation, it doesn't do anything either.

If I change the line to :
toolbar = gtk_toolbar_new (GTK_ORIENTATION_VERTICAL, GTK_TOOLBAR_ICONS);
I got a vertical toolbar, so it should work also with icons.

Then I add an item with the callback from the example
to switch to icons only. Too bad, it still doesn't work.  
gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
		   "Essai", "Horizontal toolbar layout", "Toolbar/Horizontal",
		   new_pixmap ("test.xpm", window->window,     	            
                   &window->style->bg[GTK_STATE_NORMAL]),
		   (GtkSignalFunc) set_toolbar_icons, toolbar);

static void set_toolbar_icons (GtkWidget *widget,
			       gpointer   data)
{
  gtk_toolbar_set_style (GTK_TOOLBAR (data), GTK_TOOLBAR_ICONS);
}

Is there anything I am doing wrong ?

Thanks in advance for your help

Ronan



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