[Kita-svn] [2390] remove TODOs

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 7月 11日 (土) 08:07:39 JST


Revision: 2390
          http://sourceforge.jp/projects/kita/svn/view?view=rev&revision=2390
Author:   nogu
Date:     2009-07-11 08:07:39 +0900 (Sat, 11 Jul 2009)

Log Message:
-----------
remove TODOs

Modified Paths:
--------------
    kita/branches/KITA-KDE4/kita/src/bbsview.cpp

Modified: kita/branches/KITA-KDE4/kita/src/bbsview.cpp
===================================================================
--- kita/branches/KITA-KDE4/kita/src/bbsview.cpp	2009-07-10 21:59:58 UTC (rev 2389)
+++ kita/branches/KITA-KDE4/kita/src/bbsview.cpp	2009-07-10 23:07:39 UTC (rev 2390)
@@ -95,8 +95,8 @@
     QPalette palette = m_boardList->viewport() ->palette();
     m_textColor = palette.text();
     m_baseColor = palette.base();
-//    m_backColor = m_boardList->viewport() ->paletteBackgroundColor(); // TODO
-//    m_altColor = m_boardList->alternateBackground();
+    m_backColor = m_boardList->viewport()->palette().color(QPalette::Background);
+    m_altColor = m_boardList->alternateBackground();
 
     connect(m_boardList, SIGNAL(mouseButtonClicked(int, Q3ListViewItem*, const QPoint&, int)),
              SLOT(slotMouseButtonClicked(int, Q3ListViewItem*)));
@@ -303,8 +303,11 @@
     /*-------------------------------------------------*/
 
     /* set background color */
-//    m_boardList->viewport() ->setPaletteBackgroundColor(m_backColor); // TODO
-//    m_boardList->setAlternateBackground(m_altColor); // TODO
+    QWidget *widget = m_boardList->viewport();
+    QPalette palette;
+    palette.setColor(widget->backgroundRole(), m_backColor);
+    widget->setPalette(palette);
+    m_boardList->setAlternateBackground(m_altColor);
 
     // clear list
     m_boardList->clear();
@@ -321,7 +324,7 @@
 
         KConfigGroup group = config.group(category);
         Kita::ListViewItem* categoryItem = new Kita::ListViewItem(m_boardList, previous, category);
-//        categoryItem->setColor(m_textColor, m_baseColor); // TODO
+        categoryItem->setColor(m_textColor.color(), m_baseColor.color());
         Kita::ListViewItem* previousBoard = 0;
 
         for (int count = 0; ; count++) {
@@ -342,7 +345,7 @@
             Kita::BoardManager::enrollBoard(boardURL, boardName, oldURL);
             Kita::BoardManager::loadBBSHistory(boardURL);
             previousBoard = new Kita::ListViewItem(categoryItem, previousBoard, boardName, boardURL);
-//            previousBoard->setColor(m_textColor, m_baseColor); // TODO
+            previousBoard->setColor(m_textColor.color(), m_baseColor.color());
         }
         previous = categoryItem;
     }
@@ -372,7 +375,7 @@
         QString str;
 
         Kita::ListViewItem* categoryItem = new Kita::ListViewItem(m_boardList, "extboard");
-//        categoryItem->setColor(m_textColor, m_baseColor); // TODO
+        categoryItem->setColor(m_textColor.color(), m_baseColor.color());
 
         while (!(str = stream.readLine()).isEmpty()) {
             if (! str.isEmpty()) {
@@ -383,7 +386,7 @@
                     QString board_url = list[ 1 ];
 
                     Kita::ListViewItem* tmpitem = new Kita::ListViewItem(categoryItem, board_title, board_url);
-//                    tmpitem->setColor(m_textColor, m_baseColor); // TODO
+                    tmpitem->setColor(m_textColor.color(), m_baseColor.color());
                     QString oldURL;
                     int type = Kita::Board_Unknown;
                     if (list.size() == 3) type = list[ 2 ].toInt();
@@ -436,7 +439,7 @@
     if (! m_favorites) {
         m_favorites = new Kita::ListViewItem(m_boardList, 0, i18n("Favorites"));
     }
-//    m_favorites->setColor(m_textColor, m_baseColor); // TODO
+    m_favorites->setColor(m_textColor.color(), m_baseColor.color());
 
     // remove all items.
     do {
@@ -453,7 +456,7 @@
         QString boardName = Kita::BoardManager::boardName(boardURL);
 
         Kita::ListViewItem* item = new Kita::ListViewItem(m_favorites, 0, boardName, boardURL);
-//        item->setColor(m_textColor, m_baseColor); // TODO
+        item->setColor(m_textColor.color(), m_baseColor.color());
     }
 }
 




Kita-svn メーリングリストの案内
Back to archive index