From 1c954df5d7f214580761f55fdd9470e893d1a032 Mon Sep 17 00:00:00 2001 From: gouldtj Date: Wed, 27 Jun 2007 06:25:39 +0000 Subject: [PATCH] r15481@tres: ted | 2007-05-22 09:56:22 -0700 Switching to sigc::signal so it actually works. --- src/extension/effect.cpp | 8 +++----- src/extension/extension.cpp | 2 +- src/extension/extension.h | 2 +- src/extension/implementation/implementation.cpp | 2 +- src/extension/implementation/implementation.h | 2 +- src/extension/implementation/script.cpp | 2 +- src/extension/implementation/script.h | 2 +- src/extension/internal/bluredge.cpp | 2 +- src/extension/internal/bluredge.h | 2 +- src/extension/internal/grid.cpp | 2 +- src/extension/internal/grid.h | 2 +- 11 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index d18599d62..80dc776e3 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -2,7 +2,7 @@ * Authors: * Ted Gould * - * Copyright (C) 2002-2006 Authors + * Copyright (C) 2002-2007 Authors * * Released under GNU GPL, read the file 'COPYING' for more information */ @@ -364,9 +364,7 @@ Effect::prefs (Inkscape::UI::View::View * doc) set_state(Extension::STATE_LOADED); if (!loaded()) return false; - Glib::SignalProxyInfo changeSignalInfo = {signal_name: "Effect Preference Changed", - callback: NULL, notify_callback: NULL}; - Glib::SignalProxy0 changeSignal(NULL, &changeSignalInfo); + sigc::signal changeSignal; Gtk::Widget * controls; controls = imp->prefs_effect(this, doc, &changeSignal); @@ -376,7 +374,7 @@ Effect::prefs (Inkscape::UI::View::View * doc) } ExecutionEnv executionEnv(this, doc, controls); - //changeSignal.connect(sigc::mem_fun(executionEnv, &ExecutionEnv::preferencesChange)); + changeSignal.connect(sigc::mem_fun(executionEnv, &ExecutionEnv::preferencesChange)); executionEnv.run(); return true; diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index ffb533eda..20aff9c03 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -623,7 +623,7 @@ public: If there are no parameters, this function just returns NULL. */ Gtk::Widget * -Extension::autogui (SPDocument * doc, Inkscape::XML::Node * node, Glib::SignalProxy0 * changeSignal) +Extension::autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { if (g_slist_length(parameters) == 0) return NULL; diff --git a/src/extension/extension.h b/src/extension/extension.h index d1613e711..a1993f941 100644 --- a/src/extension/extension.h +++ b/src/extension/extension.h @@ -182,7 +182,7 @@ public: static void error_file_close (void); public: - Gtk::Widget * autogui (SPDocument * doc, Inkscape::XML::Node * node, Glib::SignalProxy0 * changeSignal = NULL); + Gtk::Widget * autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal = NULL); void paramListString (std::list & retlist); /* Extension editor dialog stuff */ diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp index e28dbcba6..6a9a7955f 100644 --- a/src/extension/implementation/implementation.cpp +++ b/src/extension/implementation/implementation.cpp @@ -72,7 +72,7 @@ Implementation::save(Inkscape::Extension::Output *module, SPDocument *doc, gchar } /* Implementation::save */ Gtk::Widget * -Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *view, Glib::SignalProxy0 * changeSignal) { +Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *view, sigc::signal * changeSignal) { return module->autogui(NULL, NULL); } /* Implementation::prefs_effect */ diff --git a/src/extension/implementation/implementation.h b/src/extension/implementation/implementation.h index cfffecad9..a132996f7 100644 --- a/src/extension/implementation/implementation.h +++ b/src/extension/implementation/implementation.h @@ -63,7 +63,7 @@ public: /* ----- Effect functions ----- */ /** Find out information about the file. */ - virtual Gtk::Widget * prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, Glib::SignalProxy0 * changeSignal); + virtual Gtk::Widget * prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal * changeSignal); /* TODO: need to figure out what we need here */ virtual void effect(Inkscape::Extension::Effect *module, diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 857c36bc3..96c436dfd 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -550,7 +550,7 @@ Script::prefs_output(Inkscape::Extension::Output *module) Gtk::Widget * Script::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *view, - Glib::SignalProxy0 * changeSignal) + sigc::signal * changeSignal) { SPDocument * current_document = view->doc(); diff --git a/src/extension/implementation/script.h b/src/extension/implementation/script.h index 155abf735..d8970cf15 100644 --- a/src/extension/implementation/script.h +++ b/src/extension/implementation/script.h @@ -90,7 +90,7 @@ public: */ virtual Gtk::Widget *prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, - Glib::SignalProxy0 * changeSignal); + sigc::signal * changeSignal); /** * diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp index 248cf1c7d..aa1f3ece3 100644 --- a/src/extension/internal/bluredge.cpp +++ b/src/extension/internal/bluredge.cpp @@ -117,7 +117,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View } Gtk::Widget * -BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view, Glib::SignalProxy0 * changeSignal) +BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view, sigc::signal * changeSignal) { return module->autogui(NULL, NULL, changeSignal); } diff --git a/src/extension/internal/bluredge.h b/src/extension/internal/bluredge.h index c84d16e96..d97e73c9a 100644 --- a/src/extension/internal/bluredge.h +++ b/src/extension/internal/bluredge.h @@ -22,7 +22,7 @@ class BlurEdge : public Inkscape::Extension::Implementation::Implementation { public: bool load(Inkscape::Extension::Extension *module); void effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document); - Gtk::Widget * prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view, Glib::SignalProxy0 * changeSignal); + Gtk::Widget * prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view, sigc::signal * changeSignal); static void init (void); }; diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index 099268176..1957813e5 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -169,7 +169,7 @@ PrefAdjustment::val_changed (void) Uses AutoGUI for creating the GUI. */ Gtk::Widget * -Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, Glib::SignalProxy0 * changeSignal) +Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal * changeSignal) { SPDocument * current_document = view->doc(); diff --git a/src/extension/internal/grid.h b/src/extension/internal/grid.h index 1fedbb177..c4a97aeba 100644 --- a/src/extension/internal/grid.h +++ b/src/extension/internal/grid.h @@ -22,7 +22,7 @@ class Grid : public Inkscape::Extension::Implementation::Implementation { public: bool load(Inkscape::Extension::Extension *module); void effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document); - Gtk::Widget * prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, Glib::SignalProxy0 * changeSignal); + Gtk::Widget * prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal * changeSignal); static void init (void); }; -- 2.30.2