diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-04-03 06:08:32 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-04-03 06:08:32 +0000 |
| commit | 3711eca2865718dca833c2d1ed84c44c513dcd28 (patch) | |
| tree | 3cfc3d98b690d9018b06f9e786fa757fd18dad85 /src/ui/dialog/glyphs.cpp | |
| parent | Fix command line invocation on Windows (LP #167455). (diff) | |
| download | inkscape-3711eca2865718dca833c2d1ed84c44c513dcd28.tar.gz inkscape-3711eca2865718dca833c2d1ed84c44c513dcd28.zip | |
Split dynamic desktop tracking into common, shared code.
(bzr r9282)
Diffstat (limited to 'src/ui/dialog/glyphs.cpp')
| -rw-r--r-- | src/ui/dialog/glyphs.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp index bc96b0575..c099b0718 100644 --- a/src/ui/dialog/glyphs.cpp +++ b/src/ui/dialog/glyphs.cpp @@ -32,7 +32,7 @@ namespace Inkscape { namespace UI { -namespace Dialogs { +namespace Dialog { GlyphsPanel &GlyphsPanel::getInstance() @@ -169,6 +169,8 @@ GlyphsPanel::GlyphsPanel() : scriptCombo(0), #endif // GLIB_CHECK_VERSION(2,14,0) fsel(0), + targetDesktop(0), + deskTrack(), iconActiveConn(), iconSelectConn(), scriptSelectConn() @@ -279,6 +281,10 @@ GlyphsPanel::GlyphsPanel() : show_all_children(); restorePanelPrefs(); + + // Connect this up last + desktopChangeConn = deskTrack.connectDesktopChanged( sigc::mem_fun(*this, &GlyphsPanel::setTargetDesktop) ); + deskTrack.connect(GTK_WIDGET(gobj())); } GlyphsPanel::~GlyphsPanel() @@ -286,8 +292,22 @@ GlyphsPanel::~GlyphsPanel() iconActiveConn.disconnect(); iconSelectConn.disconnect(); scriptSelectConn.disconnect(); + desktopChangeConn.disconnect(); +} + + +void GlyphsPanel::setDesktop(SPDesktop *desktop) +{ + Panel::setDesktop(desktop); + deskTrack.setBase(desktop); } +void GlyphsPanel::setTargetDesktop(SPDesktop *desktop) +{ + if (targetDesktop != desktop) { + targetDesktop = desktop; + } +} void GlyphsPanel::glyphActivated(Gtk::TreeModel::Path const & path) { |
