summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/inkscape-preferences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/inkscape-preferences.cpp')
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 75cfe5bfe..8d507d037 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);
@@ -461,7 +465,7 @@ void InkscapePreferences::initPageTools()
_page_text.add_line( false, _("Text size unit type:"), _font_unit_type, "",
_("Set the type of unit used in the text toolbar and text dialogs"), false);
_font_output_px.init ( _("Always output text size in pixels (px)"), "/options/font/textOutputPx", true);
- _page_text.add_line( false, "", _font_output_px, "", _("Always convert the text size units above into pixels (px) before saving to file"));
+// _page_text.add_line( false, "", _font_output_px, "", _("Always convert the text size units above into pixels (px) before saving to file"));
this->AddNewObjectsStyle(_page_text, "/tools/text");
@@ -1913,7 +1917,7 @@ void InkscapePreferences::initPageSystem()
_page_system.add_group_header( _("System info"));
- _sys_user_config.set_text((char const *)profile_path(""));
+ _sys_user_config.set_text((char const *)Inkscape::Application::profile_path(""));
_sys_user_config.set_editable(false);
_page_system.add_line(true, _("User config: "), _sys_user_config, "", _("Location of users configuration"), true);