Skip to content

Commit

Permalink
Merge pull request #294 from yast/hide_export
Browse files Browse the repository at this point in the history
Hide export
  • Loading branch information
jreidinger committed Jun 29, 2015
2 parents bb5acd6 + 60fbd68 commit 06e9830
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions package/yast2-installation.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 29 08:41:17 UTC 2015 - jreidinger@suse.com

- add ability to hide export button (fate#315161)
- 3.1.146

-------------------------------------------------------------------
Wed Jun 17 09:29:09 CEST 2015 - locilka@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-installation.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-installation
Version: 3.1.145
Version: 3.1.146
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
9 changes: 7 additions & 2 deletions src/lib/installation/proposal_runner.rb
Expand Up @@ -74,6 +74,9 @@ def run
return :auto
end

args = (Yast::WFM.Args || []).first || {}
@hide_export = args["hide_export"]

log.info "Installation step #2"
@proposal_mode = Yast::GetInstArgs.proposal

Expand Down Expand Up @@ -655,6 +658,8 @@ def build_dialog
# menu button
MenuButton(Id(:menu_dummy), _("&Yast::Change..."), [Item(Id(:dummy), "")])
)
elsif @hide_export
change_point = Empty()
else
change_point = PushButton(
Id(:export_config),
Expand Down Expand Up @@ -769,8 +774,8 @@ def submod_descriptions_and_build_menu
end

# menu button item
menu_list << Item(Id(:reset_to_defaults), _("&Reset to defaults")) <<
Item(Id(:export_config), _("&Export Configuration"))
menu_list << Item(Id(:reset_to_defaults), _("&Reset to defaults"))
menu_list << Item(Id(:export_config), _("&Export Configuration")) unless @hide_export

# menu button
Yast::UI.ReplaceWidget(
Expand Down

0 comments on commit 06e9830

Please sign in to comment.