summaryrefslogtreecommitdiff
path: root/timerapplet
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-07-28 10:52:58 +0200
committerraveit65 <[email protected]>2020-08-28 13:01:31 +0200
commit97cbce5b71f22c5bd435b249a0e9df07880cda7f (patch)
tree8b2babad8688df5373814b4e42c85d991c0e272a /timerapplet
parent6e731efc0e2471b9ceae29c5a9eedac94bb5b770 (diff)
downloadmate-applets-97cbce5b71f22c5bd435b249a0e9df07880cda7f.tar.bz2
mate-applets-97cbce5b71f22c5bd435b249a0e9df07880cda7f.tar.xz
timerapplet: Use gtk_spin_button_get_value_as_int for int values
Diffstat (limited to 'timerapplet')
-rw-r--r--timerapplet/timerapplet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/timerapplet/timerapplet.c b/timerapplet/timerapplet.c
index bf862e33..0948be43 100644
--- a/timerapplet/timerapplet.c
+++ b/timerapplet/timerapplet.c
@@ -288,11 +288,11 @@ timer_about_callback (GtkAction *action, TimerApplet *applet)
static void
timer_spin_button_value_changed (GtkSpinButton *spinbutton, TimerApplet *applet)
{
- gint duration = 0;
+ gint duration;
- duration += gtk_spin_button_get_value (applet->hours) * 3600;
- duration += gtk_spin_button_get_value (applet->minutes) * 60;
- duration += gtk_spin_button_get_value (applet->seconds);
+ duration = gtk_spin_button_get_value_as_int (applet->seconds);
+ duration += gtk_spin_button_get_value_as_int (applet->minutes) * 60;
+ duration += gtk_spin_button_get_value_as_int (applet->hours) * 3600;
g_settings_set_int (applet->settings, DURATION_KEY, duration);
}