Bug 68221 - summaries in catalogmanager next to the folders
Summary: summaries in catalogmanager next to the folders
Status: RESOLVED FIXED
Alias: None
Product: kbabel
Classification: Miscellaneous
Component: CatalogManager (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Stanislav Visnovsky
URL:
Keywords:
: 65349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-14 17:20 UTC by Erik Kj
Modified: 2003-11-27 08:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Kj 2003-11-14 17:20:16 UTC
Version:           1.3 (using KDE 3.1.93 (CVS >= 20031111), compiled sources)
Compiler:          gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
OS:          Linux (i686) release 2.4.20-20.9

It used to be :-) there was a summary for every folder of how many untranslated and fuzzies are in there. As it is now, I have to open each, look at the situation and decide whether I will wait a couple of days. It might also be done with more colors. Green means everything ok, blue almost ok or something like that. It may sound funny, but when you are maintainging a lot of files having to open and close so many folders becomes a drag.
Comment 1 Stanislav Visnovsky 2003-11-14 18:06:22 UTC
Subject: kdesdk/kbabel/catalogmanager

CVS commit by nanulo: 

Fixed #68221 - KBabel catalog manager does not show file counts for directories.

It does now, but without coloring - too late for that.

Reviewed by llunak

CCMAIL: 68221-done@bugs.kde.org


  M +37 -6     catmanlistitem.cpp   1.23


--- kdesdk/kbabel/catalogmanager/catmanlistitem.cpp  #1.22:1.23
@@ -305,4 +305,24 @@ void CatManListItem::update(bool showPoI
              QDir dir=_primary.dir();
              setText(COL_NAME,dir.dirName());
+             
+             // count the childen numbers
+             int fuzzy = 0;
+             int untrans = 0;
+             int total = 0;
+             
+             CatManListItem* ch = static_cast<CatManListItem*>(firstChild ());
+             
+             while (ch)
+             {
+                fuzzy += ch->fuzzy ();
+                untrans += ch->untranslated ();
+                total += ch->total ();
+                ch = static_cast<CatManListItem*>(ch->nextSibling());
+             }
+
+             setText(COL_FUZZY,QString::number(fuzzy));
+             setText(COL_UNTRANS,QString::number(untrans));
+             setText(COL_TOTAL,QString::number(total));
+
              //setSelectable(false);
              _type=Dir;
@@ -353,5 +373,4 @@ void CatManListItem::update(bool showPoI
                 if(PoInfo::info(_primary.absFilePath(),poInfo,_wordList,updateWordList)==OK)
                 {
-                    kdDebug(KBABEL_CATMAN) << "For " << poFile() << " we found " << _wordList.size() << " words" << endl;
                     if( _view->isStopped() ) return;
                     if( updateWordList) _wordListUpdated = true;
@@ -393,12 +412,8 @@ void CatManListItem::update(bool showPoI
                 setPixmap(COL_NAME,icon);
 
-                // if the status changed, update the parent item
-                if(needWork != neededWork)
-                {
                     updateParent=true;
                 }
              }
           }
-       }
            // only the template exists
        else if(_template.exists())
@@ -411,4 +426,18 @@ void CatManListItem::update(bool showPoI
              _type=Dir;
 
+             // count the childen numbers
+             int total = 0;
+             
+             CatManListItem* ch = static_cast<CatManListItem*>(firstChild ());
+             
+             while (ch)
+             {
+                total += ch->total ();
+                ch = static_cast<CatManListItem*>(ch->nextSibling());
+             }
+
+             setText(COL_TOTAL,QString::number(total));
+
+
              QPixmap icon;
              if(!isOpen())
@@ -453,4 +482,6 @@ void CatManListItem::update(bool showPoI
              }
              setPixmap(COL_NAME,ICON_MISSING);
+             
+             updateParent = true;
           }
        }


Comment 2 Stanislav Visnovsky 2003-11-27 08:53:53 UTC
*** Bug 65349 has been marked as a duplicate of this bug. ***