tolerate bogus values sanely. Update string to describe bonobo priority
2002-05-14 Michael Meeks <michael@ximian.com> * gnome-ui-properties.c (toolbar_to_widget, set_toolbar_style): tolerate bogus values sanely. Update string to describe bonobo priority text
This commit is contained in:
parent
012e334dd2
commit
331ec2dfa3
3 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2002-05-14 Michael Meeks <michael@ximian.com>
|
||||||
|
|
||||||
|
* gnome-ui-properties.c
|
||||||
|
(toolbar_to_widget, set_toolbar_style): tolerate
|
||||||
|
bogus values sanely.
|
||||||
|
Update string to describe bonobo priority text
|
||||||
|
|
||||||
2002-05-09 Jody Goldberg <jody@gnome.org>
|
2002-05-09 Jody Goldberg <jody@gnome.org>
|
||||||
|
|
||||||
* gnome-ui-properties.glade : add a help button.
|
* gnome-ui-properties.glade : add a help button.
|
||||||
|
|
|
@ -41,7 +41,7 @@ static GConfEnumStringPair toolbar_style_enums[] = {
|
||||||
{ 1, "both_horiz" },
|
{ 1, "both_horiz" },
|
||||||
{ 2, "icons" },
|
{ 2, "icons" },
|
||||||
{ 3, "text" },
|
{ 3, "text" },
|
||||||
{ -1, NULL },
|
{ -1, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static GConfValue *
|
static GConfValue *
|
||||||
|
@ -65,9 +65,8 @@ toolbar_to_widget (GConfPropertyEditor *peditor, GConfValue *value)
|
||||||
|
|
||||||
str = (value && (value->type == GCONF_VALUE_STRING)) ? gconf_value_get_string (value) : NULL;
|
str = (value && (value->type == GCONF_VALUE_STRING)) ? gconf_value_get_string (value) : NULL;
|
||||||
new_value = gconf_value_new (GCONF_VALUE_INT);
|
new_value = gconf_value_new (GCONF_VALUE_INT);
|
||||||
gconf_string_to_enum (toolbar_style_enums,
|
if (!gconf_string_to_enum (toolbar_style_enums, str, &val))
|
||||||
str,
|
val = 0;
|
||||||
&val);
|
|
||||||
gconf_value_set_int (new_value, val);
|
gconf_value_set_int (new_value, val);
|
||||||
|
|
||||||
return new_value;
|
return new_value;
|
||||||
|
@ -143,7 +142,8 @@ set_toolbar_style (GladeXML *dialog, const char *value)
|
||||||
|
|
||||||
int enum_val;
|
int enum_val;
|
||||||
|
|
||||||
gconf_string_to_enum (toolbar_style_enums, value, &enum_val);
|
if (!gconf_string_to_enum (toolbar_style_enums, value, &enum_val))
|
||||||
|
enum_val = 0;
|
||||||
|
|
||||||
gtk_toolbar_set_style (GTK_TOOLBAR (WID("toolbar_toolbar")),
|
gtk_toolbar_set_style (GTK_TOOLBAR (WID("toolbar_toolbar")),
|
||||||
gtk_toolbar_styles[enum_val]);
|
gtk_toolbar_styles[enum_val]);
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkMenuItem" id="convertwidget3">
|
<widget class="GtkMenuItem" id="convertwidget3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Text Beside Icons</property>
|
<property name="label" translatable="yes">Priority Text Beside Icons</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue