summaryrefslogtreecommitdiffstats
path: root/src/extension/implementation/implementation.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2008-04-22 22:25:06 +0000
committergouldtj <gouldtj@users.sourceforge.net>2008-04-22 22:25:06 +0000
commita95c2d655dfeed6218497fc6e01e78aeb2d35f55 (patch)
treebf42d16b4efbc6131c5c5e05bc3f07d0a09b4e8a /src/extension/implementation/implementation.cpp
parentFinal format and comment fix. Sorry. (diff)
downloadinkscape-a95c2d655dfeed6218497fc6e01e78aeb2d35f55.tar.gz
inkscape-a95c2d655dfeed6218497fc6e01e78aeb2d35f55.zip
r19083@shi: ted | 2008-04-21 16:09:24 -0700
A directory for filter effects r19084@shi: ted | 2008-04-21 20:03:59 -0700 The basis for the filter interface for defining effects. r19085@shi: ted | 2008-04-21 20:59:04 -0700 Adding Sepia as an example r19086@shi: ted | 2008-04-21 23:25:57 -0700 Wiring everything in. Cleaning it up so that it looks nice. r19087@shi: ted | 2008-04-22 00:00:08 -0700 Completeing more of the guts. Not done, but the basic infrastructure is now in place. r19088@shi: ted | 2008-04-22 00:19:38 -0700 All the basic plumbing code. It seems to work, except the document is wrong from the controlling filter guy. That should be fixable. r19089@shi: ted | 2008-04-22 00:31:36 -0700 Whoo! Hoo! for simple stuff it seems to work. r19090@shi: ted | 2008-04-22 10:36:16 -0700 First pass at adding the filters from Mauve's example r19091@shi: ted | 2008-04-22 10:37:24 -0700 Fixing misspelling r19092@shi: ted | 2008-04-22 12:32:18 -0700 Should be appending instead of prepending these nodes. r19093@shi: ted | 2008-04-22 13:37:34 -0700 Basic filter with parameters working r19094@shi: ted | 2008-04-22 14:27:20 -0700 Changing it so that by default an effect will have a call to autogui that will work with live effects. Basically this involved migrating the implementation of prefs_effect up from script.cpp to implementation.cpp r19102@shi: ted | 2008-04-22 14:38:46 -0700 Better defaults r19103@shi: ted | 2008-04-22 14:42:07 -0700 Adding filter stuff to be translated (bzr r5490)
Diffstat (limited to 'src/extension/implementation/implementation.cpp')
-rw-r--r--src/extension/implementation/implementation.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index 5fdb47835..6614604ff 100644
--- a/src/extension/implementation/implementation.cpp
+++ b/src/extension/implementation/implementation.cpp
@@ -19,6 +19,12 @@
#include <extension/input.h>
#include <extension/effect.h>
+#include "selection.h"
+#include "desktop.h"
+#include "desktop-handles.h"
+#include "ui/view/view.h"
+#include "util/glib-list-iterators.h"
+
namespace Inkscape {
namespace Extension {
namespace Implementation {
@@ -91,8 +97,21 @@ Implementation::save(Inkscape::Extension::Output */*module*/, SPDocument */*doc*
} /* Implementation::save */
Gtk::Widget *
-Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View */*view*/, sigc::signal<void> * /*changeSignal*/, ImplementationDocumentCache * /*docCache*/) {
- return module->autogui(NULL, NULL);
+Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, ImplementationDocumentCache * docCache) {
+ if (module->param_visible_count() == 0) return NULL;
+
+ SPDocument * current_document = view->doc();
+
+ using Inkscape::Util::GSListConstIterator;
+ GSListConstIterator<SPItem *> selected =
+ sp_desktop_selection((SPDesktop *)view)->itemList();
+ Inkscape::XML::Node * first_select = NULL;
+ if (selected != NULL) {
+ const SPItem * item = *selected;
+ first_select = SP_OBJECT_REPR(item);
+ }
+
+ return module->autogui(current_document, first_select, changeSignal);
} /* Implementation::prefs_effect */
void