Call steps on focus instead. fix typo
authornemo
Tue, 12 Mar 2013 22:35:57 -0400
changeset 8729 b19be476a2fa
parent 8728 d2f6262452a3
child 8730 b39f433f8ab4
Call steps on focus instead. fix typo
QTfrontend/ui/mouseoverfilter.cpp
QTfrontend/ui/page/AbstractPage.cpp
QTfrontend/ui/page/AbstractPage.h
QTfrontend/ui/page/pagemain.cpp
QTfrontend/ui/page/pageroomslist.cpp
--- a/QTfrontend/ui/mouseoverfilter.cpp	Tue Mar 12 22:20:42 2013 -0400
+++ b/QTfrontend/ui/mouseoverfilter.cpp	Tue Mar 12 22:35:57 2013 -0400
@@ -5,6 +5,7 @@
 #include <QLabel>
 #include <QLineEdit>
 #include <QCheckBox>
+#include <QListView>
 
 #include "mouseoverfilter.h"
 #include "ui/page/AbstractPage.h"
@@ -21,7 +22,7 @@
 
 bool MouseOverFilter::eventFilter( QObject *dist, QEvent *event )
 {
-    if (event->type() == QEvent::Enter)
+    if (event->type() == QEvent::FocusIn)
     {
         QWidget * widget = dynamic_cast<QWidget*>(dist);
 
@@ -39,7 +40,8 @@
         QComboBox * droplist = dynamic_cast<QComboBox*>(dist);
         QSlider * slider = dynamic_cast<QSlider*>(dist);
         QTabWidget * tab = dynamic_cast<QTabWidget*>(dist);
-        if (button || textfield || checkbox || droplist || slider || tab)
+        QListView * listview = dynamic_cast<QListView*>(dist);
+        if (button || textfield || checkbox || droplist || slider || tab || listview)
         {
             SDLInteraction::instance().playSoundFile("/Sounds/steps.ogg");
         }
@@ -50,9 +52,9 @@
     {
         abstractpage = qobject_cast<AbstractPage*>(ui->Pages->currentWidget());
 
-        if (abstractpage->getDefautDescription() != NULL)
+        if (abstractpage->getDefaultDescription() != NULL)
         {
-            abstractpage->setButtonDescription( * abstractpage->getDefautDescription());
+            abstractpage->setButtonDescription( * abstractpage->getDefaultDescription());
         }
         else
             abstractpage->setButtonDescription("");
--- a/QTfrontend/ui/page/AbstractPage.cpp	Tue Mar 12 22:20:42 2013 -0400
+++ b/QTfrontend/ui/page/AbstractPage.cpp	Tue Mar 12 22:35:57 2013 -0400
@@ -158,13 +158,13 @@
     descLabel->setText(desc);
 }
 
-void AbstractPage::setDefautDescription(QString text)
+void AbstractPage::setDefaultDescription(QString text)
 {
     *defautDesc = text;
     descLabel->setText(text);
 }
 
-QString * AbstractPage::getDefautDescription()
+QString * AbstractPage::getDefaultDescription()
 {
     return defautDesc;
 }
--- a/QTfrontend/ui/page/AbstractPage.h	Tue Mar 12 22:20:42 2013 -0400
+++ b/QTfrontend/ui/page/AbstractPage.h	Tue Mar 12 22:35:57 2013 -0400
@@ -70,12 +70,12 @@
         *
         * @param text the defaut desc
         */
-        void setDefautDescription(QString text);
+        void setDefaultDescription(QString text);
 
         /**
         * @brief Get the desc defaut text
         */
-        QString * getDefautDescription();
+        QString * getDefaultDescription();
 
     signals:
 
--- a/QTfrontend/ui/page/pagemain.cpp	Tue Mar 12 22:20:42 2013 -0400
+++ b/QTfrontend/ui/page/pagemain.cpp	Tue Mar 12 22:35:57 2013 -0400
@@ -134,9 +134,9 @@
     mainNote->setOpenExternalLinks(true);
 
 #ifdef DEBUG
-    setDefautDescription(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete!"));
+    setDefaultDescription(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game, while some features might be broken or incomplete!"));
 #else
-    setDefautDescription(QLabel::tr("Tip: ") + randomTip());
+    setDefaultDescription(QLabel::tr("Tip: ") + randomTip());
 #endif
 
 }
--- a/QTfrontend/ui/page/pageroomslist.cpp	Tue Mar 12 22:20:42 2013 -0400
+++ b/QTfrontend/ui/page/pageroomslist.cpp	Tue Mar 12 22:35:57 2013 -0400
@@ -582,7 +582,7 @@
 
 void PageRoomsList::updateNickCounter(int cnt)
 {
-    setDefautDescription(tr("%1 players online", 0, cnt).arg(cnt));
+    setDefaultDescription(tr("%1 players online", 0, cnt).arg(cnt));
 }
 
 void PageRoomsList::setUser(const QString & nickname)