Re: Insensitivity doesn't propagate to icon
- From: Matthias Mann <matman matman24 org>
- To: gtk-app-devel-list gnome org
- Subject: Re: Insensitivity doesn't propagate to icon
- Date: Tue, 19 Aug 2003 10:09:34 +0200
On Monday August 18 2003 02:19 CEST, David Slusky wrote:
Obviously there is something that I have overlooked, but I am
not sure what it is. Does anyone know where I am going wrong?
Hi David!
If i see your mainapp_connection_... function, you are changing
the icon of any toolbar child. Is this child a Gtk button?
If yes i think you need to change the whole button and not only
the label and icon of button.
mathew
void mainapp_connection_button_set_state(gboolean connected)
{
GtkToolbarChild *child;
GtkWidget *vbox;
g_return_if_fail((child = g_list_nth_data(
GTK_TOOLBAR(mainapp.toolbar)->children, 0)));
vbox = g_list_nth_data(gtk_container_children(
GTK_CONTAINER(child->widget)), 0);
g_return_if_fail(GTK_IS_BOX(vbox));
if(child->icon)
gtk_widget_destroy(child->icon);
if(connected)
{
child->icon = gnome_pixmap_new_from_xpm_d
(disconnect_xpm);
gtk_label_set_text(GTK_LABEL(child->label),
"Disconnect");
}
else
{
child->icon = gnome_pixmap_new_from_xpm_d
(connect_xpm);
gtk_label_set_text(GTK_LABEL(child->label),
"Connect");
}
gtk_box_pack_end(GTK_BOX(vbox), child->icon, FALSE, FALSE,
0);
gtk_widget_show(child->icon);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]