]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/connector.cpp
Add a persistent view size attribute to List
[libs/gltk.git] / source / connector.cpp
index 690a57bc21bb553e05b249905b4bf5b39ef20ae3..9915ecc19d8df6291f87c0d84350990d8a2847e8 100644 (file)
@@ -1,10 +1,4 @@
-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
+#include <msp/core/maputils.h>
 #include "connector.h"
 #include "logic.h"
 
@@ -25,11 +19,8 @@ void Connector::connect(const Logic &logic)
 
        for(list<Logic::WidgetBinding>::const_iterator i=logic_binds.begin(); i!=logic_binds.end(); ++i)
        {
-               map<string, ConnAction *>::const_iterator j = actions.find(i->type);
-               if(j!=actions.end())
-                       j->second->connect(*this, *i->wdg, i->data);
-               else
-                       throw KeyError("Unknown binding type", i->type);
+               ConnAction *action = get_item(actions, i->type);
+               action->connect(*this, *i->wdg, i->data);
        }
 }