summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: adf41d8)
raw | patch | inline | side by side (parent: adf41d8)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 25 Oct 2009 02:48:06 +0000 (02:48 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 25 Oct 2009 02:48:06 +0000 (02:48 +0000) |
src/desktop.cpp | patch | blob | history | |
src/desktop.h | patch | blob | history | |
src/ui/view/edit-widget.cpp | patch | blob | history | |
src/widgets/desktop-widget.cpp | patch | blob | history |
diff --git a/src/desktop.cpp b/src/desktop.cpp
index f7ef1a8cdb79c6d9a02d6a6aef7be6aaf58c5906..319a0d407e35d252e31d96fc97f3c05e8f45ac62 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
}
void
-SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas)
+SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas, Inkscape::UI::View::EditWidgetInterface *widget)
{
+ _widget = widget;
+
// Temporary workaround for link order issues:
Inkscape::DeviceManager::getManager().getDevices();
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/desktop.h b/src/desktop.h
index 4438c90e56afc830fc600aca1cfbec2a9b173baf..cfb977425318cdb4ccb371a265dd09055572eae6 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
#endif
SPDesktop();
- void init (SPNamedView* nv, SPCanvas* canvas);
+ void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget);
virtual ~SPDesktop();
void destroy();
void fullscreen();
void focusMode(bool mode = true);
- void registerEditWidget (Inkscape::UI::View::EditWidgetInterface *widget)
- { _widget = widget; }
-
Geom::Matrix w2d() const; //transformation from window to desktop coordinates (used for zooming)
Geom::Point w2d(Geom::Point const &p) const;
Geom::Point d2w(Geom::Point const &p) const;
index 1d319f97ff7e64c60971c875cf770ca287ffea42..770a9bf87c076472040c5f5c39a0400e106d4f12 100644 (file)
EditWidget::initEdit (SPDocument *doc)
{
_desktop = new SPDesktop();
- _desktop->registerEditWidget (this);
_namedview = sp_document_namedview (doc, 0);
_svg_canvas.init (_desktop);
- _desktop->init (_namedview, _svg_canvas.spobj());
+ _desktop->init (_namedview, _svg_canvas.spobj(), this);
sp_namedview_window_from_document (_desktop);
sp_namedview_update_layers_from_document (_desktop);
_dt2r = 1.0 / _namedview->doc_units->unittobase;
index 5fd32487f2e375091aa2f85e203eb1e3ca65bc46..e3bf1ae9c5efecb60323a6052b7f4e1f4760d246 100644 (file)
dtw->desktop = new SPDesktop();
dtw->stub = new SPDesktopWidget::WidgetStub (dtw);
- dtw->desktop->registerEditWidget (dtw->stub);
- dtw->desktop->init (namedview, dtw->canvas);
+ dtw->desktop->init (namedview, dtw->canvas, dtw->stub);
inkscape_add_desktop (dtw->desktop);
// Add the shape geometry to libavoid for autorouting connectors.