diff --git a/src/message-stack.cpp b/src/message-stack.cpp
index 4186970e3510603c5962f2d2d5ec659ec7be470f..d2101009e0d90a8b537523c7f4876f1c8bac4eee 100644 (file)
--- a/src/message-stack.cpp
+++ b/src/message-stack.cpp
/*
/*
- * MessageStack - context for posting status messages
+ * MessageStack - manages stack of active status messages
*
* Authors:
* MenTaLguY <mental@rydia.net>
*
* Authors:
* MenTaLguY <mental@rydia.net>
* Released under GNU GPL, read the file 'COPYING' for more information
*/
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <string.h>
#include <glib/gstrfuncs.h>
#include <glib/gstrfuncs.h>
+#include <cstring>
+#include <string>
#include "message-stack.h"
namespace Inkscape {
#include "message-stack.h"
namespace Inkscape {
case WARNING_MESSAGE: // a bit less important than error
return _push(type, 2000 + 40*strlen(message), message);
break;
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);
case NORMAL_MESSAGE: // something ephemeral
default:
return _push(type, 1000 + 20*strlen(message), message);
_changed_signal.emit(NORMAL_MESSAGE, NULL);
}
}
_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<Message *>(data);
m->timeout_id = 0;
gboolean MessageStack::_timeout(gpointer data) {
Message *m=reinterpret_cast<Message *>(data);
m->timeout_id = 0;
fill-column:99
End:
*/
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :