From: joncruz Date: Thu, 22 Mar 2007 04:43:20 +0000 (+0000) Subject: Adding non-labeled default entries X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2c8e18086b7f278839de8bb0aab1fc0f91fe611e;p=inkscape.git Adding non-labeled default entries --- diff --git a/src/ege-adjustment-action.cpp b/src/ege-adjustment-action.cpp index 2d303c63d..54cde1d1d 100644 --- a/src/ege-adjustment-action.cpp +++ b/src/ege-adjustment-action.cpp @@ -453,10 +453,8 @@ void ege_adjustment_action_set_descriptions( EgeAdjustmentAction* action, gchar guint i = 0; for ( i = 0; i < count; i++ ) { EgeAdjustmentDescr* descr = g_new0( EgeAdjustmentDescr, 1 ); - if ( descriptions[i] ) { - descr->descr = g_strdup( descriptions[i] ); - descr->value = values[i]; - } + descr->descr = descriptions[i] ? g_strdup( descriptions[i] ) : 0; + descr->value = values[i]; action->private_data->descriptions = g_list_insert_sorted( action->private_data->descriptions, (gpointer)descr, egeAct_compare_descriptions ); } } @@ -540,7 +538,7 @@ static void create_single_menu_item( GCallback toggleCb, int val, GtkWidget* men cur = g_list_next( cur ); } - str = g_strdup_printf( act->private_data->format, num, (marker?" ":""), (marker?marker->descr:"") ); + str = g_strdup_printf( act->private_data->format, num, (marker?" ":""), ( (marker && marker->descr) ? marker->descr:"") ); *dst = gtk_radio_menu_item_new_with_label( *group, str ); if ( !*group) { diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index fa2f17138..b22f9c970 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2257,8 +2257,8 @@ sp_calligraphy_toolbox_new(SPDesktop *desktop) gtk_action_set_sensitive( GTK_ACTION(eact), TRUE ); /* Angle */ - gchar const* labels3[] = {_("(left edge up)"), _("(horizontal)"), _("(default)"), _("(right edge up)")}; - gdouble values3[] = {-90, 0, 30, 90}; + gchar const* labels3[] = {_("(left edge up)"), 0, 0, _("(horizontal)"), _("(default)"), 0, _("(right edge up)")}; + gdouble values3[] = {-90, -60, -30, 0, 30, 60, 90}; eact = create_adjustment_action( "AngleAction", _("Angle:"), _("The angle of the pen's nib (in degrees; 0 = horizontal; has no effect if fixation = 0)"), "tools.calligraphic", "angle", 30,