Beispiel #1
0
static void add_to_status_history(const MString& message)
{
    static MString empty = rm(" ");

    if (history == 0)
	history = new MString[status_history_size];

    int last_history = 
	(status_history_size + current_history - 1) % status_history_size;

    if (message.isNull() || message.isEmpty() || message == empty)
	return;

    if (is_prefix(history[last_history], message))
    {
	history[last_history] = message;
	return;
    }

    history[current_history] = message;
    current_history = (current_history + 1) % status_history_size;
}
Beispiel #2
0
inline bool is_tip(const MString& m)
{
    return !m.isNull() && !m.isEmpty();
}