Skip to content

Commit

Permalink
Merge pull request #102 from yast/fix_keyboard_widget_notify
Browse files Browse the repository at this point in the history
Fix keyboard widget notify
  • Loading branch information
jreidinger committed Dec 15, 2016
2 parents 4bc8f93 + 16f45d5 commit acbb448
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 14 deletions.
5 changes: 5 additions & 0 deletions keyboard/src/lib/y2country/widgets.rb
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
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
7 changes: 7 additions & 0 deletions package/yast2-country.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Dec 15 10:15:51 UTC 2016 - jreidinger@suse.com

- fix notification on new keyboard widget, so keyboard layout is
immediatelly changed (FATE#321754)
- 3.1.33.2

-------------------------------------------------------------------
Tue Dec 13 13:41:10 UTC 2016 - jreidinger@suse.com

Expand Down
34 changes: 20 additions & 14 deletions package/yast2-country.spec
@@ -1,7 +1,7 @@
#
# spec file for package yast2-country
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -17,47 +17,53 @@


Name: yast2-country
Version: 3.1.33.1
Version: 3.1.33.2
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2

Group: System/YaST
License: GPL-2.0
#policy files for YaPI dbus interface
Source1: org.opensuse.yast.modules.yapi.time.policy
Source2: org.opensuse.yast.modules.yapi.language.policy
BuildRequires: perl-XML-Writer update-desktop-files yast2-testsuite yast2 yast2-perl-bindings
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: perl-XML-Writer
BuildRequires: polkit-devel
BuildRequires: update-desktop-files
BuildRequires: yast2
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-perl-bindings
BuildRequires: yast2-testsuite
# For tests
BuildRequires: rubygem(rspec)
# Fix to bnc#891053 (proper reading of ".target.yast2" on chroots)
BuildRequires: yast2-core >= 3.1.12
# RSpec extensions for YaST
BuildRequires: yast2-ruby-bindings >= 3.1.26

Requires: yast2-trans-stats yast2-perl-bindings timezone
Requires: timezone
Requires: yast2-perl-bindings
Requires: yast2-trans-stats
# XVersion.ycp
# Message.updating_configuration, Message.takes_a_while
Requires: yast2 >= 3.1.94
Requires: yast2 >= 3.1.94
# Pkg::SetPackageLocale, Pkg::GetTextLocale
Requires: yast2-pkg-bindings >= 2.15.3
# IconPath support for MultiSelectionBox
Requires: yast2-core >= 2.16.28
Requires: yast2-core >= 2.16.28
# new API of ntp-client_proposal.ycp
Conflicts: yast2-ntp-client < 2.18.0
Conflicts: yast2-ntp-client < 2.18.0
# wrapper_storage.ycp
Requires: yast2-packager >= 2.23.3
# VMware detection (.probe.is_vmware)
Requires: yast2-hardware-detection >= 3.1.6

Requires: yast2-country-data
Requires: yast2-country-data

Requires: yast2-ruby-bindings >= 1.0.0

Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone)
Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone)
License: GPL-2.0
Group: System/YaST

%description
Country specific data and configuration modules (language, keyboard,
Expand All @@ -81,7 +87,6 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/polkit-1/actions
install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/polkit-1/actions/
install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/usr/share/polkit-1/actions/


# common
%files
%defattr(-,root,root)
Expand Down Expand Up @@ -112,7 +117,7 @@ install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/usr/share/polkit-1/actions/
%package data
Requires: yast2-ruby-bindings >= 1.0.0

Summary: YaST2 - Data files for Country settings
Summary: YaST2 - Data files for Country settings
Group: System/YaST

%description data
Expand All @@ -125,3 +130,4 @@ functions (Language module)
%{yast_ydatadir}/languages/*.ycp
%{yast_moduledir}/Language.rb

%changelog

0 comments on commit acbb448

Please sign in to comment.