From 193b25a53c51a36fe9538e03203b0054c8cfc355 Mon Sep 17 00:00:00 2001 From: mc <> Date: Wed, 18 Feb 2015 02:02:37 +0100 Subject: Just... some... more... lines... (bzr r13922.1.2) --- src/ui/widget/object-composite-settings.cpp | 3 ++- src/ui/widget/style-subject.cpp | 34 ++++++++++++++--------------- src/ui/widget/style-subject.h | 15 +++++++------ 3 files changed, 26 insertions(+), 26 deletions(-) (limited to 'src/ui/widget') diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index 00a74c4fe..ddf67fb5b 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -125,7 +125,8 @@ ObjectCompositeSettings::_blendBlurValueChanged() const Glib::ustring blendmode = _fe_cb.get_blend_mode(); //apply created filter to every selected item - for (StyleSubject::iterator i = _subject->begin() ; i != _subject->end() ; ++i ) { + SelContainer sel=_subject->getDesktop()->getSelection()->itemList(); + for (SelContainer::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) { if (!SP_IS_ITEM(*i)) { continue; } diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp index a48370d9b..9d09e67d3 100644 --- a/src/ui/widget/style-subject.cpp +++ b/src/ui/widget/style-subject.cpp @@ -54,7 +54,7 @@ Inkscape::Selection *StyleSubject::Selection::_getSelection() const { return NULL; } } - +/* StyleSubject::iterator StyleSubject::Selection::begin() { Inkscape::Selection *selection = _getSelection(); if (selection) { @@ -62,7 +62,7 @@ StyleSubject::iterator StyleSubject::Selection::begin() { } else { return iterator(NULL); } -} +}*/ Geom::OptRect StyleSubject::Selection::getBounds(SPItem::BBoxType type) { Inkscape::Selection *selection = _getSelection(); @@ -104,8 +104,7 @@ void StyleSubject::Selection::setCSS(SPCSSAttr *css) { } StyleSubject::CurrentLayer::CurrentLayer() { - _element.data = NULL; - _element.next = NULL; + _element = NULL; } StyleSubject::CurrentLayer::~CurrentLayer() { @@ -114,10 +113,10 @@ StyleSubject::CurrentLayer::~CurrentLayer() { void StyleSubject::CurrentLayer::_setLayer(SPObject *layer) { _layer_release.disconnect(); _layer_modified.disconnect(); - if (_element.data) { - sp_object_unref(static_cast(_element.data), NULL); + if (_element) { + sp_object_unref(static_cast(_element), NULL); } - _element.data = layer; + _element = layer; if (layer) { sp_object_ref(layer, NULL); _layer_release = layer->connectRelease(sigc::hide(sigc::bind(sigc::mem_fun(*this, &CurrentLayer::_setLayer), (SPObject *)NULL))); @@ -127,20 +126,17 @@ void StyleSubject::CurrentLayer::_setLayer(SPObject *layer) { } SPObject *StyleSubject::CurrentLayer::_getLayer() const { - return static_cast(_element.data); + return static_cast(_element); } -GSList *StyleSubject::CurrentLayer::_getLayerSList() const { - if (_element.data) { - return &_element; - } else { - return NULL; - } -} +SPObject *StyleSubject::CurrentLayer::_getLayerSList() const { + return _element; +} +/* StyleSubject::iterator StyleSubject::CurrentLayer::begin() { return iterator(_getLayerSList()); -} +}*/ Geom::OptRect StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) { SPObject *layer = _getLayer(); @@ -152,8 +148,10 @@ Geom::OptRect StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) { } int StyleSubject::CurrentLayer::queryStyle(SPStyle *query, int property) { - GSList *list = _getLayerSList(); - if (list) { + SelContainer list; + SPObject* i=_getLayerSList(); + if (i) { + list.push_back(i); return sp_desktop_query_style_from_list(list, query, property); } else { return QUERY_STYLE_NOTHING; diff --git a/src/ui/widget/style-subject.h b/src/ui/widget/style-subject.h index 47da91732..60f979eb0 100644 --- a/src/ui/widget/style-subject.h +++ b/src/ui/widget/style-subject.h @@ -35,7 +35,8 @@ public: class Selection; class CurrentLayer; - typedef Util::GSListConstIterator iterator; + //typedef Util::GSListConstIterator iterator; + typedef std::list::iterator iterator; StyleSubject(); virtual ~StyleSubject(); @@ -43,8 +44,8 @@ public: void setDesktop(SPDesktop *desktop); SPDesktop *getDesktop() const { return _desktop; } - virtual iterator begin() = 0; - virtual iterator end() { return iterator(NULL); } +// virtual iterator begin() = 0; +// virtual iterator end() { return iterator(NULL); } virtual Geom::OptRect getBounds(SPItem::BBoxType type) = 0; virtual int queryStyle(SPStyle *query, int property) = 0; virtual void setCSS(SPCSSAttr *css) = 0; @@ -67,7 +68,7 @@ public: Selection(); ~Selection(); - virtual iterator begin(); +// virtual iterator begin(); virtual Geom::OptRect getBounds(SPItem::BBoxType type); virtual int queryStyle(SPStyle *query, int property); virtual void setCSS(SPCSSAttr *css); @@ -88,7 +89,7 @@ public: CurrentLayer(); ~CurrentLayer(); - virtual iterator begin(); +// virtual iterator begin(); virtual Geom::OptRect getBounds(SPItem::BBoxType type); virtual int queryStyle(SPStyle *query, int property); virtual void setCSS(SPCSSAttr *css); @@ -99,12 +100,12 @@ protected: private: SPObject *_getLayer() const; void _setLayer(SPObject *layer); - GSList *_getLayerSList() const; + SPObject *_getLayerSList() const; sigc::connection _layer_switched; sigc::connection _layer_release; sigc::connection _layer_modified; - mutable GSList _element; + mutable SPObject* _element; }; } -- cgit v1.2.3 From 5fd00cab14d48beaf2279a2b8f3ad5b02b76c87b Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 19 Feb 2015 04:25:21 +0100 Subject: Put a few std::vector (bzr r13922.1.5) --- src/ui/widget/object-composite-settings.cpp | 4 ++-- src/ui/widget/style-subject.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/widget') diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index ddf67fb5b..598a90e95 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -125,8 +125,8 @@ ObjectCompositeSettings::_blendBlurValueChanged() const Glib::ustring blendmode = _fe_cb.get_blend_mode(); //apply created filter to every selected item - SelContainer sel=_subject->getDesktop()->getSelection()->itemList(); - for (SelContainer::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) { + std::vector sel=_subject->getDesktop()->getSelection()->itemList(); + for (std::vector::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) { if (!SP_IS_ITEM(*i)) { continue; } diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp index 9d09e67d3..1ded546dd 100644 --- a/src/ui/widget/style-subject.cpp +++ b/src/ui/widget/style-subject.cpp @@ -148,10 +148,10 @@ Geom::OptRect StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) { } int StyleSubject::CurrentLayer::queryStyle(SPStyle *query, int property) { - SelContainer list; + std::vector list; SPObject* i=_getLayerSList(); if (i) { - list.push_back(i); + list.push_back((SPItem*)i); return sp_desktop_query_style_from_list(list, query, property); } else { return QUERY_STYLE_NOTHING; -- cgit v1.2.3 From 9bdc157f705ca61516e599cb416580283d21ec35 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 04:21:48 +0100 Subject: more cast cleanup (bzr r13922.1.11) --- src/ui/widget/style-subject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/widget') diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp index 1ded546dd..95b89bf5f 100644 --- a/src/ui/widget/style-subject.cpp +++ b/src/ui/widget/style-subject.cpp @@ -114,7 +114,7 @@ void StyleSubject::CurrentLayer::_setLayer(SPObject *layer) { _layer_release.disconnect(); _layer_modified.disconnect(); if (_element) { - sp_object_unref(static_cast(_element), NULL); + sp_object_unref(_element, NULL); } _element = layer; if (layer) { @@ -126,7 +126,7 @@ void StyleSubject::CurrentLayer::_setLayer(SPObject *layer) { } SPObject *StyleSubject::CurrentLayer::_getLayer() const { - return static_cast(_element); + return _element; } SPObject *StyleSubject::CurrentLayer::_getLayerSList() const { -- cgit v1.2.3 From ba4dbfb351180e0fc4ad57be6e3534fa2ab5cf8c Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Tue, 28 Apr 2015 00:38:31 +0100 Subject: Fix unnecessary inclusion of glibmm/threads.h. This can be resolved by ensuring that glibmm headers always preceed glib.h headers. Same applies with gtkmm/gtk+ etc (bzr r14064) --- src/ui/widget/addtoicon.cpp | 4 ---- src/ui/widget/button.h | 8 -------- src/ui/widget/clipmaskicon.cpp | 4 ---- src/ui/widget/color-picker.h | 8 -------- src/ui/widget/color-preview.h | 4 ---- src/ui/widget/dock-item.h | 4 ---- src/ui/widget/dock.h | 8 -------- src/ui/widget/entity-entry.cpp | 4 ---- src/ui/widget/filter-effect-chooser.h | 8 -------- src/ui/widget/frame.h | 8 -------- src/ui/widget/imageicon.h | 8 -------- src/ui/widget/imagetoggler.h | 4 ---- src/ui/widget/insertordericon.h | 3 ++- src/ui/widget/labelled.h | 8 -------- src/ui/widget/layertypeicon.cpp | 4 ---- src/ui/widget/licensor.h | 8 -------- src/ui/widget/notebook-page.h | 4 ---- src/ui/widget/object-composite-settings.h | 8 -------- src/ui/widget/panel.cpp | 4 ---- src/ui/widget/panel.h | 4 ---- src/ui/widget/preferences-widget.cpp | 4 ---- src/ui/widget/preferences-widget.h | 4 ---- src/ui/widget/rotateable.cpp | 4 ---- src/ui/widget/selected-style.h | 4 ---- src/ui/widget/spin-scale.h | 4 ---- src/ui/widget/spin-slider.h | 4 ---- src/ui/widget/spinbutton.h | 8 -------- src/ui/widget/style-swatch.h | 4 ---- src/ui/widget/tolerance-slider.cpp | 4 ---- src/ui/widget/unit-menu.h | 8 -------- 30 files changed, 2 insertions(+), 161 deletions(-) (limited to 'src/ui/widget') diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp index f15d7abf7..823e24a00 100644 --- a/src/ui/widget/addtoicon.cpp +++ b/src/ui/widget/addtoicon.cpp @@ -12,10 +12,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -# include -#endif - #include "ui/widget/addtoicon.h" #include diff --git a/src/ui/widget/button.h b/src/ui/widget/button.h index 471b7d8a2..d3c9afa02 100644 --- a/src/ui/widget/button.h +++ b/src/ui/widget/button.h @@ -10,14 +10,6 @@ #ifndef INKSCAPE_UI_WIDGET_BUTTON_H #define INKSCAPE_UI_WIDGET_BUTTON_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include diff --git a/src/ui/widget/clipmaskicon.cpp b/src/ui/widget/clipmaskicon.cpp index 943b1bebc..421f1df1e 100644 --- a/src/ui/widget/clipmaskicon.cpp +++ b/src/ui/widget/clipmaskicon.cpp @@ -11,10 +11,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -# include -#endif - #include "ui/widget/clipmaskicon.h" #include diff --git a/src/ui/widget/color-picker.h b/src/ui/widget/color-picker.h index b4da5dbf2..99904b081 100644 --- a/src/ui/widget/color-picker.h +++ b/src/ui/widget/color-picker.h @@ -13,16 +13,8 @@ #ifndef __COLOR_PICKER_H__ #define __COLOR_PICKER_H__ -#ifdef HAVE_CONFIG_H -# include -#endif - #include -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/color-preview.h b/src/ui/widget/color-preview.h index 959b5e09b..caddfb9a2 100644 --- a/src/ui/widget/color-preview.h +++ b/src/ui/widget/color-preview.h @@ -15,10 +15,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include namespace Inkscape { diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h index cc0c13eea..25a69d94c 100644 --- a/src/ui/widget/dock-item.h +++ b/src/ui/widget/dock-item.h @@ -15,10 +15,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/dock.h b/src/ui/widget/dock.h index 33e60b836..74b072d22 100644 --- a/src/ui/widget/dock.h +++ b/src/ui/widget/dock.h @@ -12,14 +12,6 @@ #ifndef INKSCAPE_UI_WIDGET_DOCK_H #define INKSCAPE_UI_WIDGET_DOCK_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include "ui/widget/dock-item.h" diff --git a/src/ui/widget/entity-entry.cpp b/src/ui/widget/entity-entry.cpp index c7d5efe29..69173fa25 100644 --- a/src/ui/widget/entity-entry.cpp +++ b/src/ui/widget/entity-entry.cpp @@ -17,10 +17,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include diff --git a/src/ui/widget/filter-effect-chooser.h b/src/ui/widget/filter-effect-chooser.h index 6092c61a5..0bcf97433 100644 --- a/src/ui/widget/filter-effect-chooser.h +++ b/src/ui/widget/filter-effect-chooser.h @@ -12,14 +12,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include diff --git a/src/ui/widget/frame.h b/src/ui/widget/frame.h index 55638ad40..a04666651 100644 --- a/src/ui/widget/frame.h +++ b/src/ui/widget/frame.h @@ -10,14 +10,6 @@ #ifndef INKSCAPE_UI_WIDGET_FRAME_H #define INKSCAPE_UI_WIDGET_FRAME_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/imageicon.h b/src/ui/widget/imageicon.h index 8faf13cb1..2ea8b8533 100644 --- a/src/ui/widget/imageicon.h +++ b/src/ui/widget/imageicon.h @@ -12,14 +12,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include diff --git a/src/ui/widget/imagetoggler.h b/src/ui/widget/imagetoggler.h index df6eb7ded..7b02fa4dc 100644 --- a/src/ui/widget/imagetoggler.h +++ b/src/ui/widget/imagetoggler.h @@ -14,10 +14,6 @@ #include "config.h" #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/insertordericon.h b/src/ui/widget/insertordericon.h index fb3412d3f..bf8ac4fa7 100644 --- a/src/ui/widget/insertordericon.h +++ b/src/ui/widget/insertordericon.h @@ -13,10 +13,11 @@ # include "config.h" #endif -#include #include #include +#include + namespace Inkscape { namespace UI { namespace Widget { diff --git a/src/ui/widget/labelled.h b/src/ui/widget/labelled.h index 5334454bc..88eb3ce19 100644 --- a/src/ui/widget/labelled.h +++ b/src/ui/widget/labelled.h @@ -11,14 +11,6 @@ #ifndef INKSCAPE_UI_WIDGET_LABELLED_H #define INKSCAPE_UI_WIDGET_LABELLED_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include namespace Gtk { diff --git a/src/ui/widget/layertypeicon.cpp b/src/ui/widget/layertypeicon.cpp index 3d6182bf8..672c607e5 100644 --- a/src/ui/widget/layertypeicon.cpp +++ b/src/ui/widget/layertypeicon.cpp @@ -11,10 +11,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -# include -#endif - #include "ui/widget/layertypeicon.h" #include diff --git a/src/ui/widget/licensor.h b/src/ui/widget/licensor.h index c75c5fe9e..b96162589 100644 --- a/src/ui/widget/licensor.h +++ b/src/ui/widget/licensor.h @@ -10,14 +10,6 @@ #ifndef INKSCAPE_UI_WIDGET_LICENSOR_H #define INKSCAPE_UI_WIDGET_LICENSOR_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include class SPDocument; diff --git a/src/ui/widget/notebook-page.h b/src/ui/widget/notebook-page.h index 4f7915423..c11de1b5b 100644 --- a/src/ui/widget/notebook-page.h +++ b/src/ui/widget/notebook-page.h @@ -14,10 +14,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include namespace Gtk { diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h index 5a723a2fd..ae16564e1 100644 --- a/src/ui/widget/object-composite-settings.h +++ b/src/ui/widget/object-composite-settings.h @@ -11,14 +11,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 0cff25d88..8a1e98a63 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -15,10 +15,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include // for Gtk::RESPONSE_* #include #include diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h index 5680cac30..a90060e17 100644 --- a/src/ui/widget/panel.h +++ b/src/ui/widget/panel.h @@ -17,10 +17,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index 98028ed78..72597e4d9 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -14,10 +14,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h index 5d9816e74..8b75b8368 100644 --- a/src/ui/widget/preferences-widget.h +++ b/src/ui/widget/preferences-widget.h @@ -22,10 +22,6 @@ #include #include -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include "ui/widget/spinbutton.h" #include diff --git a/src/ui/widget/rotateable.cpp b/src/ui/widget/rotateable.cpp index 2d7597d7c..5e938dee6 100644 --- a/src/ui/widget/rotateable.cpp +++ b/src/ui/widget/rotateable.cpp @@ -11,10 +11,6 @@ # include "config.h" #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h index 0b6a14762..804a6fef6 100644 --- a/src/ui/widget/selected-style.h +++ b/src/ui/widget/selected-style.h @@ -15,10 +15,6 @@ # include "config.h" #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #if WITH_GTKMM_3_0 diff --git a/src/ui/widget/spin-scale.h b/src/ui/widget/spin-scale.h index d0447e4a6..50e4fc953 100644 --- a/src/ui/widget/spin-scale.h +++ b/src/ui/widget/spin-scale.h @@ -13,10 +13,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/spin-slider.h b/src/ui/widget/spin-slider.h index 74982ea58..a5999f14f 100644 --- a/src/ui/widget/spin-slider.h +++ b/src/ui/widget/spin-slider.h @@ -14,10 +14,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/spinbutton.h b/src/ui/widget/spinbutton.h index cbe33e8ea..30ffc7d77 100644 --- a/src/ui/widget/spinbutton.h +++ b/src/ui/widget/spinbutton.h @@ -10,14 +10,6 @@ #ifndef INKSCAPE_UI_WIDGET_SPINBUTTON_H #define INKSCAPE_UI_WIDGET_SPINBUTTON_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include namespace Inkscape { diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h index 582d2ebb3..0016e0256 100644 --- a/src/ui/widget/style-swatch.h +++ b/src/ui/widget/style-swatch.h @@ -17,10 +17,6 @@ # include "config.h" #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/tolerance-slider.cpp b/src/ui/widget/tolerance-slider.cpp index ff525c679..ced811c57 100644 --- a/src/ui/widget/tolerance-slider.cpp +++ b/src/ui/widget/tolerance-slider.cpp @@ -12,10 +12,6 @@ # include #endif -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include #include diff --git a/src/ui/widget/unit-menu.h b/src/ui/widget/unit-menu.h index 2fd25a6a9..f414660f7 100644 --- a/src/ui/widget/unit-menu.h +++ b/src/ui/widget/unit-menu.h @@ -10,14 +10,6 @@ #ifndef INKSCAPE_UI_WIDGET_UNIT_H #define INKSCAPE_UI_WIDGET_UNIT_H -#ifdef HAVE_CONFIG_H -# include -#endif - -#if GLIBMM_DISABLE_DEPRECATED && HAVE_GLIBMM_THREADS_H -#include -#endif - #include #include "util/units.h" -- cgit v1.2.3 From 0f23d91bdb4d8fca7be0c695e65a10b205fee1fc Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 8 May 2015 02:49:43 +0200 Subject: Fixed the layer blends (bzr r14124) --- src/ui/widget/object-composite-settings.cpp | 4 ++-- src/ui/widget/style-subject.cpp | 24 ++++++++++++------------ src/ui/widget/style-subject.h | 10 +++------- 3 files changed, 17 insertions(+), 21 deletions(-) (limited to 'src/ui/widget') diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index 598a90e95..8acf083d0 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -125,8 +125,8 @@ ObjectCompositeSettings::_blendBlurValueChanged() const Glib::ustring blendmode = _fe_cb.get_blend_mode(); //apply created filter to every selected item - std::vector sel=_subject->getDesktop()->getSelection()->itemList(); - for (std::vector::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) { + std::vector sel=_subject->list(); + for (std::vector::const_iterator i = sel.begin() ; i != sel.end() ; ++i ) { if (!SP_IS_ITEM(*i)) { continue; } diff --git a/src/ui/widget/style-subject.cpp b/src/ui/widget/style-subject.cpp index 95b89bf5f..da3bbcd20 100644 --- a/src/ui/widget/style-subject.cpp +++ b/src/ui/widget/style-subject.cpp @@ -54,15 +54,13 @@ Inkscape::Selection *StyleSubject::Selection::_getSelection() const { return NULL; } } -/* -StyleSubject::iterator StyleSubject::Selection::begin() { + +std::vector StyleSubject::Selection::list(){ Inkscape::Selection *selection = _getSelection(); - if (selection) { - return iterator(selection->list()); - } else { - return iterator(NULL); - } -}*/ + if(selection) + return selection->list(); + else return std::vector(); +} Geom::OptRect StyleSubject::Selection::getBounds(SPItem::BBoxType type) { Inkscape::Selection *selection = _getSelection(); @@ -133,10 +131,12 @@ SPObject *StyleSubject::CurrentLayer::_getLayerSList() const { return _element; } -/* -StyleSubject::iterator StyleSubject::CurrentLayer::begin() { - return iterator(_getLayerSList()); -}*/ + +std::vector StyleSubject::CurrentLayer::list(){ + std::vector list; + list.push_back(_element); + return list; +} Geom::OptRect StyleSubject::CurrentLayer::getBounds(SPItem::BBoxType type) { SPObject *layer = _getLayer(); diff --git a/src/ui/widget/style-subject.h b/src/ui/widget/style-subject.h index 60f979eb0..15a072f44 100644 --- a/src/ui/widget/style-subject.h +++ b/src/ui/widget/style-subject.h @@ -10,7 +10,6 @@ #ifndef SEEN_INKSCAPE_UI_WIDGET_STYLE_SUBJECT_H #define SEEN_INKSCAPE_UI_WIDGET_STYLE_SUBJECT_H -#include "util/glib-list-iterators.h" #include #include <2geom/rect.h> #include "sp-item.h" @@ -35,8 +34,6 @@ public: class Selection; class CurrentLayer; - //typedef Util::GSListConstIterator iterator; - typedef std::list::iterator iterator; StyleSubject(); virtual ~StyleSubject(); @@ -44,11 +41,10 @@ public: void setDesktop(SPDesktop *desktop); SPDesktop *getDesktop() const { return _desktop; } -// virtual iterator begin() = 0; -// virtual iterator end() { return iterator(NULL); } virtual Geom::OptRect getBounds(SPItem::BBoxType type) = 0; virtual int queryStyle(SPStyle *query, int property) = 0; virtual void setCSS(SPCSSAttr *css) = 0; + virtual std::vector list(){return std::vector();}; sigc::connection connectChanged(sigc::signal::slot_type slot) { return _changed_signal.connect(slot); @@ -68,10 +64,10 @@ public: Selection(); ~Selection(); -// virtual iterator begin(); virtual Geom::OptRect getBounds(SPItem::BBoxType type); virtual int queryStyle(SPStyle *query, int property); virtual void setCSS(SPCSSAttr *css); + virtual std::vector list(); protected: virtual void _afterDesktopSwitch(SPDesktop *desktop); @@ -89,10 +85,10 @@ public: CurrentLayer(); ~CurrentLayer(); -// virtual iterator begin(); virtual Geom::OptRect getBounds(SPItem::BBoxType type); virtual int queryStyle(SPStyle *query, int property); virtual void setCSS(SPCSSAttr *css); + virtual std::vector list(); protected: virtual void _afterDesktopSwitch(SPDesktop *desktop); -- cgit v1.2.3