Author: kmachalkova
Date: Tue Jan 20 16:57:38 2009
New Revision: 54830
URL: http://svn.opensuse.org/viewcvs/yast?rev=54830&view=rev
Log:
Speeding up item insertion, required for displaying
large tables (bnc#467586)
Modified:
branches/SuSE-Code-11-Branch/ncurses/VERSION
branches/SuSE-Code-11-Branch/ncurses/package/yast2-ncurses.changes
branches/SuSE-Code-11-Branch/ncurses/src/NCTable.cc
branches/SuSE-Code-11-Branch/ncurses/src/NCTable.h
Modified: branches/SuSE-Code-11-Branch/ncurses/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ncurses/VERSION?rev=54830&r1=54829&r2=54830&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/ncurses/VERSION (original)
+++ branches/SuSE-Code-11-Branch/ncurses/VERSION Tue Jan 20 16:57:38 2009
@@ -1 +1 @@
-2.17.12
+2.17.13
Modified: branches/SuSE-Code-11-Branch/ncurses/package/yast2-ncurses.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ncurses/package/yast2-ncurses.changes?rev=54830&r1=54829&r2=54830&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/ncurses/package/yast2-ncurses.changes (original)
+++ branches/SuSE-Code-11-Branch/ncurses/package/yast2-ncurses.changes Tue Jan 20 16:57:38 2009
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Tue Jan 20 16:34:33 CET 2009 - kmachalkova@suse.cz
+
+- Table widget: two variants of addItem method (all-at-once and
+ one-by-one) + YTable::addItems reimplemented in order to speed
+ up item insertion (table must not be redrawn on each insert)
+ (bnc#467586)
+- V 2.17.13
+
+-------------------------------------------------------------------
Mon Dec 15 13:18:54 CET 2008 - kmachalkova@suse.cz
- Fixed tree items indexing to ensure selecting the correct item
Modified: branches/SuSE-Code-11-Branch/ncurses/src/NCTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/ncurses/src/NCTable.cc?rev=54830&r1=54829&r2=54830&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/ncurses/src/NCTable.cc (original)
+++ branches/SuSE-Code-11-Branch/ncurses/src/NCTable.cc Tue Jan 20 16:57:38 2009
@@ -169,12 +169,19 @@
_header[ col ] = NCstring( s );
}
+// Append item (as pointed to by 'yitem') in one-by-one
+// fashion i.e. the whole table gets redrawn afterwards.
+void NCTable::addItem( YItem *yitem)
+{
+ addItem(yitem, false); // add just this one
+}
-
-// Append item (as pointed to by 'yitem') to a table
-// (create new table line consisting of individual cells)
-
-void NCTable::addItem( YItem *yitem )
+// Append item (as pointed to by 'yitem') to a table.
+// This creates visual representation of new table line
+// consisting of individual cells. Depending on the 2nd
+// param, table is redrawn. If 'allAtOnce' is set to
+// true, it is up to the caller to redraw the table.
+void NCTable::addItem( YItem *yitem, bool allAtOnce )
{
YTableItem *item = dynamic_cast