diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-06-11 09:31:39 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-06-11 09:31:39 +0000 |
| commit | 6e8779121b88278d108e86e22fbe19bd6d6cc254 (patch) | |
| tree | 939926f0f5c30292d1c525003b1af567592a60e8 /src | |
| parent | Removed Object class and temporary test dependencies (diff) | |
| parent | [Bug 1588983] Finish up German tutorials for 0.92 - part 3. (diff) | |
| download | inkscape-6e8779121b88278d108e86e22fbe19bd6d6cc254.tar.gz inkscape-6e8779121b88278d108e86e22fbe19bd6d6cc254.zip | |
Added return value to remove
(bzr r14954.1.5)
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 11 | ||||
| -rw-r--r-- | src/object-set.cpp | 14 | ||||
| -rw-r--r-- | src/object-set.h | 2 | ||||
| -rw-r--r-- | src/ui/tools/tool-base.cpp | 5 |
4 files changed, 12 insertions, 20 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 92436ea9a..a758691af 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -515,17 +515,6 @@ add_library(inkscape_base SHARED ${inkscape_SRC} ${sp_SRC}) add_executable(inkscape ${main_SRC} ) add_executable(inkview inkview.cpp ) - - -if(UNIX) -# message after building. -add_custom_command( - TARGET inkscape - POST_BUILD MAIN_DEPENDENCY inkscape - COMMAND ${CMAKE_COMMAND} -E echo 'now run: \"make install\" to copy runtime files & scripts to ${CMAKE_INSTALL_PREFIX}' -) -endif() - add_dependencies(inkscape inkscape_version) if(WITH_DBUS) diff --git a/src/object-set.cpp b/src/object-set.cpp index df4bc1435..ba7999c19 100644 --- a/src/object-set.cpp +++ b/src/object-set.cpp @@ -9,6 +9,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include <sigc++/sigc++.h> #include "object-set.h" bool ObjectSet::add(SPObject* object) { @@ -27,24 +28,21 @@ bool ObjectSet::add(SPObject* object) { return true; } -void ObjectSet::remove(SPObject* object) { +bool ObjectSet::remove(SPObject* object) { // object is the top of subtree if (contains(object)) { _remove(object); - // TODO -// return true; + return true; } // any ancestor of object is in the set if (_anyAncestorIsInSet(object)) { _removeAncestorsFromSet(object); - // TODO -// return true; + return true; } // no object nor any parent in the set - // TODO -// return false; + return false; } bool ObjectSet::contains(SPObject* object) { @@ -92,7 +90,7 @@ void ObjectSet::_remove(SPObject *object) { } void ObjectSet::_add(SPObject *object) { - releaseConnections[object] = object->connectRelease(sigc::mem_fun(*this, &ObjectSet::remove)); + releaseConnections[object] = object->connectRelease(sigc::hide_return(sigc::mem_fun(*this, &ObjectSet::remove))); container.push_back(object); } diff --git a/src/object-set.h b/src/object-set.h index 2b9c5efe3..8160cd27b 100644 --- a/src/object-set.h +++ b/src/object-set.h @@ -37,7 +37,7 @@ public: ObjectSet() {}; ~ObjectSet(); bool add(SPObject* object); - void remove(SPObject* object); + bool remove(SPObject* object); bool contains(SPObject* object); void clear(); int size(); diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp index abac2c091..36fe26e76 100644 --- a/src/ui/tools/tool-base.cpp +++ b/src/ui/tools/tool-base.cpp @@ -683,6 +683,11 @@ bool ToolBase::root_handler(GdkEvent* event) { } break; + case GDK_KEY_Menu: + sp_event_root_menu_popup(desktop, NULL, event); + ret = TRUE; + break; + case GDK_KEY_F10: if (MOD__SHIFT_ONLY(event)) { sp_event_root_menu_popup(desktop, NULL, event); |
