Skip to content

Commit

Permalink
fix notification when keyboard layout changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Dec 15, 2016
1 parent 15a3843 commit 88dea0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keyboard/src/lib/y2country/widgets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def label
_("&Keyboard Layout")
end

# forces widget to report immediatelly after value changed.
def opt
[:notify]
end

def init
if Yast::Keyboard.user_decision
self.value = Yast::Keyboard.current_kbd
Expand Down
4 changes: 4 additions & 0 deletions keyboard/test/widgets_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
subject.handle
end

it "passes notify option to widget" do
expect(subject.opt).to eq [:notify]
end

it "stores keyboard layout" do
expect(Yast::Keyboard).to receive(:Set)

Expand Down

0 comments on commit 88dea0a

Please sign in to comment.