~martijnbraam/numberstation

11a1ae3bec207ec85140deb112f983388ebcd49b — Andrey Skvortsov 1 year, 9 months ago 6500431
Use GtkSpinbox instead of GtkAdjustment to get integer value

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
1 files changed, 4 insertions(+), 4 deletions(-)

M numberstation/window.py
M numberstation/window.py => numberstation/window.py +4 -4
@@ 42,8 42,8 @@ class NumberstationWindow:
        self.add_secret = builder.get_object("add_secret")
        self.add_totp = builder.get_object("add_totp")
        self.add_counter = builder.get_object("add_counter")
        self.add_length_adj = builder.get_object("add_length_adj")
        self.add_timer_adj = builder.get_object("add_timer_adj")
        self.add_length = builder.get_object("add_length")
        self.add_timer = builder.get_object("add_timer")
        self.add_save = builder.get_object("add_save")

        self.hamburgermenu = builder.get_object("hamburgermenu")


@@ 291,8 291,8 @@ class NumberstationWindow:
        name = self.add_name.get_text().strip()
        type = 'totp' if self.add_totp.get_active() else 'hotp'
        secret = self.add_secret.get_text().strip()
        duration = self.add_timer_adj.get_value()
        length = self.add_length_adj.get_value()
        duration = self.add_timer.get_value_as_int()
        length = self.add_length.get_value_as_int()
        counter = self.add_counter.get_text().strip()
        if counter == '':
            counter = None