Skip to content

Commit

Permalink
Merge pull request #246 from aschnell/master
Browse files Browse the repository at this point in the history
- added error handing for viewing log files (bnc#876895)
  • Loading branch information
aschnell committed May 13, 2014
2 parents 5bbfc91 + 82014fd commit 4441607
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
20 changes: 11 additions & 9 deletions library/system/src/clients/view_anymsg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,25 @@ def main
)


@file_contents = ""
@go_on = true

# wait until user clicks "OK"
# check if ComboBox selected and change view accordingly

while @go_on
# read file contents
@file_contents = Convert.to_string(
SCR.Read(path(".target.string"), @filename)
)

# Fill the LogView with file contents
UI.ChangeWidget(Id(:log), :Value, @file_contents)
# read file content
file_content = SCR.Read(path(".target.string"), @filename)

if file_content == nil
file_content = _("File not found.")
end

# Fill the LogView with file content
UI.ChangeWidget(Id(:log), :Value, file_content)

@heading = Builtins.sformat(_("System Log (%1)"), @filename)
UI.ChangeWidget(Id(:log), :Label, @heading)
heading = Builtins.sformat(_("System Log (%1)"), @filename)
UI.ChangeWidget(Id(:log), :Label, heading)

# wait for user input

Expand Down
6 changes: 6 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 13 12:03:12 CEST 2014 - aschnell@suse.de

- added error handing for viewing log files (bnc#876895)
- 3.1.63

-------------------------------------------------------------------
Mon May 12 12:38:40 UTC 2014 - jsrain@suse.cz

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 3.1.62
Version: 3.1.63
Release: 0
URL: https://github.com/yast/yast-yast2

Expand Down

0 comments on commit 4441607

Please sign in to comment.