index abe021cf739b485381928442c22b55ed96e8fafd..1b4062b2fc6430a65e86ab89ee38a45546ced6f5 100644 (file)
action->private_data->focusWidget = 0;
action->private_data->climbRate = 0.0;
action->private_data->digits = 2;
- action->private_data->epsilon = 0.01;
+ action->private_data->epsilon = 0.009;
action->private_data->format = g_strdup_printf("%%0.%df%%s%%s", action->private_data->digits);
action->private_data->selfId = 0;
action->private_data->toolPost = 0;
@@ -348,11 +348,11 @@ void ege_adjustment_action_set_property( GObject* obj, guint propId, const GValu
/* TODO pass on */
action->private_data->digits = g_value_get_uint( value );
switch ( action->private_data->digits ) {
- case 0: action->private_data->epsilon = 1.0; break;
- case 1: action->private_data->epsilon = 0.1; break;
- case 2: action->private_data->epsilon = 0.01; break;
- case 3: action->private_data->epsilon = 0.001; break;
- case 4: action->private_data->epsilon = 0.0001; break;
+ case 0: action->private_data->epsilon = 0.9; break;
+ case 1: action->private_data->epsilon = 0.09; break;
+ case 2: action->private_data->epsilon = 0.009; break;
+ case 3: action->private_data->epsilon = 0.0009; break;
+ case 4: action->private_data->epsilon = 0.00009; break;
}
if ( action->private_data->format ) {
g_free( action->private_data->format );
@@ -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) {
g_object_get_property( G_OBJECT(action), "label", &value );
const gchar* sss = g_value_get_string( &value );
GtkWidget* lbl = gtk_label_new( sss ? sss : "wwww" );
+ GtkWidget* filler1 = gtk_label_new(" ");
{
GValue tooltip;
g_object_get_property( G_OBJECT(action), "tooltip", &tooltip );
const gchar* tipstr = g_value_get_string( &tooltip );
if ( tipstr && *tipstr ) {
- if ( !action->private_data->toolTips ) {
- action->private_data->toolTips = gtk_tooltips_new();
+ if ( !act->private_data->toolTips ) {
+ act->private_data->toolTips = gtk_tooltips_new();
}
- gtk_tooltips_set_tip( action->private_data->toolTips, spinbutton, tipstr, 0 );
+ gtk_tooltips_set_tip( act->private_data->toolTips, spinbutton, tipstr, 0 );
}
}
gtk_misc_set_alignment( GTK_MISC(lbl), 1.0, 0.5 );
+ gtk_box_pack_start( GTK_BOX(hb), filler1, FALSE, FALSE, 0 );
gtk_box_pack_start( GTK_BOX(hb), lbl, FALSE, FALSE, 0 );
- gtk_box_pack_end( GTK_BOX(hb), spinbutton, FALSE, FALSE, 0 );
+ gtk_box_pack_start( GTK_BOX(hb), spinbutton, FALSE, FALSE, 0 );
+
gtk_container_add( GTK_CONTAINER(item), hb );
if ( act->private_data->selfId ) {
g_signal_connect( G_OBJECT(spinbutton), "value-changed", G_CALLBACK(value_changed_cb), action );
g_signal_connect_swapped( G_OBJECT(spinbutton), "event", G_CALLBACK(event_cb), action );
+ gtk_entry_set_width_chars( GTK_ENTRY(spinbutton), act->private_data->digits + 3 );
gtk_widget_show_all( item );