index 8fa52c2815ab29a01a8f8e8db5101c99027a09a7..8f3c570c54d30af33c65b77abf17af574a48fa13 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -512,7 +512,7 @@ Glib::RefPtr<VerbAction> VerbAction::create(Inkscape::Verb* verb, Inkscape::Verb
}
VerbAction::VerbAction(Inkscape::Verb* verb, Inkscape::Verb* verb2, Inkscape::UI::View::View *view, GtkTooltips *tooltips) :
- Gtk::Action(Glib::ustring(verb->get_id()), Gtk::StockID(GTK_STOCK_ABOUT), Glib::ustring(_(verb->get_name())), Glib::ustring(_(verb->get_tip()))),
+ Gtk::Action(Glib::ustring(verb->get_id()), Gtk::StockID(verb->get_image()), Glib::ustring(_(verb->get_name())), Glib::ustring(_(verb->get_tip()))),
verb(verb),
verb2(verb2),
view(view),
Gtk::Widget* VerbAction::create_menu_item_vfunc()
{
+// First call in to get the icon rendered if present in SVG
+ Gtk::Widget *widget = sp_icon_get_icon( property_stock_id().get_value().get_string(), Inkscape::ICON_SIZE_MENU );
+ delete widget;
+ widget = 0;
+
Gtk::Widget* widg = Gtk::Action::create_menu_item_vfunc();
// g_message("create_menu_item_vfunc() = %p for '%s'", widg, verb->get_id());
return widg;
static void
-update_tool_toolbox( SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget *toolbox )
+update_tool_toolbox( SPDesktop *desktop, SPEventContext *eventcontext, GtkWidget */*toolbox*/ )
{
gchar const *const tname = ( eventcontext
? gtk_type_name(GTK_OBJECT_TYPE(eventcontext))
@@ -3329,7 +3334,7 @@ static void sp_add_spiro_toggle(GtkActionGroup* mainActions, GObject* holder, bo
}
}
-static void sp_freehand_change_shape(EgeSelectOneAction* act, GObject *dataKludge) {
+static void sp_freehand_change_shape(EgeSelectOneAction* act, GObject */*dataKludge*/) {
gint shape = ege_select_one_action_get_active( act );
prefs_set_int_attribute("tools.freehand", "shape", shape);
}
glist = g_list_append (glist, _("None"));
glist = g_list_append (glist, _("Clipboard"));
+ glist = g_list_append (glist, _("Crescendo"));
glist = g_list_append (glist, _("Decrescendo"));
return glist;
static void
-sp_pencil_tb_tolerance_value_changed_external(Inkscape::XML::Node *repr,
- const gchar *key,
- const gchar *oldval,
- const gchar *newval,
- bool is_interactive,
+sp_pencil_tb_tolerance_value_changed_external(Inkscape::XML::Node */*repr*/,
+ const gchar */*key*/,
+ const gchar */*oldval*/,
+ const gchar */*newval*/,
+ bool /*is_interactive*/,
void * data)
{
GObject* tbl = G_OBJECT(data);
static void sp_ddc_mass_value_changed( GtkAdjustment *adj, GObject* tbl )
{
- prefs_set_double_attribute( "tools.calligraphic", "mass", adj->value );
+ prefs_set_double_attribute( "tools.calligraphic", "mass", adj->value * 0.01 );
update_presets_list(tbl);
}
static void sp_ddc_wiggle_value_changed( GtkAdjustment *adj, GObject* tbl )
{
- prefs_set_double_attribute( "tools.calligraphic", "wiggle", adj->value );
+ prefs_set_double_attribute( "tools.calligraphic", "wiggle", adj->value * 0.01 );
update_presets_list(tbl);
}
static void sp_ddc_velthin_value_changed( GtkAdjustment *adj, GObject* tbl )
{
- prefs_set_double_attribute("tools.calligraphic", "thinning", adj->value);
+ prefs_set_double_attribute("tools.calligraphic", "thinning", adj->value * 0.01 );
update_presets_list(tbl);
}
static void sp_ddc_flatness_value_changed( GtkAdjustment *adj, GObject* tbl )
{
- prefs_set_double_attribute( "tools.calligraphic", "flatness", adj->value );
+ prefs_set_double_attribute( "tools.calligraphic", "flatness", adj->value * 0.01);
update_presets_list(tbl);
}
static void sp_ddc_tremor_value_changed( GtkAdjustment *adj, GObject* tbl )
{
- prefs_set_double_attribute( "tools.calligraphic", "tremor", adj->value );
+ prefs_set_double_attribute( "tools.calligraphic", "tremor", adj->value * 0.01 );
update_presets_list(tbl);
}
static ProfileFloatElement f_profile[PROFILE_FLOAT_SIZE] = {
- {"mass",0.02, 0.0, 1.0},
- {"wiggle",0.0, 0.0, 1.0},
+ {"mass",2, 0.0, 100},
+ {"wiggle",0.0, 0.0, 100},
{"angle",30.0, -90.0, 90.0},
- {"thinning",0.1, -1.0, 1.0},
- {"tremor",0.0, 0.0, 1.0},
- {"flatness",0.9, 0.0, 1.0},
+ {"thinning",10, -100, 100},
+ {"tremor",0.0, 0.0, 100},
+ {"flatness",90, 0.0, 100},
{"cap_rounding",0.0, 0.0, 5.0}
};
static ProfileIntElement i_profile[PROFILE_INT_SIZE] = {
@@ -4001,15 +4007,15 @@ static void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* main
{
/* Thinning */
gchar const* labels[] = {_("(speed blows up stroke)"), 0, 0, _("(slight widening)"), _("(constant width)"), _("(slight thinning, default)"), 0, 0, _("(speed deflates stroke)")};
- gdouble values[] = {-1, -0.4, -0.2, -0.1, 0, 0.1, 0.2, 0.4, 1};
+ gdouble values[] = {-100, -40, -20, -10, 0, 10, 20, 40, 100};
EgeAdjustmentAction* eact = create_adjustment_action( "ThinningAction",
_("Stroke Thinning"), _("Thinning:"),
_("How much velocity thins the stroke (> 0 makes fast strokes thinner, < 0 makes them broader, 0 makes width independent of velocity)"),
- "tools.calligraphic", "thinning", 0.1,
+ "tools.calligraphic", "thinning", 10,
GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL,
- -1.0, 1.0, 0.01, 0.1,
+ -100, 100, 1, 0.1,
labels, values, G_N_ELEMENTS(labels),
- sp_ddc_velthin_value_changed, 0.01, 2);
+ sp_ddc_velthin_value_changed, 0.01, 0, 100);
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );
}
@@ -4035,15 +4041,15 @@ static void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* main
{
/* Fixation */
gchar const* labels[] = {_("(perpendicular to stroke, \"brush\")"), 0, 0, 0, _("(almost fixed, default)"), _("(fixed by Angle, \"pen\")")};
- gdouble values[] = {0, 0.2, 0.4, 0.6, 0.9, 1.0};
+ gdouble values[] = {0, 20, 40, 60, 90, 100};
EgeAdjustmentAction* eact = create_adjustment_action( "FixationAction",
_("Fixation"), _("Fixation:"),
_("Angle behavior (0 = nib always perpendicular to stroke direction, 1 = fixed angle)"),
- "tools.calligraphic", "flatness", 0.9,
+ "tools.calligraphic", "flatness", 90,
GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL,
- 0.0, 1.0, 0.01, 0.1,
+ 0.0, 100, 1.0, 10.0,
labels, values, G_N_ELEMENTS(labels),
- sp_ddc_flatness_value_changed, 0.01, 2 );
+ sp_ddc_flatness_value_changed, 0.01, 0, 100 );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );
}
@@ -4068,15 +4074,15 @@ static void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* main
{
/* Tremor */
gchar const* labels[] = {_("(smooth line)"), _("(slight tremor)"), _("(noticeable tremor)"), 0, 0, _("(maximum tremor)")};
- gdouble values[] = {0, 0.1, 0.2, 0.4, 0.6, 1.0};
+ gdouble values[] = {0, 10, 20, 40, 60, 100};
EgeAdjustmentAction* eact = create_adjustment_action( "TremorAction",
_("Stroke Tremor"), _("Tremor:"),
_("Increase to make strokes rugged and trembling"),
"tools.calligraphic", "tremor", 0.0,
GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL,
- 0.0, 1.0, 0.01, 0.0,
+ 0.0, 100, 1, 0.0,
labels, values, G_N_ELEMENTS(labels),
- sp_ddc_tremor_value_changed, 0.01, 2 );
+ sp_ddc_tremor_value_changed, 0.01, 0, 100 );
ege_adjustment_action_set_appearance( eact, TOOLBAR_SLIDER_HINT );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
@@ -4086,15 +4092,15 @@ static void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* main
{
/* Wiggle */
gchar const* labels[] = {_("(no wiggle)"), _("(slight deviation)"), 0, 0, _("(wild waves and curls)")};
- gdouble values[] = {0, 0.2, 0.4, 0.6, 1.0};
+ gdouble values[] = {0, 20, 40, 60, 100};
EgeAdjustmentAction* eact = create_adjustment_action( "WiggleAction",
_("Pen Wiggle"), _("Wiggle:"),
_("Increase to make the pen waver and wiggle"),
"tools.calligraphic", "wiggle", 0.0,
GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL,
- 0.0, 1.0, 0.01, 0.0,
+ 0.0, 100, 1, 0.0,
labels, values, G_N_ELEMENTS(labels),
- sp_ddc_wiggle_value_changed, 0.01, 2 );
+ sp_ddc_wiggle_value_changed, 0.01, 0, 100 );
ege_adjustment_action_set_appearance( eact, TOOLBAR_SLIDER_HINT );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );
@@ -4103,15 +4109,15 @@ static void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* main
{
/* Mass */
gchar const* labels[] = {_("(no inertia)"), _("(slight smoothing, default)"), _("(noticeable lagging)"), 0, 0, _("(maximum inertia)")};
- gdouble values[] = {0.0, 0.02, 0.1, 0.2, 0.5, 1.0};
+ gdouble values[] = {0.0, 2, 10, 20, 50, 100};
EgeAdjustmentAction* eact = create_adjustment_action( "MassAction",
_("Pen Mass"), _("Mass:"),
_("Increase to make the pen drag behind, as if slowed by inertia"),
- "tools.calligraphic", "mass", 0.02,
+ "tools.calligraphic", "mass", 2.0,
GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL,
- 0.0, 1.0, 0.01, 0.0,
+ 0.0, 100, 1, 0.0,
labels, values, G_N_ELEMENTS(labels),
- sp_ddc_mass_value_changed, 0.01, 2 );
+ sp_ddc_mass_value_changed, 0.01, 0, 100 );
ege_adjustment_action_set_appearance( eact, TOOLBAR_SLIDER_HINT );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );