]> git.tokkee.org Git - inkscape.git/commitdiff

Code

Fixed problem with std::map use making last verb inaccessible.
authorjoncruz <joncruz@users.sourceforge.net>
Sun, 7 May 2006 01:10:26 +0000 (01:10 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Sun, 7 May 2006 01:10:26 +0000 (01:10 +0000)
ChangeLog
src/verbs-test.h
src/verbs.cpp
src/verbs.h

index 88a76e67762aa364bcf17c501964645b9206df5c..b55477ca0e8cc8b4598b8f10c5ebdef29d77d643 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-01  Jon A. Cruz  <jon@joncruz.org>
+
+       * src/verbs.h, src/verbs.cpp, src/verbs-test.h:
+         Fixed problem with std::map use making last verb inaccessible.
+
 2006-05-05  Carl Hetherington  <inkscape@carlh.net>
 
        * src/draw-context.cpp, src/line-snapper.h, src/snap.cpp,
index 24c7c73a62984510267cd5a69b95918864adadd2..4fe6ea888c9e6d62b22f07b2cdce861c953d9319 100644 (file)
@@ -60,7 +60,7 @@ public:
                     }
                     else
                     {
-                        TS_WARN( std::string("Unable to getbyid() for ") + descr + std::string(" ID: '") + std::string(verb->get_id()) + std::string("'") );
+                        TS_FAIL( std::string("Unable to getbyid() for ") + descr + std::string(" ID: '") + std::string(verb->get_id()) + std::string("'") );
                     }
                 }
                 else
index 66792ae410a1b8f5babd2e1947d184188ad9196b..a5b76d7cfc34ef87ca65d51286771cd7d42b8799 100644 (file)
@@ -45,6 +45,7 @@
 #include "dialogs/iconpreview.h"
 #include "dialogs/extensions.h"
 #include "dialogs/swatches.h"
+//#include "dialogs/layers-panel.h"
 #include "dialogs/input.h"
 
 #ifdef WITH_INKBOARD
@@ -1624,6 +1625,9 @@ DialogVerb::perform(SPAction *action, void *data, void *pdata)
         case SP_VERB_DIALOG_EXTENSIONEDITOR:
             dt->_dlg_mgr->showDialog("ExtensionEditor");
             break;
+//         case SP_VERB_DIALOG_LAYERS:
+//             show_panel( Inkscape::UI::Dialogs::LayersPanel::getInstance(), "dialogs.layers", SP_VERB_DIALOG_LAYERS );
+//             break;
         default:
             break;
     }
@@ -2310,6 +2314,8 @@ Verb *Verb::_base_verbs[] = {
                    N_("Configure extended input devices, such as a graphics tablet"), NULL),
     new DialogVerb(SP_VERB_DIALOG_EXTENSIONEDITOR, "org.inkscape.dialogs.extensioneditor", N_("_Extensions..."),
                    N_("Query information about extensions"), NULL),
+//     new DialogVerb(SP_VERB_DIALOG_LAYERS, "DialogLayers", N_("_Layers..."),
+//                    N_("View Layers"), NULL),
 
     /* Help */
     new HelpVerb(SP_VERB_HELP_KEYS, "HelpKeys", N_("_Keys and Mouse"),
@@ -2355,7 +2361,7 @@ Verb *Verb::_base_verbs[] = {
                        N_("Fit the canvas to the current selection or the drawing if there is no selection"), NULL),
     
     /* Footer */
-    new Verb(SP_VERB_LAST, NULL, NULL, NULL, NULL)
+    new Verb(SP_VERB_LAST, " '\"invalid id", NULL, NULL, NULL)
 };
 
 
index f77085d7a3400827331c7ed96053e89960055668..15ea2f2e843a15117defd3ce084bf379883174e8 100644 (file)
@@ -196,17 +196,18 @@ enum {
     SP_VERB_DIALOG_CLONETILER,
     SP_VERB_DIALOG_ITEM,
 #ifdef WITH_INKBOARD
-       SP_VERB_DIALOG_WHITEBOARD_CONNECT,
-       SP_VERB_DIALOG_WHITEBOARD_SHAREWITHUSER,
-       SP_VERB_DIALOG_WHITEBOARD_SHAREWITHCHAT,
-       SP_VERB_DIALOG_WHITEBOARD_DUMPXMLTRACKER,
-       SP_VERB_DIALOG_WHITEBOARD_OPENSESSIONFILE,
-       SP_VERB_DIALOG_WHITEBOARD_SESSIONPLAYBACK,
-       SP_VERB_DIALOG_WHITEBOARD_DISCONNECT_FROM_SESSION,
-       SP_VERB_DIALOG_WHITEBOARD_DISCONNECT_FROM_SERVER,
+    SP_VERB_DIALOG_WHITEBOARD_CONNECT,
+    SP_VERB_DIALOG_WHITEBOARD_SHAREWITHUSER,
+    SP_VERB_DIALOG_WHITEBOARD_SHAREWITHCHAT,
+    SP_VERB_DIALOG_WHITEBOARD_DUMPXMLTRACKER,
+    SP_VERB_DIALOG_WHITEBOARD_OPENSESSIONFILE,
+    SP_VERB_DIALOG_WHITEBOARD_SESSIONPLAYBACK,
+    SP_VERB_DIALOG_WHITEBOARD_DISCONNECT_FROM_SESSION,
+    SP_VERB_DIALOG_WHITEBOARD_DISCONNECT_FROM_SERVER,
 #endif
     SP_VERB_DIALOG_INPUT,
     SP_VERB_DIALOG_EXTENSIONEDITOR,
+    //SP_VERB_DIALOG_LAYERS,
     /* Help */
     SP_VERB_HELP_KEYS,
     SP_VERB_HELP_ABOUT_EXTENSIONS,
@@ -256,8 +257,13 @@ private:
         to find the different verbs in the hash map. */
     struct ltstr {
         bool operator()(const char* s1, const char* s2) const {
-            if (s1 == NULL || s2 == NULL) return true;
-            return strcmp(s1, s2) < 0;
+            if ( (s1 == NULL) && (s2 != NULL) ) {
+                return true;
+            } else if (s1 == NULL || s2 == NULL) {
+                return false;
+            } else {
+                return strcmp(s1, s2) < 0;
+            }
         }
     };
     /** \brief An easy to use definition of the table of verbs by ID. */