예제 #1
0
static void
quit_cb(MathWindow *window)
{
    MathEquation *equation;
    MathButtons *buttons;

    equation = math_window_get_equation(window);
    buttons = math_window_get_buttons(window);

    g_settings_set_int(settings, "accuracy", math_equation_get_accuracy(equation));
    g_settings_set_int(settings, "word-size", math_equation_get_word_size(equation));
    g_settings_set_int(settings, "base", math_buttons_get_programming_base(buttons));
    g_settings_set_boolean(settings, "show-thousands", math_equation_get_show_thousands_separators(equation));
    g_settings_set_boolean(settings, "show-zeroes", math_equation_get_show_trailing_zeroes(equation));
    g_settings_set_enum(settings, "number-format", math_equation_get_number_format(equation));
    g_settings_set_enum(settings, "angle-units", math_equation_get_angle_units(equation));
    g_settings_set_enum(settings, "button-mode", math_buttons_get_mode(buttons));
    g_settings_set_string(settings, "source-currency", math_equation_get_source_currency(equation));
    g_settings_set_string(settings, "target-currency", math_equation_get_target_currency(equation));
    g_settings_sync();

    currency_free_resources();
    gtk_main_quit();
}
예제 #2
0
static void
programming_base_cb(MathButtons *buttons, GParamSpec *spec)
{
    g_settings_set_int(settings, "base", math_buttons_get_programming_base(buttons));
}