diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2013-09-09 18:37:24 +0200 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2013-09-09 18:37:24 +0200 |
commit | eb8576ac9c18fdc24fc0bb741e63f41b2e14a831 (patch) | |
tree | f5610d6bbd9dcd68839382a9e3aa646a63c50a8c | |
parent | 1cd3d6ab9508d1303999531ca63dfce4eb7298b8 (diff) |
mi-info: code cleanups
First reset the info pane and then check/update. This fixes not resetting the
tabs on info==null.
-rw-r--r-- | src/mi-info.vala | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mi-info.vala b/src/mi-info.vala index 1f06fdc..a03cf3d 100644 --- a/src/mi-info.vala +++ b/src/mi-info.vala @@ -355,7 +355,16 @@ public class MediaInfo.Info : Box // sort streams ArrayList<string> sids = new ArrayList<string> (); int six; - int page_offset; + int page_offset = 0; + + // reset notebooks + if (compact_mode) { + clear_notebook (all_streams); + } else { + clear_notebook (video_streams); + clear_notebook (audio_streams); + clear_notebook (subtitle_streams); + } if (info == null) { container_caps.set_text (""); @@ -390,7 +399,7 @@ public class MediaInfo.Info : Box debug ("stream[%d:%s]: %s", i, sinfo.get_stream_type_nick(), sinfo.get_caps ().to_string ()); } */ - // get stream info + // do container streams sinfo = info.get_stream_info (); if (sinfo != null) { caps = sinfo.get_caps (); @@ -401,16 +410,6 @@ public class MediaInfo.Info : Box // irks: we can also have the toc on a *_stream } - // reset notebooks - if (compact_mode) { - clear_notebook (all_streams); - } else { - clear_notebook (video_streams); - clear_notebook (audio_streams); - clear_notebook (subtitle_streams); - } - page_offset = 0; - // do video streams nb = compact_mode ? all_streams : video_streams; l = info.get_video_streams (); |