[Aptitude-svn-commit] r4135 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows at costa.debian.org
Tue Sep 20 19:07:27 UTC 2005


Author: dburrows
Date: Tue Sep 20 19:07:24 2005
New Revision: 4135

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/solution_screen.cc
Log:
Manage the auxillary status areas with the vs_tree and vs_multiplex changes.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Tue Sep 20 19:07:24 2005
@@ -1,5 +1,10 @@
 2005-09-20  Daniel Burrows  <dburrows at debian.org>
 
+	* src/solution_screen.cc:
+
+	  Use the changes to vs_tree and vs_multiplex to correctly manage
+	  the auxillary status areas.
+
 	* src/vscreen/vs_multiplex.cc, src/vscreen/vs_multiplex.h:
 
 	  Add a signal that is emitted when the visible widget changes.

Modified: branches/aptitude-0.3/aptitude/src/solution_screen.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/solution_screen.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/solution_screen.cc	Tue Sep 20 19:07:24 2005
@@ -853,6 +853,23 @@
     story_tree->set_root(new vs_staticitem(s, L""), true);
   }
 
+  /** Send highlighted/unhighlighted messages to the subwidgets so
+   *  that the short description ends up correct.
+   */
+  void update_highlights()
+  {
+    if(solution_tree->get_visible())
+      {
+	story_tree->unhighlight_current();
+	solution_tree->highlight_current();
+      }
+    else if(story_tree->get_visible())
+      {
+	solution_tree->unhighlight_current();
+	story_tree->highlight_current();
+      }
+  }
+
 protected:
   solution_examiner(const sigc::slot1<void, fragment *> &_set_short_description)
     : vs_multiplex(false),
@@ -868,6 +885,8 @@
     cache_closed.connect(sigc::mem_fun(*this, &solution_examiner::update));
     cache_reloaded.connect(sigc::mem_fun(*this, &solution_examiner::handle_cache_reload));
 
+    cycled.connect(sigc::mem_fun(*this, &solution_examiner::update_highlights));
+
     update();
   }
 
@@ -931,6 +950,8 @@
 	solution_tree->set_root(make_solution_tree(sol, set_short_description));
 	story_tree->set_root(make_story_tree(sol, set_short_description));
       }
+
+    update_highlights();
   }
 };
 typedef ref_ptr<solution_examiner> solution_examiner_ref;



More information about the Aptitude-svn-commit mailing list