diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-08-10 02:52:46 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-08-10 02:52:46 +0000 |
| commit | 921006afdb0cd6c956df3a05328737b88ef115ed (patch) | |
| tree | 3462e00fcad75f3ff9d5f5fe96e30895825703bb /src | |
| parent | Further fixes related to bug #1327267, toolbars don't need to update when the... (diff) | |
| download | inkscape-921006afdb0cd6c956df3a05328737b88ef115ed.tar.gz inkscape-921006afdb0cd6c956df3a05328737b88ef115ed.zip | |
Nuke connection-pool.h
(bzr r13341.1.127)
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/Makefile_insert | 1 | ||||
| -rw-r--r-- | src/connection-pool.h | 100 | ||||
| -rw-r--r-- | src/widgets/lpe-toolbar.cpp | 1 | ||||
| -rw-r--r-- | src/widgets/node-toolbar.cpp | 1 |
5 files changed, 0 insertions, 104 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 94b4b8c85..ab697d126 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -299,7 +299,6 @@ set(inkscape_SRC composite-undo-stack-observer.h conditions.h conn-avoid-ref.h - connection-pool.h console-output-undo-observer.h context-fns.h decimal-round.h diff --git a/src/Makefile_insert b/src/Makefile_insert index 436ab26f9..8e45cb4e0 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -24,7 +24,6 @@ ink_common_sources += \ composite-undo-stack-observer.h \ conditions.cpp conditions.h \ conn-avoid-ref.cpp conn-avoid-ref.h \ - connection-pool.h \ console-output-undo-observer.h console-output-undo-observer.cpp \ context-fns.cpp context-fns.h \ decimal-round.h \ diff --git a/src/connection-pool.h b/src/connection-pool.h deleted file mode 100644 index 4637a3cc1..000000000 --- a/src/connection-pool.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Author: - * mderezynski <mderezynski@users.sourceforge.net> - * - * Copyright (C) 2006 Author - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef CONNECTION_POOL_H -#define CONNECTION_POOL_H - -#include <glib-object.h> -#include <sigc++/sigc++.h> - -#include <map> -#include <stddef.h> -#include <string> -#include <exception> - -namespace Inkscape { - -/** - * @class ConnectionPool - * an auxilliary class to manage sigc::connections as if the referred object - * were a GObject; in that way, the class that holds a ConnectionPool does not - * need to also hold several sigc::connection objects - */ -class ConnectionPool { -public: - typedef std::map<std::string, sigc::connection*> ConnectionMap; - - struct NameExistsException : public std::exception { - virtual const char* what() const throw() { return "Inkscape::ConnectionPool: name exists"; } - }; - struct NameDoesNotExistException : public std::exception { - virtual const char* what() const throw() { return "Inkscape::ConnectionPool: name doesn't exist"; } - }; - - void add_connection(std::string name, sigc::connection* connection) { - if (_map.find(name) != _map.end()) { - throw NameExistsException(); - } - _map.insert(std::make_pair(name, connection)); - } - - void del_connection(std::string name) { - ConnectionMap::iterator iter = _map.find(name); - if (iter == _map.end()) { - throw NameDoesNotExistException(); - } - sigc::connection* connection = (*iter).second; - connection->disconnect(); - delete connection; - } - - - static Inkscape::ConnectionPool* new_connection_pool(std::string name) { - return new ConnectionPool(name); - } - - static void del_connection_pool(ConnectionPool* pool) { - delete pool; - } - - static void connect_destroy(GObject *obj, ConnectionPool *pool) { - g_object_connect (obj, "swapped-signal::destroy", G_CALLBACK(del_connection_pool), pool, NULL); - } - - operator std::string() { - return _name; - } - -private: - ConnectionPool(std::string name) : _name(name) {} - virtual ~ConnectionPool() { - for (ConnectionMap::iterator iter = _map.begin(), end = _map.end(); iter != end; ++iter) { - sigc::connection* connection = (*iter).second; - connection->disconnect(); - delete connection; - } - } - - ConnectionMap _map; - std::string _name; -}; -} - -#endif - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 : diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp index 9d1e0983f..7ad88b856 100644 --- a/src/widgets/lpe-toolbar.cpp +++ b/src/widgets/lpe-toolbar.cpp @@ -30,7 +30,6 @@ #include "live_effects/lpe-line_segment.h" #include "lpe-toolbar.h" -#include "connection-pool.h" #include "desktop-handles.h" #include "desktop.h" #include "document-undo.h" diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp index 20bf2f7b9..ace78f8f5 100644 --- a/src/widgets/node-toolbar.cpp +++ b/src/widgets/node-toolbar.cpp @@ -31,7 +31,6 @@ #include "ui/tool/multi-path-manipulator.h" #include <glibmm/i18n.h> #include "node-toolbar.h" -#include "connection-pool.h" #include "desktop-handles.h" #include "desktop.h" #include "document-undo.h" |
