~ubuntu-branches/ubuntu/lucid/aptitude/lucid-proposed

« back to all changes in this revision

Viewing changes to src/solution_screen.cc

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-05-27 10:28:10 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080527102810-pxc090mnjkr4xlek
Tags: 0.4.11.2-1ubuntu1
* Merge from debian unstable, remaining changes:
  - 03_branding.dpatch: ubuntu branding
  - 04_changelog.dpatch: take changelogs from changelogs.ubuntu.com
  - 07_hide_recommends_warning.dpatch: do not show a warning about
    missing recommends
  - 08_ubuntu_default_source.dpatch: do not clean lists directory
    on transient network failures
  - 11_gxx43.dpatch:build tests without -Werror
* Updated:
  - 03_branding.dpatch
* Disabled 07_hide_recommends warning because we do install 
  recommends now by default too

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// solution_screen.cc
2
2
//
3
 
//   Copyright (C) 2005, 2007 Daniel Burrows
 
3
//   Copyright (C) 2005, 2007-2008 Daniel Burrows
4
4
//
5
5
//   This program is free software; you can redistribute it and/or
6
6
//   modify it under the terms of the GNU General Public License as
45
45
#include <cwidget/widgets/subtree.h>
46
46
#include <cwidget/widgets/table.h>
47
47
 
 
48
#include <algorithm>
 
49
 
48
50
typedef generic_solution<aptitude_universe> aptitude_solution;
49
51
 
50
52
using namespace std;
156
158
 
157
159
  root->add_child(resolvers);
158
160
 
159
 
  for(aptitude_resolver_package::version_iterator
160
 
        vi = d.get_source().get_package().versions_begin(); !vi.end(); ++vi)
161
 
    if(*vi != d.get_source())
162
 
      {
163
 
        aptitude_solution::action act(*vi, d, true, 0);
 
161
  // Soft dependencies (i.e., Recommends) can't be "fixed" by removing
 
162
  // or upgrading the depending package.
 
163
  if(!d.is_soft())
 
164
    {
 
165
      for(aptitude_resolver_package::version_iterator
 
166
            vi = d.get_source().get_package().versions_begin(); !vi.end(); ++vi)
 
167
        if(*vi != d.get_source())
 
168
          {
 
169
            aptitude_solution::action act(*vi, d, true, 0);
164
170
 
165
 
        resolvers->add_child(new solution_act_item(act,
166
 
                                                   sigc::slot1<void, cw::fragment *>(),
167
 
                                                   sigc::slot1<void, aptitude_resolver_dep>()));
168
 
      }
 
171
            resolvers->add_child(new solution_act_item(act,
 
172
                                                       sigc::slot1<void, cw::fragment *>(),
 
173
                                                       sigc::slot1<void, aptitude_resolver_dep>()));
 
174
          }
 
175
    }
169
176
 
170
177
  for(aptitude_resolver_dep::solver_iterator
171
178
        si = d.solvers_begin(); !si.end(); ++si)
569
576
{
570
577
  cw::table_ref rval     = cw::table::create();
571
578
 
572
 
  cw::label_ref l        = cw::label::create(L"");
 
579
  // Declaring an empty string variable is a workaround for strange
 
580
  // behavior in g++ 4.3.
 
581
  std::wstring empty_string;
 
582
  cw::label_ref l        = cw::label::create(empty_string);
573
583
  menu_tree_ref info_tree = solution_undo_tree::create();
574
584
 
575
585
  solution_examiner_ref examiner