summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a95be12)
raw | patch | inline | side by side (parent: a95be12)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 9 Jun 2008 05:48:13 +0000 (05:48 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 9 Jun 2008 05:48:13 +0000 (05:48 +0000) |
diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h
index e77b9e9be8b605dff74fd2c0e0c3ad96c2396742..02c81adcf5cad0c5e196081fb21d73c0c632eb20 100644 (file)
--- a/src/menus-skeleton.h
+++ b/src/menus-skeleton.h
" </submenu>\n"
" <submenu name=\"" N_("_Object") "\">\n"
" <verb verb-id=\"DialogFillStroke\" />\n"
-" <verb verb-id=\"DialogFilterEffects\" />\n"
" <verb verb-id=\"DialogObjectProperties\" />\n"
" <separator/>\n"
+" <verb verb-id=\"DialogFilterEffects\" />\n"
+" <verb verb-id=\"RemoveFilter\" />\n"
+" <separator/>\n"
" <verb verb-id=\"SelectionGroup\" />\n"
" <verb verb-id=\"SelectionUnGroup\" />\n"
" <separator/>\n"
index 9c826c949a8ad38706e8f6341213dcd697a102c8..91c518766f4fa339dd12f827b3227897795c288b 100644 (file)
#include "svg/svg.h"
#include "inkscape.h"
#include "desktop.h"
-//#include "desktop-style.h"
+#include "desktop-style.h"
#include "selection.h"
#include "tools-switch.h"
#include "desktop-handles.h"
}
- sp_document_done(sp_desktop_document (desktop), SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
+ sp_document_done(sp_desktop_document (desktop), SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT,
_("Remove live path effect"));
}
+void sp_selection_remove_filter ()
+{
+ SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ if (desktop == NULL) return;
+
+ Inkscape::Selection *selection = sp_desktop_selection(desktop);
+
+ // check if something is selected
+ if (selection->isEmpty()) {
+ desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Select <b>object(s)</b> to remove filters from."));
+ return;
+ }
+
+ SPCSSAttr *css = sp_repr_css_attr_new();
+ sp_repr_css_unset_property(css, "filter");
+ sp_desktop_set_style(desktop, css);
+ sp_repr_css_attr_unref(css);
+
+ sp_document_done(sp_desktop_document (desktop), SP_VERB_EDIT_REMOVE_FILTER,
+ _("Remove filter"));
+}
+
+
void sp_selection_paste_size (bool apply_x, bool apply_y)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
return;
}
+ desktop->messageStack()->flash(Inkscape::IMMEDIATE_MESSAGE, _("Rendering bitmap..."));
+ // set "busy" cursor
+ desktop->setWaitingCursor();
+
// Get the bounding box of the selection
NRRect bbox;
sp_document_ensure_up_to_date (document);
selection->bounds(&bbox);
if (NR_RECT_DFLS_TEST_EMPTY(&bbox)) {
+ desktop->clearWaitingCursor();
return; // exceptional situation, so not bother with a translatable error message, just quit quietly
}
unsigned width = (unsigned) floor ((bbox.x1 - bbox.x0) * res / PX_PER_IN);
unsigned height =(unsigned) floor ((bbox.y1 - bbox.y0) * res / PX_PER_IN);
- // Find out if we have to run a filter
+ // Find out if we have to run an external filter
gchar const *run = NULL;
gchar const *filter = prefs_get_string_attribute ("options.createbitmap", "filter");
if (filter) {
_("Create bitmap"));
}
+ desktop->clearWaitingCursor();
+
g_free (filename);
g_free (filepath);
}
index 9a7567446d8a119f6ec44a4a842e0bf405f8bfcc..e5b2d9ef1d6af901f829b0866e023cf10bd12578 100644 (file)
void sp_selection_paste_livepatheffect();
void sp_selection_remove_livepatheffect();
+void sp_selection_remove_filter();
+
void sp_set_style_clipboard (SPCSSAttr *css);
void sp_selection_paste_size(bool apply_x, bool apply_y);
diff --git a/src/verbs.cpp b/src/verbs.cpp
index 8ac2bec8b255b5bb157bd5088231f1980ee62ad9..509dff087c0cfe63be06d42769ba349d4be4ccfc 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
case SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT:
sp_selection_remove_livepatheffect();
break;
+ case SP_VERB_EDIT_REMOVE_FILTER:
+ sp_selection_remove_filter();
+ break;
case SP_VERB_EDIT_DELETE:
sp_selection_delete();
break;
N_("Apply the path effect of the copied object to selection"), NULL),
new EditVerb(SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT, "RemoveLivePathEffect", N_("Remove Path _Effect"),
N_("Remove any path effects from selected objects"), NULL),
+ new EditVerb(SP_VERB_EDIT_REMOVE_FILTER, "RemoveFilter", N_("Remove Filter"),
+ N_("Remove any filters from selected objects"), NULL),
new EditVerb(SP_VERB_EDIT_DELETE, "EditDelete", N_("_Delete"),
N_("Delete selection"), GTK_STOCK_DELETE),
new EditVerb(SP_VERB_EDIT_DUPLICATE, "EditDuplicate", N_("Duplic_ate"),
diff --git a/src/verbs.h b/src/verbs.h
index 605cc732b4f45dd18d22482b1de6f1c7c14b4549..6447bbadd45a7801b145568419421bb63a4f62c1 100644 (file)
--- a/src/verbs.h
+++ b/src/verbs.h
SP_VERB_EDIT_PASTE_IN_PLACE,
SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT,
+ SP_VERB_EDIT_REMOVE_FILTER,
SP_VERB_EDIT_DELETE,
SP_VERB_EDIT_DUPLICATE,
SP_VERB_EDIT_CLONE,