Skip to content

Commit

Permalink
Added Network Configuration button to Source Dialogs.
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Apr 1, 2016
1 parent 6c2bc90 commit 23d54fd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
7 changes: 7 additions & 0 deletions package/yast2-packager.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Apr 1 12:37:51 UTC 2016 - knut.anderssen@suse.com

- Added [Network Configuration] button to Source Dialog for
installation or upgrade modes. (fate#319716)
- 3.1.92

-------------------------------------------------------------------
Fri Mar 18 11:46:53 UTC 2016 - lslezak@suse.cz

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


Name: yast2-packager
Version: 3.1.91
Version: 3.1.92
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
16 changes: 14 additions & 2 deletions src/modules/SourceDialogs.rb
Expand Up @@ -87,6 +87,7 @@ def main
Yast.import "ProductControl"
Yast.import "ProductFeatures"
Yast.import "Stage"
Yast.import "WFM"

# common functions / data

Expand Down Expand Up @@ -470,6 +471,7 @@ def RepoNameValidate(key, event)
end
true
end

# Get widget description map
# @return widget description map
def RepoNameWidget
Expand Down Expand Up @@ -2013,6 +2015,14 @@ def scc_repos_widget
display_scc ? Left(RadioButton(Id(:sccrepos), _(WIDGET_LABELS[:sccrepos]))) : Empty()
end

def network_button
if Mode.installation || Mode.live_installation || Mode.update
Right(PushButton(Id(:network), _("Network Configuration...")))
else
Empty()
end
end

# FIXME: two almost same definitions in the same function smell bad
def SelectRadioWidgetOpt(download_widget)
contents = HBox(
Expand Down Expand Up @@ -2215,6 +2225,8 @@ def SelectHandle(key, event)
when :add_addon
RefreshTypeWidgets()
return nil
when :network
Yast::WFM.CallFunction("inst_lan", [{ "skip_detection" => true }])
end

return nil if event["ID"] != :next && event["ID"] != :ok
Expand Down Expand Up @@ -2625,7 +2637,7 @@ def TypeDialog
{
"widget_names" => ["select"],
"widget_descr" => Widgets(),
"contents" => VBox("select"),
"contents" => VBox(network_button, "select"),
"caption" => caption,
"back_button" => Label.BackButton,
"next_button" => Label.NextButton,
Expand All @@ -2649,7 +2661,7 @@ def TypeDialogDownloadOpt
{
"widget_names" => ["select_dl"],
"widget_descr" => Widgets(),
"contents" => VBox("select_dl"),
"contents" => VBox(network_button, "select_dl"),
"caption" => caption,
"back_button" => Label.BackButton,
"next_button" => Label.NextButton,
Expand Down

0 comments on commit 23d54fd

Please sign in to comment.