Example #1
0
bool UnitMenu::setUnit(Glib::ustring const & unit)
{
    // TODO:  Determine if 'unit' is available in the dropdown.
    //        If not, return false

    set_active_text(unit);
    return true;
}
void Gobby::EncodingSelector::set_encoding(const std::string& encoding)
{
	if(encoding == AUTO_DETECT)
	{
		if(m_show_automatic)
			set_active(0);
	}
	else
	{
		set_active_text(encoding);
	}
}
Example #3
0
bool UnitMenu::setUnitType(UnitType unit_type) 
{
    // Expand the unit widget with unit entries from the unit table
    UnitTable::UnitMap m = unit_table.units(unit_type);

    for (UnitTable::UnitMap::iterator i = m.begin(); i != m.end(); ++i) {
        append(i->first);
    }
    _type = unit_type;
    set_active_text(unit_table.primary(unit_type));

    return true;
}
Example #4
0
static void set_weight_description(struct ws_widget *ws_widget, const char *desc)
{
	set_active_text(ws_widget->description, desc);
}
Example #5
0
static void set_cylinder_description(struct cylinder_widget *cylinder, const char *desc)
{
	set_active_text(cylinder->description, desc);
}