summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8647469)
raw | patch | inline | side by side (parent: 8647469)
author | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Thu, 17 Jan 2008 16:41:33 +0000 (16:41 +0000) | ||
committer | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Thu, 17 Jan 2008 16:41:33 +0000 (16:41 +0000) |
src/ui/dialog/filter-effects-dialog.cpp | patch | blob | history | |
src/ui/dialog/filter-effects-dialog.h | patch | blob | history |
index dcd3cd8cf42200c8ebaaec6ee4dca3c10c1e3ca6..06275bf1be685826d84c621264687d14d231d472 100644 (file)
}
}
+void FilterEffectsDialog::PrimitiveList::remove_selected()
+{
+ SPFilterPrimitive* prim = get_selected();
+
+ if(prim) {
+ _observer->set(0);
+
+ sp_repr_unparent(prim->repr);
+ sp_document_done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_DIALOG_FILTER_EFFECTS,
+ _("Remove filter primitive"));
+
+ update();
+ }
+}
bool FilterEffectsDialog::PrimitiveList::on_expose_signal(GdkEventExpose* e)
{
((Gtk::Label*)fr_settings->get_label_widget())->set_use_markup();
_add_primitive.signal_clicked().connect(sigc::mem_fun(*this, &FilterEffectsDialog::add_primitive));
_primitive_list.set_menu(create_popup_menu(*this, sigc::mem_fun(*this, &FilterEffectsDialog::duplicate_primitive),
- sigc::mem_fun(*this, &FilterEffectsDialog::remove_primitive)));
+ sigc::mem_fun(_primitive_list, &PrimitiveList::remove_selected)));
show_all_children();
init_settings_widgets();
}
}
-void FilterEffectsDialog::remove_primitive()
-{
- SPFilterPrimitive* prim = _primitive_list.get_selected();
-
- if(prim) {
- sp_repr_unparent(prim->repr);
-
- sp_document_done(sp_desktop_document(getDesktop()), SP_VERB_DIALOG_FILTER_EFFECTS,
- _("Remove filter primitive"));
-
- _primitive_list.update();
- }
-}
-
void FilterEffectsDialog::duplicate_primitive()
{
SPFilter* filter = _filter_modifier.get_selected_filter();
index 49343c0ce78504804b72c84e9e602299d843de9a..34f282fbbcf8899e5eda31451c5fdec22d3d5887 100644 (file)
SPFilterPrimitive* get_selected();
void select(SPFilterPrimitive *prim);
+ void remove_selected();
int primitive_count() const;
protected: