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

List:       kde-commits
Subject:    kdeedu/kmessedwords/kmessedwords
From:       Reuben Sutton <reuben () microsucks ! co ! uk>
Date:       2004-12-12 15:14:01
Message-ID: 20041212151401.EC9521B8C3 () office ! kde ! org
[Download RAW message or body]

CVS commit by reuben: 

Fixed a bug that made button images not load at the app starting up.
Added a check to make sure that the button images exist.
Thanks to gwright, for telling me how to check a file exists.


  M +3 -1      Makefile.am   1.37
  M +4 -1      mainwindow.cpp   1.66


--- kdeedu/kmessedwords/kmessedwords/Makefile.am  #1.36:1.37
@@ -1,5 +1,7 @@
 ####### kdevelop will overwrite this part!!! (begin)##########
 bin_PROGRAMS = kmessedwords
-kmessedwords_SOURCES = minparser.cpp answer.cpp mainwindow.cpp frontend.ui \
kmwdict.ui scores.cpp kwritewords.cpp main.cpp kmwview.cpp prefs.kcfgc interface.ui \
game.ui +kmessedwords_SOURCES = minparser.cpp answer.cpp mainwindow.cpp frontend.ui \
+        kmwdict.ui scores.cpp kwritewords.cpp main.cpp kmwview.cpp prefs.kcfgc \
+        interface.ui game.ui
 kmessedwords_LDADD   =  $(LIB_KFILE) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT) \
$(LIBSOCKET)  

--- kdeedu/kmessedwords/kmessedwords/mainwindow.cpp  #1.65:1.66
@@ -160,4 +160,5 @@ void MainWindow::loadSettings()
         }
         setBackgroundPic();
+        updateButtons();
 }
 
@@ -195,7 +196,8 @@ void MainWindow::updateSettings()
 
 // This function check's the button settings and sets the pictures if necerrsarry
+// Added a check to make sure the pictures exist.
 void MainWindow::updateButtons()
 {
-        if(Prefs::buttons()) {
+        if(Prefs::buttons() && \
                QFile::exists(locate("data","kmessedwords/themes/"+m_themeName+"/btnscore.png"))) \
                {
                 m_view->btnScore->setPixmap(QPixmap(locate("data","kmessedwords/themes/"+m_themeName+"/btnscore.png")));
                
                 m_view->btnMess->setPixmap(QPixmap(locate("data","kmessedwords/themes/"+m_themeName+"/btnmess.png")));
 @@ -206,4 +208,5 @@ void MainWindow::updateButtons()
                 m_view->btnMess->setText(i18n("&Play"));
                 m_view->btnTry->setText(i18n("&Try"));
+                update();
         }
 }


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

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