Logo Search packages:      
Sourcecode: inkscape version File versions

MessageId Inkscape::MessageStack::flash ( MessageType  type,
gchar const *  message 
)

temporarily pushes a message onto the stack

Parameters:
type the message type
message the message text
Returns:
the id of the pushed message

Definition at line 64 of file message-stack.cpp.

References _push().

Referenced by Inkscape::MessageContext::flash(), and flashVF().

                                                                    {
    switch (type) {
    case INFORMATION_MESSAGE: // stay rather long so as to seem permanent, but eventually disappear
        return _push(type, 6000 + 80*strlen(message), message);
        break;
    case ERROR_MESSAGE: // pretty important stuff, but temporary
        return _push(type, 4000 + 60*strlen(message), message);
        break;
    case WARNING_MESSAGE: // a bit less important than error
        return _push(type, 2000 + 40*strlen(message), message);
        break;
    case NORMAL_MESSAGE: // something ephemeral
    default:
        return _push(type, 1000 + 20*strlen(message), message);
        break;
    }
}


Generated by  Doxygen 1.6.0   Back to index