summaryrefslogtreecommitdiff
path: root/src/mate-calc.c
diff options
context:
space:
mode:
authormbkma <[email protected]>2020-02-13 22:24:23 +0100
committerlukefromdc <[email protected]>2020-02-27 05:50:08 +0000
commit8de77e33ab168df33b2a4bc7a7fe45aed75e9040 (patch)
tree379e6ad7924cd65ffad2f7d0a8a2464618772940 /src/mate-calc.c
parent432a684f6139ec0029eff6469e2873c11cb9adc4 (diff)
downloadmate-calc-8de77e33ab168df33b2a4bc7a7fe45aed75e9040.tar.bz2
mate-calc-8de77e33ab168df33b2a4bc7a7fe45aed75e9040.tar.xz
add history view to show recent calculations.
add option to enable/disable history (disabled by default). add possibility to resize mate-calc if history is enabled.
Diffstat (limited to 'src/mate-calc.c')
-rw-r--r--src/mate-calc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mate-calc.c b/src/mate-calc.c
index 05e40dd..0c2645c 100644
--- a/src/mate-calc.c
+++ b/src/mate-calc.c
@@ -190,7 +190,7 @@ int main(int argc, char **argv)
MathEquation *equation;
MathButtons *buttons;
int accuracy = 9, word_size = 64, base = 10;
- gboolean show_tsep = FALSE, show_zeroes = FALSE;
+ gboolean show_tsep = FALSE, show_zeroes = FALSE, show_hist = FALSE;
MpDisplayFormat number_format;
MPAngleUnit angle_units;
ButtonMode button_mode;
@@ -213,6 +213,7 @@ int main(int argc, char **argv)
base = g_settings_get_int(g_settings_var, "base");
show_tsep = g_settings_get_boolean(g_settings_var, "show-thousands");
show_zeroes = g_settings_get_boolean(g_settings_var, "show-zeroes");
+ show_hist = g_settings_get_boolean(g_settings_var, "show-history");
number_format = g_settings_get_enum(g_settings_var, "number-format");
angle_units = g_settings_get_enum(g_settings_var, "angle-units");
button_mode = g_settings_get_enum(g_settings_var, "button-mode");
@@ -244,6 +245,7 @@ int main(int argc, char **argv)
window = math_window_new(equation);
buttons = math_window_get_buttons(window);
g_signal_connect(G_OBJECT(window), "quit", G_CALLBACK(quit_cb), NULL);
+ math_window_set_show_history(window, show_hist);
math_buttons_set_programming_base(buttons, base);
math_buttons_set_mode(buttons, button_mode); // FIXME: We load the basic buttons even if we immediately switch to the next type