API extension?: bool cMenuEditStrItem::InEditMode()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

is there a chance to get a new member function like

bool cMenuEditStrItem::InEditMode()
{
    return pos > -1;
}

that returns the edit state on an item?
I need this to set different color buttons for an edit item depending on 
its edit state.
My current solution compares item text and value and  is quite ugly ;-) :

bool InEditMode(const char* ItemText, const char* ItemName, const char* 
ItemValue)
{
    bool bEditMode = true;
    // ugly solution to detect, if in edit mode
    char* value = strdup(ItemText);
    strreplace(value, ItemName, "");
    strreplace(value, ":\t", "");
    // for bigpatch
    strreplace(value, "\t", "");
    if (strlen(value) == strlen(ItemValue))
    bEditMode = false;
    free(value);
    return bEditMode;
}

BR,

Christian





[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux