diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2009-11-28 22:00:32 +0000 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2009-11-28 22:00:32 +0000 |
commit | da62763841853b963ba070ee318bd5b860ce01ec (patch) | |
tree | 77d63ec65bb32748bdd04cdf15d987ecff2e3ebc | |
parent | 7bc8bc88df414f0de8d41293c163a46814fda28c (diff) |
Change texture UI a bit
-rw-r--r-- | res/main.xml | 6 | ||||
-rw-r--r-- | src/texture.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/res/main.xml b/res/main.xml index 0baadcd..00125f5 100644 --- a/res/main.xml +++ b/res/main.xml @@ -130,10 +130,10 @@ </packing> </child> <child> - <object class="GtkToolButton" id="tool_alpha"> + <object class="GtkToggleToolButton" id="tool_alpha"> <property name="label" translatable="yes">Alpha Blend</property> <property name="use_underline">True</property> - <property name="icon_name">format-text-bold</property> + <property name="stock_id">gtk-bold</property> </object> <packing> <property name="expand">False</property> @@ -141,7 +141,7 @@ </packing> </child> <child> - <object class="GtkToolButton" id="tool_auto"> + <object class="GtkToggleToolButton" id="tool_auto"> <property name="label" translatable="yes">Auto</property> <property name="use_underline">True</property> <property name="stock_id">gtk-execute</property> diff --git a/src/texture.c b/src/texture.c index cefccd0..255db9c 100644 --- a/src/texture.c +++ b/src/texture.c @@ -174,7 +174,6 @@ void texture_unviewed(struct program *p) gtk_widget_hide(p->tool.background); gtk_widget_hide(GTK_WIDGET(p->main.draw)); - p->texture.alpha = TRUE; p->texture.automatic = FALSE; p->texture.back = BACK_CHECKER; @@ -194,9 +193,10 @@ void texture_viewed(struct program *p) gtk_widget_show(p->tool.background); gtk_widget_show(GTK_WIDGET(p->main.draw)); - p->texture.alpha = TRUE; p->texture.automatic = FALSE; p->texture.back = BACK_CHECKER; + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(p->tool.alpha), p->texture.alpha); + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(p->tool.automatic), FALSE); p->texture.tid[0] = g_signal_connect(p->tool.alpha, "clicked", G_CALLBACK(alpha), p); p->texture.tid[1] = g_signal_connect(p->tool.automatic, "clicked", G_CALLBACK(automatic), p); |