[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/ksysguard/gui
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2002-12-31 11:15:51
[Download RAW message or body]

CVS commit by tokoe: 


add support for localized number representation to ProcessList
fixed KLocale::formatNumber() useage


  M +4 -2      SensorDisplayLib/ProcessList.cc   1.9
  M +5 -5      ksysguard.cc   1.65


--- kdebase/ksysguard/gui/ksysguard.cc  #1.64:1.65
@@ -464,6 +464,6 @@ void TopLevel::answerReceived( int id, c
       mUsed = answer.toLong();
       s = i18n( "Memory: %1 %2 used, %3 %4 free" )
-              .arg( KGlobal::locale()->formatNumber( mUsed ) ).arg( unit )
-              .arg( KGlobal::locale()->formatNumber( mFree ) ).arg( unit );
+              .arg( KGlobal::locale()->formatNumber( mUsed, 0 ) ).arg( unit )
+              .arg( KGlobal::locale()->formatNumber( mFree, 0 ) ).arg( unit );
       statusBar()->changeItem( s, 1 );
       break;
@@ -472,6 +472,6 @@ void TopLevel::answerReceived( int id, c
       sFree = answer.toLong();
       s = i18n( "Swap: %1 %2 used, %3 %4 free" )
-              .arg( KGlobal::locale()->formatNumber( sTotal - sFree ) ).arg( unit )
-              .arg( KGlobal::locale()->formatNumber( sFree ) ).arg( unit );
+              .arg( KGlobal::locale()->formatNumber( sTotal - sFree, 0 ) ).arg( unit )
+              .arg( KGlobal::locale()->formatNumber( sFree, 0 ) ).arg( unit );
       statusBar()->changeItem( s, 2 );
       break;

--- kdebase/ksysguard/gui/SensorDisplayLib/ProcessList.cc  #1.8:1.9
@@ -594,4 +594,6 @@ ProcessList::addProcess(KSGRD::SensorPSL
                 else if ( columnTypes[col] == "f" )
       pli->setText( col, KGlobal::locale()->formatNumber( (*p)[col].toFloat() ) );
+    else if ( columnTypes[col] == "D" )
+      pli->setText( col, KGlobal::locale()->formatNumber( (*p)[col].toDouble(), 0 ) );
     else
                         pli->setText(col, (*p)[col]);
@@ -646,5 +648,5 @@ ProcessList::addColumn(const QString& la
                 sortFunc.append(0);
         }
-        else if (type == "d")
+        else if (type == "d" || type == "D")
         {
                 setColumnAlignment(col, AlignRight);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic