Changing toolbar icons
- From: Jim Deas <jdeas jadsystems com>
 
- To: gtk-list gnome org
 
- Subject: Changing toolbar icons
 
- Date: 13 Mar 2003 11:06:24 -0800
 
Hi,
 I am new to this so please no flames.
I am using Glade to create a user interface. Using
toolbars I have created a group of buttons for the
user. I would like to change to icon on the toolbar
in response to a user click. Using the snip below
I think I am getting the proper reference but how
do I change the displayed icon?
-------------------------------------------------------------------
void
on_button1_clicked                     (GtkButton       *button,
                                        gpointer         user_data)
{
//The button has been clicked.
GList* list = NULL;
GtkToolbar* toolbar;
struct GtkToolbarChild* child;
GtkWidget * tmp_toolbar_icon;
	toolbar = (GtkToolbar*)lookup_widget (GTK_WIDGET (button),
		"toolbar1");
	list = toolbar->children;//Get a list of all buttons here
	child = list->data;//get the first child on the toolbar
	tmp_toolbar_icon = gnome_stock_pixmap_widget (lookup_widget
		(GTK_WIDGET (button), "mainWin"), GNOME_STOCK_PIXMAP_OPEN);
	child->icon = tmp_toolbar_icon;*** This is wrong but why? ******
}
----------------------------------------------------------------------
Thanks for any help
JD
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]