Code

Use subdirectories with icon sizes.
[inkscape.git] / src / message-stack.cpp
index 4186970e3510603c5962f2d2d5ec659ec7be470f..d2101009e0d90a8b537523c7f4876f1c8bac4eee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * MessageStack - context for posting status messages
+ * MessageStack - manages stack of active status messages
  *
  * Authors:
  *   MenTaLguY <mental@rydia.net>
@@ -9,7 +9,10 @@
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
+#include <string.h>
 #include <glib/gstrfuncs.h>
+#include <cstring>
+#include <string>
 #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<Message *>(data);
     m->timeout_id = 0;
@@ -158,4 +163,4 @@ gboolean MessageStack::_timeout(gpointer data) {
   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 :