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

Daniel Burrows dburrows@costa.debian.org
Sat, 02 Jul 2005 12:30:00 +0000


Author: dburrows
Date: Sat Jul  2 12:29:57 2005
New Revision: 3524

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/edit_pkg_hier.cc
   branches/aptitude-0.3/aptitude/src/edit_pkg_hier.h
Log:
Update the package hierarchy editor for wide characters.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Jul  2 12:29:57 2005
@@ -1,5 +1,9 @@
 2005-07-02  Daniel Burrows  <dburrows@debian.org>
 
+	* src/edit_pkg_hier.cc, src/edit_pkg_hier.h:
+
+	  Update the package hierarchy editor for wide characters.
+
 	* src/download_list.cc, src/download_list.h:
 
 	  Update the download_list for wide characters.

Modified: branches/aptitude-0.3/aptitude/src/edit_pkg_hier.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/edit_pkg_hier.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/edit_pkg_hier.cc	Sat Jul  2 12:29:57 2005
@@ -49,16 +49,16 @@
     set_item(_item);
   }
 
-  bool dispatch_char(chtype ch, vs_tree *owner)
+  bool dispatch_key(const key &k, vs_tree *owner)
   {
-    if(global_bindings.key_matches(ch, "PushButton") ||
-       global_bindings.key_matches(ch, "Confirm"))
+    if(global_bindings.key_matches(k, "PushButton") ||
+       global_bindings.key_matches(k, "Confirm"))
       {
 	selected=!selected;
 	vscreen_update();
       }
     else
-      return vs_treeitem::dispatch_char(ch, owner);
+      return vs_treeitem::dispatch_key(k, owner);
 
     return true;
   }
@@ -309,16 +309,16 @@
   fclose(f);
 }
 
-bool vs_hier_editor::handle_char(chtype ch)
+bool vs_hier_editor::handle_key(const key &k)
 {
-  if(global_bindings.key_matches(ch, "SaveHier"))
+  if(global_bindings.key_matches(k, "SaveHier"))
     {
       const char *cfgloc=getenv("HOME");
 
       string cfgfile=string(cfgloc)+"/.aptitude/function_pkgs";
       save_hier(cfgfile);
     }
-  else if(global_bindings.key_matches(ch, "Quit"))
+  else if(global_bindings.key_matches(k, "Quit"))
     {
       if(item)
 	{
@@ -331,7 +331,7 @@
 
       hide();
     }
-  else if(global_bindings.key_matches(ch, "Commit"))
+  else if(global_bindings.key_matches(k, "Commit"))
     {
       if(item)
 	{
@@ -344,10 +344,10 @@
 
       commit_changes();
     }
-  else if(global_bindings.key_matches(ch, "Abort"))
+  else if(global_bindings.key_matches(k, "Abort"))
     hide();
   else
-    return vs_tree::handle_char(ch);
+    return vs_tree::handle_key(k);
 
   return true;
 }

Modified: branches/aptitude-0.3/aptitude/src/edit_pkg_hier.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/edit_pkg_hier.h	(original)
+++ branches/aptitude-0.3/aptitude/src/edit_pkg_hier.h	Sat Jul  2 12:29:57 2005
@@ -53,7 +53,7 @@
 
   void handle_reload();
 protected:
-  virtual bool handle_char(chtype ch);
+  virtual bool handle_key(const key &k);
 
   void paint(const style &st);
 public: