summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/fontbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/parameter/fontbutton.cpp')
-rw-r--r--src/live_effects/parameter/fontbutton.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/live_effects/parameter/fontbutton.cpp b/src/live_effects/parameter/fontbutton.cpp
index ee76c4ab9..64c203093 100644
--- a/src/live_effects/parameter/fontbutton.cpp
+++ b/src/live_effects/parameter/fontbutton.cpp
@@ -33,11 +33,9 @@ FontButtonParam::param_set_default()
{
param_setValue(defvalue);
}
-
void
-FontButtonParam::param_update_default(const gchar * default_value)
-{
- defvalue = (Glib::ustring)strdup(default_value);
+FontButtonParam::param_update_default(const Glib::ustring default_value){
+ defvalue = default_value;
}
bool
@@ -58,24 +56,14 @@ FontButtonParam::param_getSVGValue() const
Gtk::Widget *
FontButtonParam::param_newWidget()
{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- Glib::ustring effectkey = (Glib::ustring)Inkscape::LivePathEffect::LPETypeConverter.get_key(param_effect->effectType());
- Glib::ustring pref_path = (Glib::ustring)"/live_effects/" +
- effectkey +
- (Glib::ustring)"/" +
- (Glib::ustring)param_key;
- Glib::ustring label = param_label;
- if(prefs->getEntry(pref_path).isValid()){
- label = (Glib::ustring)"* " + param_label;
- }
Inkscape::UI::Widget::RegisteredFontButton * fontbuttonwdg = Gtk::manage(
- new Inkscape::UI::Widget::RegisteredFontButton( label,
+ new Inkscape::UI::Widget::RegisteredFontButton( param_label,
param_tooltip,
param_key,
*param_wr,
param_effect->getRepr(),
param_effect->getSPDoc() ) );
- Glib::ustring fontspec = (Glib::ustring)param_getSVGValue();
+ Glib::ustring fontspec = param_getSVGValue();
fontbuttonwdg->setValue( fontspec);
fontbuttonwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change font button parameter"));
param_effect->upd_params = false;
@@ -83,12 +71,11 @@ FontButtonParam::param_newWidget()
}
void
-FontButtonParam::param_setValue(Glib::ustring newvalue)
+FontButtonParam::param_setValue(const Glib::ustring newvalue)
{
value = newvalue;
}
-
} /* namespace LivePathEffect */
} /* namespace Inkscape */