summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2012-05-03 03:30:59 +0800
committerDaniel Hartwig <mandyke@gmail.com>2012-05-03 11:26:37 +0800
commit02370c63dd8409705bd44f9ab1260644929253da (patch)
tree92253ed0a182d22ffd400fd866702338a2df5a2b /src
parent327559344f475a54a5f2c6e8d28fa75247aef637 (diff)
downloadaptitude-02370c63dd8409705bd44f9ab1260644929253da.tar.gz
Preview screen ignores Pkg-Display-Limit
Previously it would apply that limit if UI::Preview-Limit was not set. This was causing confusion and it is more useful to have these as two clearly distinct settings. LP: #381507
Diffstat (limited to 'src')
-rw-r--r--src/ui.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui.cc b/src/ui.cc
index 312cb8b4..a94ed97d 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -1374,10 +1374,9 @@ static void do_show_preview()
grp=new pkg_grouppolicy_mode_factory(new pkg_grouppolicy_end_factory);
}
- if(aptcfg->Exists(PACKAGE "::UI::Preview-Limit"))
- active_preview_tree=pkg_tree::create(grpstr.c_str(), grp, cw::util::transcode(aptcfg->Find(PACKAGE "::UI::Preview-Limit").c_str()));
- else
- active_preview_tree=pkg_tree::create(grpstr.c_str(), grp);
+ const std::wstring limitstr =
+ cw::util::transcode(aptcfg->Find(PACKAGE "::UI::Preview-Limit", ""));
+ active_preview_tree=pkg_tree::create(grpstr.c_str(), grp, limitstr.c_str());
active_preview=make_default_view(active_preview_tree,
&active_preview_tree->selected_signal,