diff options
Diffstat (limited to 'src/ui/dialog/inkscape-preferences.cpp')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index ed4b16008..0ea6cf082 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -32,7 +32,7 @@ #include "util/units.h" #include <iostream> #include "enums.h" -#include "desktop-handles.h" + #include "extension/internal/gdkpixbuf-input.h" #include "message-stack.h" #include "style.h" @@ -213,10 +213,10 @@ static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatc if (desktop == NULL) return; - Inkscape::Selection *selection = sp_desktop_selection(desktop); + Inkscape::Selection *selection = desktop->getSelection(); if (selection->isEmpty()) { - sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, + desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No objects selected</b> to take the style from.")); return; } @@ -225,7 +225,7 @@ static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatc /* TODO: If each item in the selection has the same style then don't consider it an error. * Maybe we should try to handle multiple selections anyway, e.g. the intersection of the * style attributes for the selected items. */ - sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, + desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>More than one object selected.</b> Cannot take style from multiple objects.")); return; } @@ -279,10 +279,14 @@ void InkscapePreferences::AddNewObjectsStyle(DialogPage &p, Glib::ustring const p.add_line( true, "", *hb, "", ""); // style swatch - Gtk::Button* button = Gtk::manage( new Gtk::Button(_("Take from selection"),true)); + Gtk::Button* button = Gtk::manage( new Gtk::Button(_("Take from selection"), true)); StyleSwatch *swatch = 0; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (prefs->getInt(prefs_path + "/usecurrent")) { + button->set_sensitive(false); + } + SPCSSAttr *css = prefs->getStyle(prefs_path + "/style"); swatch = new StyleSwatch(css, _("This tool's style of new objects")); hb->add(*swatch); @@ -1742,6 +1746,10 @@ void InkscapePreferences::onKBListKeyboardShortcuts() // Find this group in the tree Glib::ustring group = verb->get_group() ? _(verb->get_group()) : _("Misc"); + Glib::ustring verb_id = verb->get_id(); + if (verb_id .compare(0,26,"org.inkscape.effect.filter") == 0) { + group = _("Filters"); + } Gtk::TreeStore::iterator iter_group; bool found = false; while (path) { |
