X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fmessage-stack.cpp;h=05aec87fc8a1951c5108f49c228200f32715d700;hb=57eb32794c2df43d60ee8f0a9aa8576567358ce6;hp=4186970e3510603c5962f2d2d5ec659ec7be470f;hpb=34bbe9388eab58e6a7ab25d664595e0ed3b8dee8;p=inkscape.git diff --git a/src/message-stack.cpp b/src/message-stack.cpp index 4186970e3..05aec87fc 100644 --- a/src/message-stack.cpp +++ b/src/message-stack.cpp @@ -1,5 +1,5 @@ /* - * MessageStack - context for posting status messages + * MessageStack - manages stack of active status messages * * Authors: * MenTaLguY @@ -9,7 +9,10 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include #include +#include +#include #include "message-stack.h" namespace Inkscape { @@ -70,6 +73,9 @@ MessageId MessageStack::flash(MessageType type, gchar const *message) { case WARNING_MESSAGE: // a bit less important than error return _push(type, 2000 + 40*strlen(message), message); break; + case IMMEDIATE_MESSAGE: // same length as normal, higher priority + return _push(type, 1000 + 20*strlen(message), message); + break; case NORMAL_MESSAGE: // something ephemeral default: return _push(type, 1000 + 20*strlen(message), message); @@ -138,8 +144,7 @@ void MessageStack::_emitChanged() { _changed_signal.emit(NORMAL_MESSAGE, NULL); } } -// JON: this has o stay this way because of legacy use of glib -// would like to change this to bool + gboolean MessageStack::_timeout(gpointer data) { Message *m=reinterpret_cast(data); m->timeout_id = 0;