Logo Search packages:      
Sourcecode: inkscape version File versions

void ege_adjustment_action_set_descriptions ( EgeAdjustmentAction action,
gchar const **  descriptions,
gdouble const *  values,
guint  count 
)

Set a list of values with labels to explicitly include in menus.

Parameters:
action The action to set explicit entries for.
descriptions Array of descriptions to include. Descriptions will be matched one-for-one with numbers in the 'values' array.
values Array of values to include. Values will be matched one-for-one with numbers in the 'descriptions' array.
count Number of items in the 'descriptions' and 'values' arrays.

Definition at line 510 of file ege-adjustment-action.cpp.

References _EgeAdjustmentAction::private_data.

{
    g_return_if_fail( IS_EGE_ADJUSTMENT_ACTION(action) );

    egeAct_free_all_descriptions( action );

    if ( count && descriptions && values ) {
        guint i = 0;
        for ( i = 0; i < count; i++ ) {
            EgeAdjustmentDescr* descr = g_new0( EgeAdjustmentDescr, 1 );
            descr->descr = descriptions[i] ? g_strdup( descriptions[i] ) : 0;
            descr->value = values[i];
            action->private_data->descriptions = g_list_insert_sorted( action->private_data->descriptions, (gpointer)descr, egeAct_compare_descriptions );
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index