summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-10-20 22:21:45 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-10-20 22:21:45 +0000
commitf1e0309a7ffe42441f86def97f54aa57d86f1624 (patch)
tree7226490a904223b0fd208c488ae157d9a92bc819 /src/ui
parentProgress Bar workinggit add .git add . (diff)
parentMerge branch 'smartpointer_refactor' of gitlab.com:jali/inkscape (diff)
downloadinkscape-f1e0309a7ffe42441f86def97f54aa57d86f1624.tar.gz
inkscape-f1e0309a7ffe42441f86def97f54aa57d86f1624.zip
Merge branch 'master' into SymbolsSearch
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/cache/makefile.in17
-rw-r--r--src/ui/control-manager.h4
-rw-r--r--src/ui/dialog/icon-preview.cpp1
-rw-r--r--src/ui/dialog/makefile.in17
-rw-r--r--src/ui/dialog/objects.cpp4
-rw-r--r--src/ui/dialog/objects.h3
-rw-r--r--src/ui/dialog/print.cpp3
-rw-r--r--src/ui/dialog/styledialog.cpp12
-rw-r--r--src/ui/dialog/tags.cpp4
-rw-r--r--src/ui/interface.cpp3
-rw-r--r--src/ui/makefile.in17
-rw-r--r--src/ui/tool/control-point-selection.h1
-rw-r--r--src/ui/tool/control-point.h12
-rw-r--r--src/ui/tool/manipulator.h7
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp5
-rw-r--r--src/ui/tool/multi-path-manipulator.h8
-rw-r--r--src/ui/tool/node.h8
-rw-r--r--src/ui/tool/path-manipulator.cpp2
-rw-r--r--src/ui/tool/path-manipulator.h4
-rw-r--r--src/ui/view/makefile.in17
-rw-r--r--src/ui/widget/makefile.in17
-rw-r--r--src/ui/widget/panel.cpp1
-rw-r--r--src/ui/widget/selected-style.cpp3
23 files changed, 28 insertions, 142 deletions
diff --git a/src/ui/cache/makefile.in b/src/ui/cache/makefile.in
deleted file mode 100644
index af45adb0f..000000000
--- a/src/ui/cache/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd ../.. && $(MAKE) ui/cache/all
-
-clean %.a %.$(OBJEXT):
- cd ../.. && $(MAKE) ui/cache/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)
diff --git a/src/ui/control-manager.h b/src/ui/control-manager.h
index 3f090d0bd..418591991 100644
--- a/src/ui/control-manager.h
+++ b/src/ui/control-manager.h
@@ -76,11 +76,7 @@ public:
private:
ControlManager();
-#if __cplusplus <= 199711L
- std::auto_ptr<ControlManagerImpl> _impl;
-#else
std::unique_ptr<ControlManagerImpl> _impl;
-#endif
friend class ControlManagerImpl;
};
diff --git a/src/ui/dialog/icon-preview.cpp b/src/ui/dialog/icon-preview.cpp
index 991139aa8..f9cd8929a 100644
--- a/src/ui/dialog/icon-preview.cpp
+++ b/src/ui/dialog/icon-preview.cpp
@@ -18,7 +18,6 @@
#endif
#include <gtkmm/buttonbox.h>
-#include <boost/scoped_ptr.hpp>
#include <glibmm/i18n.h>
#include <glibmm/timer.h>
diff --git a/src/ui/dialog/makefile.in b/src/ui/dialog/makefile.in
deleted file mode 100644
index 805c48aef..000000000
--- a/src/ui/dialog/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd ../.. && $(MAKE) ui/dialog/all
-
-clean %.a %.$(OBJEXT):
- cd ../.. && $(MAKE) ui/dialog/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 49ffa38f5..b50d68239 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -148,8 +148,8 @@ public:
_pnl->_objectsChanged( _obj );
}
}
- virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared<char> /*old_content*/, Util::ptr_shared<char> /*new_content*/ ) {}
- virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared<char> /*old_value*/, Util::ptr_shared<char> /*new_value*/ ) {
+ virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared /*old_content*/, Util::ptr_shared /*new_content*/ ) {}
+ virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared /*old_value*/, Util::ptr_shared /*new_value*/ ) {
if ( _pnl && _obj ) {
if ( name == _lockedAttr || name == _labelAttr || name == _highlightAttr || name == _groupAttr || name == _styleAttr || name == _clipAttr || name == _maskAttr ) {
_pnl->_updateObject(_obj, name == _highlightAttr);
diff --git a/src/ui/dialog/objects.h b/src/ui/dialog/objects.h
index b7fd1b4f8..8ad1b15ef 100644
--- a/src/ui/dialog/objects.h
+++ b/src/ui/dialog/objects.h
@@ -16,7 +16,6 @@
# include <config.h>
#endif
-#include <boost/scoped_ptr.hpp>
#include <gtkmm/box.h>
#include <gtkmm/treeview.h>
#include <gtkmm/treestore.h>
@@ -168,7 +167,7 @@ private:
Gtk::Box _blur_vbox;
Gtk::Dialog _colorSelectorDialog;
- boost::scoped_ptr<Inkscape::UI::SelectedColor> _selectedColor;
+ std::unique_ptr<Inkscape::UI::SelectedColor> _selectedColor;
//Methods:
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp
index 4d248fd09..532a8c364 100644
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
@@ -26,7 +26,6 @@
#include "util/units.h"
#include "helper/png-write.h"
#include "svg/svg-color.h"
-#include "io/sys.h"
#include <glibmm/i18n.h>
@@ -52,7 +51,7 @@ static void draw_page(GtkPrintOperation *,
std::string tmp_base = "inkscape-print-png-XXXXXX";
int tmp_fd;
- if ( (tmp_fd = Inkscape::IO::file_open_tmp (tmp_png, tmp_base)) >= 0) {
+ if ( (tmp_fd = Glib::file_open_tmp(tmp_png, tmp_base)) >= 0) {
close(tmp_fd);
guint32 bgcolor = 0x00000000;
diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp
index aa453e8e8..60138fa89 100644
--- a/src/ui/dialog/styledialog.cpp
+++ b/src/ui/dialog/styledialog.cpp
@@ -56,8 +56,8 @@ public:
};
virtual void notifyContentChanged(Inkscape::XML::Node &node,
- Inkscape::Util::ptr_shared<char> old_content,
- Inkscape::Util::ptr_shared<char> new_content);
+ Inkscape::Util::ptr_shared old_content,
+ Inkscape::Util::ptr_shared new_content);
StyleDialog * _styleDialog;
};
@@ -66,8 +66,8 @@ public:
void
StyleDialog::NodeObserver::notifyContentChanged(
Inkscape::XML::Node &/*node*/,
- Inkscape::Util::ptr_shared<char> /*old_content*/,
- Inkscape::Util::ptr_shared<char> /*new_content*/ ) {
+ Inkscape::Util::ptr_shared /*old_content*/,
+ Inkscape::Util::ptr_shared /*new_content*/ ) {
#ifdef DEBUG_STYLEDIALOG
std::cout << "StyleDialog::NodeObserver::notifyContentChanged" << std::endl;
@@ -111,8 +111,8 @@ public:
virtual void notifyAttributeChanged( Inkscape::XML::Node &node,
GQuark qname,
- Util::ptr_shared<char> /*old_value*/,
- Util::ptr_shared<char> /*new_value*/ ) {
+ Util::ptr_shared /*old_value*/,
+ Util::ptr_shared /*new_value*/ ) {
if ( _styleDialog && _repr ) {
// For the moment only care about attributes that are directly used in selectors.
diff --git a/src/ui/dialog/tags.cpp b/src/ui/dialog/tags.cpp
index d804e1f68..ae45654a7 100644
--- a/src/ui/dialog/tags.cpp
+++ b/src/ui/dialog/tags.cpp
@@ -106,8 +106,8 @@ public:
_pnl->_objectsChanged( _obj );
}
}
- virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared<char> /*old_content*/, Util::ptr_shared<char> /*new_content*/ ) {}
- virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared<char> /*old_value*/, Util::ptr_shared<char> /*new_value*/ ) {
+ virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared /*old_content*/, Util::ptr_shared /*new_content*/ ) {}
+ virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared /*old_value*/, Util::ptr_shared /*new_value*/ ) {
if ( _pnl && _obj ) {
if ( name == _labelAttr ) {
_pnl->_updateObject( _obj);
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index f6a353b33..4f1e5cd6f 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -110,8 +110,7 @@ static GtkTargetEntry *completeDropTargets = 0;
static int completeDropTargetsCount = 0;
static bool temporarily_block_actions = false;
-#define ENTRIES_SIZE(n) sizeof(n)/sizeof(n[0])
-static guint nui_drop_target_entries = ENTRIES_SIZE(ui_drop_target_entries);
+static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries);
static void sp_ui_import_files(gchar *buffer);
static void sp_ui_import_one_file(char const *filename);
static void sp_ui_import_one_file_with_check(gpointer filename, gpointer unused);
diff --git a/src/ui/makefile.in b/src/ui/makefile.in
deleted file mode 100644
index f8a407592..000000000
--- a/src/ui/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd .. && $(MAKE) ui/all
-
-clean %.a %.$(OBJEXT):
- cd .. && $(MAKE) ui/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)
diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h
index f122a468d..ec845b1b3 100644
--- a/src/ui/tool/control-point-selection.h
+++ b/src/ui/tool/control-point-selection.h
@@ -20,7 +20,6 @@
#include <2geom/forward.h>
#include <2geom/point.h>
#include <2geom/rect.h>
-#include "util/accumulators.h"
#include "util/unordered-containers.h"
#include "ui/tool/commit-events.h"
#include "ui/tool/manipulator.h"
diff --git a/src/ui/tool/control-point.h b/src/ui/tool/control-point.h
index 4a01b9f21..bc1f060cd 100644
--- a/src/ui/tool/control-point.h
+++ b/src/ui/tool/control-point.h
@@ -18,7 +18,6 @@
#include <2geom/point.h>
#include "ui/control-types.h"
-#include "util/accumulators.h"
#include "display/sodipodi-ctrl.h"
#include "enums.h"
@@ -76,8 +75,6 @@ namespace UI {
*/
class ControlPoint : boost::noncopyable, public sigc::trackable {
public:
- typedef Inkscape::Util::ReverseInterruptible RInt;
- typedef Inkscape::Util::Interruptible Int;
/**
* Enumeration representing the possible states of the control point, used to determine
@@ -162,15 +159,6 @@ public:
void transferGrab(ControlPoint *from, GdkEventMotion *event);
/// @}
- /// @name Receive notifications about control point events
- /// @{
- /*sigc::signal<void, Geom::Point const &, Geom::Point &, GdkEventMotion*> signal_dragged;
- sigc::signal<bool, GdkEventButton*>::accumulated<RInt> signal_clicked;
- sigc::signal<bool, GdkEventButton*>::accumulated<RInt> signal_doubleclicked;
- sigc::signal<bool, GdkEventMotion*>::accumulated<Int> signal_grabbed;
- sigc::signal<void, GdkEventButton*> signal_ungrabbed;*/
- /// @}
-
/// @name Inspect the state of the control point
/// @{
State state() const { return _state; }
diff --git a/src/ui/tool/manipulator.h b/src/ui/tool/manipulator.h
index 0f26c6de1..66b47ce98 100644
--- a/src/ui/tool/manipulator.h
+++ b/src/ui/tool/manipulator.h
@@ -17,7 +17,6 @@
#include <sigc++/sigc++.h>
#include <glib.h>
#include <gdk/gdk.h>
-#include <boost/shared_ptr.hpp>
#include "ui/tools/tool-base.h"
class SPDesktop;
@@ -76,14 +75,14 @@ template <typename T>
class MultiManipulator : public PointManipulator {
public:
//typedef typename T::ItemType ItemType;
- typedef typename std::pair<void*, boost::shared_ptr<T> > MapPair;
- typedef typename std::map<void*, boost::shared_ptr<T> > MapType;
+ typedef typename std::pair<void*, std::shared_ptr<T> > MapPair;
+ typedef typename std::map<void*, std::shared_ptr<T> > MapType;
MultiManipulator(SPDesktop *d, ControlPointSelection &sel)
: PointManipulator(d, sel)
{}
void addItem(void *item) {
- boost::shared_ptr<T> m(_createManipulator(item));
+ std::shared_ptr<T> m(_createManipulator(item));
_mmap.insert(MapPair(item, m));
}
void removeItem(void *item) {
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index f30c7e349..9cfa4ed31 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -10,7 +10,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <boost/shared_ptr.hpp>
#include "node.h"
#include <glibmm/i18n.h>
#include "desktop.h"
@@ -161,7 +160,7 @@ void MultiPathManipulator::setItems(std::set<ShapeRecord> const &s)
if (sr.edit_transform != sr_new.edit_transform ||
sr.role != sr_new.role)
{
- boost::shared_ptr<PathManipulator> hold(i->second);
+ std::shared_ptr<PathManipulator> hold(i->second);
if (sr.edit_transform != sr_new.edit_transform)
hold->setControlsTransform(sr_new.edit_transform);
if (sr.role != sr_new.role) {
@@ -179,7 +178,7 @@ void MultiPathManipulator::setItems(std::set<ShapeRecord> const &s)
for (std::set<ShapeRecord>::iterator i = shapes.begin(); i != shapes.end(); ++i) {
ShapeRecord const &r = *i;
if (!SP_IS_PATH(r.item) && !IS_LIVEPATHEFFECT(r.item)) continue;
- boost::shared_ptr<PathManipulator> newpm(new PathManipulator(*this, (SPPath*) r.item,
+ std::shared_ptr<PathManipulator> newpm(new PathManipulator(*this, (SPPath*) r.item,
r.edit_transform, _getOutlineColor(r.role, r.item), r.lpe_key));
newpm->showHandles(_show_handles);
// always show outlines for clips and masks
diff --git a/src/ui/tool/multi-path-manipulator.h b/src/ui/tool/multi-path-manipulator.h
index 4f152e0a2..742c6d421 100644
--- a/src/ui/tool/multi-path-manipulator.h
+++ b/src/ui/tool/multi-path-manipulator.h
@@ -77,8 +77,8 @@ public:
sigc::signal<void> signal_coords_changed; /// Emitted whenever the coordinates
/// shown in the status bar need updating
private:
- typedef std::pair<ShapeRecord, boost::shared_ptr<PathManipulator> > MapPair;
- typedef std::map<ShapeRecord, boost::shared_ptr<PathManipulator> > MapType;
+ typedef std::pair<ShapeRecord, std::shared_ptr<PathManipulator> > MapPair;
+ typedef std::map<ShapeRecord, std::shared_ptr<PathManipulator> > MapType;
template <typename R>
void invokeForAll(R (PathManipulator::*method)()) {
@@ -88,11 +88,11 @@ private:
// be a valid iterator and then assign i to it.
MapType::iterator next_i = i;
++next_i;
- // i->second is a boost::shared_ptr so try to hold on to it so
+ // i->second is a std::shared_ptr so try to hold on to it so
// it won't get freed prematurely by the WriteXML() method or
// whatever. See https://bugs.launchpad.net/inkscape/+bug/1617615
// Applicable to empty paths.
- boost::shared_ptr<PathManipulator> hold(i->second);
+ std::shared_ptr<PathManipulator> hold(i->second);
((hold.get())->*method)();
i = next_i;
}
diff --git a/src/ui/tool/node.h b/src/ui/tool/node.h
index a05f0e3b9..2964b66ca 100644
--- a/src/ui/tool/node.h
+++ b/src/ui/tool/node.h
@@ -22,8 +22,6 @@
#include <cstddef>
#include <functional>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/shared_ptr.hpp>
#include "ui/tool/selectable-control-point.h"
#include "snapped-point.h"
#include "ui/tool/node-types.h"
@@ -357,7 +355,7 @@ private:
friend class NodeList;
};
-class NodeList : ListNode, boost::noncopyable, public boost::enable_shared_from_this<NodeList> {
+class NodeList : ListNode, boost::noncopyable {
public:
typedef std::size_t size_type;
typedef Node &reference;
@@ -465,9 +463,9 @@ private:
* List of node lists. Represents an editable path.
* Editable path composed of one or more subpaths.
*/
-class SubpathList : public std::list< boost::shared_ptr<NodeList> > {
+class SubpathList : public std::list< std::shared_ptr<NodeList> > {
public:
- typedef std::list< boost::shared_ptr<NodeList> > list_type;
+ typedef std::list< std::shared_ptr<NodeList> > list_type;
SubpathList(PathManipulator &pm) : _path_manipulator(pm) {}
PathManipulator &pm() { return _path_manipulator; }
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index f2899dd01..2c99e7fc8 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -68,7 +68,7 @@ public:
}
virtual void notifyAttributeChanged(Inkscape::XML::Node &/*node*/, GQuark attr,
- Util::ptr_shared<char>, Util::ptr_shared<char>)
+ Util::ptr_shared, Util::ptr_shared)
{
// do nothing if blocked
if (_blocked) return;
diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h
index 283cb610a..5fa24c23b 100644
--- a/src/ui/tool/path-manipulator.h
+++ b/src/ui/tool/path-manipulator.h
@@ -15,8 +15,6 @@
#include <memory>
#include <2geom/pathvector.h>
#include <2geom/affine.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
#include "ui/tool/node.h"
#include "ui/tool/manipulator.h"
#include "live_effects/lpe-bspline.h"
@@ -105,7 +103,7 @@ public:
static bool is_item_type(void *item);
private:
typedef NodeList Subpath;
- typedef boost::shared_ptr<NodeList> SubpathPtr;
+ typedef std::shared_ptr<NodeList> SubpathPtr;
void _createControlPointsFromGeometry();
diff --git a/src/ui/view/makefile.in b/src/ui/view/makefile.in
deleted file mode 100644
index 0fe15637a..000000000
--- a/src/ui/view/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd ../.. && $(MAKE) ui/view/all
-
-clean %.a %.$(OBJEXT):
- cd ../.. && $(MAKE) ui/view/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)
diff --git a/src/ui/widget/makefile.in b/src/ui/widget/makefile.in
deleted file mode 100644
index e479d7031..000000000
--- a/src/ui/widget/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd ../.. && $(MAKE) ui/widget/all
-
-clean %.a %.$(OBJEXT):
- cd ../.. && $(MAKE) ui/widget/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 9332fe0f9..aea9b7e8e 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -24,7 +24,6 @@
#include <glibmm/i18n.h>
#include "panel.h"
-#include "icon-size.h"
#include "preferences.h"
#include "desktop.h"
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 5d911e9d2..d9b93f6db 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -107,8 +107,7 @@ static const GtkTargetEntry ui_drop_target_entries [] = {
{"application/x-color", 0, APP_X_COLOR}
};
-#define ENTRIES_SIZE(n) sizeof(n)/sizeof(n[0])
-static guint nui_drop_target_entries = ENTRIES_SIZE(ui_drop_target_entries);
+static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries);
/* convenience function */
static Dialog::FillAndStroke *get_fill_and_stroke_panel(SPDesktop *desktop);