Decouple strict breaks and postponing breaks. (#326)

Fix #316
This commit is contained in:
Andrew Jong 2019-06-24 16:44:34 -07:00 committed by Gobinath
parent f05bb53f25
commit 6ea693e5fe
2 changed files with 8 additions and 8 deletions

View File

@ -185,15 +185,15 @@ class BreakScreen(object):
toolbar_button.show()
# Add the buttons
if not self.strict_break:
if self.enable_postpone:
# Add postpone button
if self.enable_postpone:
btn_postpone = Gtk.Button(_('Postpone'))
btn_postpone.get_style_context().add_class('btn_postpone')
btn_postpone.connect('clicked', self.on_postpone_clicked)
btn_postpone.set_visible(True)
box_buttons.pack_start(btn_postpone, True, True, 0)
btn_postpone = Gtk.Button(_('Postpone'))
btn_postpone.get_style_context().add_class('btn_postpone')
btn_postpone.connect('clicked', self.on_postpone_clicked)
btn_postpone.set_visible(True)
box_buttons.pack_start(btn_postpone, True, True, 0)
if not self.strict_break:
# Add the skip button
btn_skip = Gtk.Button(_('Skip'))
btn_skip.get_style_context().add_class('btn_skip')

View File

@ -106,7 +106,7 @@ class SettingsDialog(object):
self.spin_postpone_duration.set_value(config.get('postpone_duration'))
self.spin_disable_keyboard_shortcut.set_value(config.get('shortcut_disable_time'))
self.switch_strict_break.set_active(config.get('strict_break'))
self.switch_postpone.set_active(config.get('allow_postpone') and not config.get('strict_break'))
self.switch_postpone.set_active(config.get('allow_postpone'))
self.switch_persist.set_active(config.get('persist_state'))
self.infobar_long_break_shown = False