summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2008-10-31 15:06:16 +0000
committerTed Gould <ted@canonical.com>2008-10-31 15:06:16 +0000
commit7e67d66e7817a9321c4e94b2184a9226b20b396a (patch)
treea857d7aae5f544c4243a331e4eb4e4629bbc27a9 /src/ui
parentMerge from trunk (diff)
downloadinkscape-7e67d66e7817a9321c4e94b2184a9226b20b396a.tar.gz
inkscape-7e67d66e7817a9321c4e94b2184a9226b20b396a.zip
Merge from trunk
(bzr r6887)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/Makefile_insert4
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.h10
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp9
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp9
-rw-r--r--src/ui/dialog/filter-effects-dialog.h1
-rw-r--r--src/ui/widget/object-composite-settings.cpp15
-rw-r--r--src/ui/widget/object-composite-settings.h3
7 files changed, 36 insertions, 15 deletions
diff --git a/src/ui/dialog/Makefile_insert b/src/ui/dialog/Makefile_insert
index 6c75a6c81..638be2832 100644
--- a/src/ui/dialog/Makefile_insert
+++ b/src/ui/dialog/Makefile_insert
@@ -60,6 +60,8 @@ ui_dialog_libuidialog_a_SOURCES = \
ui/dialog/aboutbox.cpp \
ui/dialog/aboutbox.h \
ui/dialog/ocaldialogs.cpp \
- ui/dialog/ocaldialogs.h
+ ui/dialog/ocaldialogs.h \
+ ui/dialog/filedialogimpl-win32.h \
+ ui/dialog/filedialogimpl-win32.cpp
ui/dialog/aboutbox.$(OBJEXT): inkscape_version.h
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.h b/src/ui/dialog/filedialogimpl-gtkmm.h
index 1ac259221..90dddce59 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.h
+++ b/src/ui/dialog/filedialogimpl-gtkmm.h
@@ -1,22 +1,22 @@
-#ifndef __FILE_DIALOGIMPL_H__
-#define __FILE_DIALOGIMPL_H__
/** @file
* @brief Implementation of the file dialog interfaces defined in filedialogimpl.h
*/
/* Authors:
* Bob Jamison
+ * Johan Engelen <johan@shouraizou.nl>
* Joel Holdsworth
* Bruno Dilly
* Other dudes from The Inkscape Organization
*
- * Copyright (C) 2004-2007 Bob Jamison
- * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
- * Copyright (C) 2007-2008 Joel Holdsworth
+ * Copyright (C) 2004-2008 Authors
* Copyright (C) 2004-2007 The Inkscape Organization
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#ifndef __FILE_DIALOGIMPL_H__
+#define __FILE_DIALOGIMPL_H__
+
#include "filedialog.h"
//General includes
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 77a42df99..b47f2ccc7 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -9,13 +9,12 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#ifdef WIN32
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-#ifdef WIN32
-
//General includes
#include <list>
#include <unistd.h>
@@ -1694,11 +1693,9 @@ UINT_PTR CALLBACK FileSaveDialogImplWin32::GetSaveFileName_hookproc(
return 0;
}
-}
-}
-}
+} } } // namespace Dialog, UI, Inkscape
-#endif
+#endif // ifdef WIN32
/*
Local Variables:
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index d31331a0d..799bb2a24 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -1157,6 +1157,8 @@ FilterEffectsDialog::FilterModifier::FilterModifier(FilterEffectsDialog& d)
g_signal_connect(G_OBJECT(INKSCAPE), "activate_desktop",
G_CALLBACK(&FilterModifier::on_activate_desktop), this);
+ g_signal_connect(G_OBJECT(INKSCAPE), "deactivate_desktop",
+ G_CALLBACK(&FilterModifier::on_deactivate_desktop), this);
on_activate_desktop(INKSCAPE, d.getDesktop(), this);
update_filters();
@@ -1184,6 +1186,13 @@ void FilterEffectsDialog::FilterModifier::on_activate_desktop(Application*, SPDe
me->update_filters();
}
+void FilterEffectsDialog::FilterModifier::on_deactivate_desktop(Application*, SPDesktop* desktop, FilterModifier* me)
+{
+ me->_doc_replaced.disconnect();
+ me->_resource_changed.disconnect();
+ me->_dialog.setDesktop(NULL);
+}
+
// When the selection changes, show the active filter(s) in the dialog
void FilterEffectsDialog::FilterModifier::on_inkscape_change_selection(Application */*inkscape*/,
diff --git a/src/ui/dialog/filter-effects-dialog.h b/src/ui/dialog/filter-effects-dialog.h
index 0522b7a99..ccffb2a67 100644
--- a/src/ui/dialog/filter-effects-dialog.h
+++ b/src/ui/dialog/filter-effects-dialog.h
@@ -87,6 +87,7 @@ private:
};
static void on_activate_desktop(Application*, SPDesktop*, FilterModifier*);
+ static void on_deactivate_desktop(Application*, SPDesktop*, FilterModifier*);
void on_document_replaced(SPDesktop*, SPDocument*)
{
update_filters();
diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp
index f2fa9bcd3..9e39af75f 100644
--- a/src/ui/widget/object-composite-settings.cpp
+++ b/src/ui/widget/object-composite-settings.cpp
@@ -33,7 +33,7 @@ namespace Inkscape {
namespace UI {
namespace Widget {
-void ObjectCompositeSettings::_on_desktop_switch(
+void ObjectCompositeSettings::_on_desktop_activate(
Inkscape::Application */*application*/,
SPDesktop *desktop,
ObjectCompositeSettings *w
@@ -43,6 +43,16 @@ void ObjectCompositeSettings::_on_desktop_switch(
}
}
+void ObjectCompositeSettings::_on_desktop_deactivate(
+ Inkscape::Application */*application*/,
+ SPDesktop *desktop,
+ ObjectCompositeSettings *w
+) {
+ if (w->_subject) {
+ w->_subject->setDesktop(NULL);
+ }
+}
+
ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char const *history_prefix, int flags)
: _verb_code(verb_code),
_blur_tag(Glib::ustring(history_prefix) + ":blur"),
@@ -77,7 +87,8 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co
show_all_children();
- _desktop_activated = g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (&ObjectCompositeSettings::_on_desktop_switch), this );
+ _desktop_activated = g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (&ObjectCompositeSettings::_on_desktop_activate), this );
+ _desktop_activated = g_signal_connect ( G_OBJECT (INKSCAPE), "deactivate_desktop", G_CALLBACK (&ObjectCompositeSettings::_on_desktop_deactivate), this );
}
ObjectCompositeSettings::~ObjectCompositeSettings() {
diff --git a/src/ui/widget/object-composite-settings.h b/src/ui/widget/object-composite-settings.h
index 725a8a42b..f778c3ac0 100644
--- a/src/ui/widget/object-composite-settings.h
+++ b/src/ui/widget/object-composite-settings.h
@@ -55,7 +55,8 @@ private:
Gtk::VBox _fe_vbox;
Gtk::Alignment _fe_alignment;
- static void _on_desktop_switch(Inkscape::Application *application, SPDesktop *desktop, ObjectCompositeSettings *w);
+ static void _on_desktop_activate(Inkscape::Application *application, SPDesktop *desktop, ObjectCompositeSettings *w);
+ static void _on_desktop_deactivate(Inkscape::Application *application, SPDesktop *desktop, ObjectCompositeSettings *w);
void _subjectChanged();
sigc::connection _subject_changed;