]> cygwin.com Git - cygwin-apps/setup.git/blobdiff - PickCategoryLine.cc
Use solver to check for problems and produce a list of package transactions
[cygwin-apps/setup.git] / PickCategoryLine.cc
index 18aa0337bf0c0842d6261c3b6735093da738a467..24fecb348a21cb57b5b93ad2a199befecb63b99a 100644 (file)
@@ -38,9 +38,7 @@ PickCategoryLine::paint (HDC hdc, HRGN hUpdRgn, int x, int y, int row, int show_
       int by = r + (theView.tm.tmHeight / 2) - 5;
 
       // draw the '+' or '-' box
-      SelectObject (theView.bitmap_dc, 
-                      (collapsed ? theView.bm_treeplus : theView.bm_treeminus));
-      BitBlt (hdc, x2, by, 11, 11, theView.bitmap_dc, 0, 0, SRCAND);
+      theView.DrawIcon (hdc, x2, by, (collapsed ? theView.bm_treeplus : theView.bm_treeminus));
 
       // draw the category name
       TextOut (hdc, x2 + 11 + ICON_MARGIN, r, cat.first.c_str(), cat.first.size());
@@ -52,9 +50,8 @@ PickCategoryLine::paint (HDC hdc, HRGN hUpdRgn, int x, int y, int row, int show_
        }
       
       // draw the 'spin' glyph
-      SelectObject (theView.bitmap_dc, theView.bm_spin);
       spin_x = x2 + 11 + ICON_MARGIN + labellength + ICON_MARGIN;
-      BitBlt (hdc, spin_x, by, 11, 11, theView.bitmap_dc, 0, 0, SRCAND);
+      theView.DrawIcon (hdc, spin_x, by, theView.bm_spin);
       
       // draw the caption ('Default', 'Install', etc)
       TextOut (hdc, spin_x + SPIN_WIDTH + ICON_MARGIN, r, 
@@ -115,8 +112,6 @@ PickCategoryLine::click (int const myrow, int const ClickedRow, int const x)
        {
          ++current_default;
          
-          packagedb().markUnVisited();
-
          return set_action (current_default);
        }
       else
@@ -144,9 +139,11 @@ PickCategoryLine::click (int const myrow, int const ClickedRow, int const x)
 int 
 PickCategoryLine::set_action (packagemeta::_actions action)
 {
+  theView.GetParent ()->SetBusy ();
   current_default = action;
   int accum_diff = 0;
   for (size_t n = 0; n < bucket.size (); n++)
       accum_diff += bucket[n]->set_action (current_default);
+  theView.GetParent ()->ClearBusy ();
   return accum_diff;
 }
This page took 0.025066 seconds and 5 git commands to generate.