summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-08-28 02:21:31 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-08-28 02:21:31 +0000
commitd145ff7b7b11d8240d1c24b4de5ce3b4beae5aec (patch)
treef42ad9a20649cfea134e1c271e4ffe1bc0baba61 /src
parentFix for 165865 : markers must take object's stroke color - fix for floating w... (diff)
downloadinkscape-d145ff7b7b11d8240d1c24b4de5ce3b4beae5aec.tar.gz
inkscape-d145ff7b7b11d8240d1c24b4de5ce3b4beae5aec.zip
Fix for 1042508 : Transform dialog when floating doesnt work on active doc
(bzr r11627)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/transformation.cpp11
-rw-r--r--src/ui/dialog/transformation.h14
2 files changed, 18 insertions, 7 deletions
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 15ad41d02..1c9d6689b 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -157,14 +157,25 @@ Transformation::Transformation()
g_signal_connect (G_OBJECT (INKSCAPE), "change_selection", G_CALLBACK (on_selection_changed), this);
g_signal_connect (G_OBJECT (INKSCAPE), "modify_selection", G_CALLBACK (on_selection_modified), this);
+ _desktopChangeConn = _deskTrack.connectDesktopChanged( sigc::mem_fun(*this, &Transformation::setDesktop) );
+ _deskTrack.connect(GTK_WIDGET(gobj()));
+
show_all_children();
}
Transformation::~Transformation()
{
sp_signal_disconnect_by_data (G_OBJECT (INKSCAPE), this);
+ _desktopChangeConn.disconnect();
+ _deskTrack.disconnect();
}
+void Transformation::setTargetDesktop(SPDesktop *desktop)
+{
+ if (_desktop != desktop) {
+ _desktop = desktop;
+ }
+}
/*########################################################################
# U T I L I T Y
diff --git a/src/ui/dialog/transformation.h b/src/ui/dialog/transformation.h
index 68c6a1e8e..1d24a0c94 100644
--- a/src/ui/dialog/transformation.h
+++ b/src/ui/dialog/transformation.h
@@ -12,19 +12,15 @@
#define INKSCAPE_UI_DIALOG_TRANSFORMATION_H
-
#include <gtkmm/notebook.h>
#include <glibmm/i18n.h>
-
-
#include "ui/widget/panel.h"
#include "ui/widget/notebook-page.h"
#include "ui/widget/scalar-unit.h"
#include "ui/widget/imageicon.h"
#include "ui/widget/button.h"
-
-
+#include "ui/dialog/desktop-tracker.h"
namespace Inkscape {
@@ -32,8 +28,6 @@ namespace UI {
namespace Dialog {
-
-
/**
* Transformation dialog.
*
@@ -159,6 +153,10 @@ protected:
UI::Widget::CheckButton _check_apply_separately;
UI::Widget::CheckButton _check_replace_matrix;
+ SPDesktop *_desktop;
+ DesktopTracker _deskTrack;
+ sigc::connection _desktopChangeConn;
+
/**
* Layout the GUI components, and prepare for use
*/
@@ -217,6 +215,8 @@ protected:
void applyPageSkew(Inkscape::Selection *);
void applyPageTransform(Inkscape::Selection *);
+ void setTargetDesktop(SPDesktop* desktop);
+
private:
/**