Merge branch 'master' of mercury.wipsl.com:/var/git/irwi
authorTorste Aikio <zokier@zokier.laptop>
Tue, 29 Jun 2010 12:46:01 +0000 (15:46 +0300)
committerTorste Aikio <zokier@zokier.laptop>
Tue, 29 Jun 2010 12:46:01 +0000 (15:46 +0300)
debian/changelog
debian/postinst
src/advsettingsdlg.cpp
src/advsettingsdlg.h
src/mainwidget.cpp
src/remote.cpp
src/remote.h
src/settingsdlg.cpp

index 6ad8530..490423a 100644 (file)
@@ -1,3 +1,9 @@
+irwi (0.2-2) unstable; urgency=low
+
+  * Public release
+
+ -- Torste Aikio <zokier@unknown>  Tue, 29 Jun 2010 12:17:33 +0300
+
 irwi (0.2-1) unstable; urgency=low
 
   * Rewrite of the core
index a5bf173..76dfdc9 100755 (executable)
@@ -2,3 +2,4 @@
 
 echo 'include "/home/user/.config/irwi/lirc.conf"' >> /etc/lircd.conf
 sed -i '/^include/!d' /etc/lircd.conf
+echo -n > /home/user/.config/irwi/irwi.conf
index 4579540..1e7c18b 100644 (file)
@@ -8,7 +8,7 @@
 #include "advsettingsdlg.h"
 #include "settingstable.h"
 
-AdvSettingsDlg::AdvSettingsDlg(QDialog *parent)
+AdvSettingsDlg::AdvSettingsDlg(QWidget *parent)
     : QDialog(parent)
     , layout(NULL)
     , btnLayout(NULL)
@@ -71,7 +71,7 @@ void AdvSettingsDlg::refreshList()
 void AdvSettingsDlg::setDefaults()
 {
     settings->setValue("lircPort", 8765);
-    settings->setValue("remoteName", "No remote selected");
+    settings->setValue("remoteName", "");
     settings->setValue("lircConf", "/home/user/.config/irwi/lirc.conf");
     settings->setValue("cmd0", "VOLUP");
     settings->setValue("cmd1", "VOLDOWN");
index f05bd04..b7b779d 100644 (file)
@@ -14,7 +14,7 @@ class AdvSettingsDlg : public QDialog
     Q_OBJECT
 
 public:
-    AdvSettingsDlg(QDialog *parent);
+    AdvSettingsDlg(QWidget *parent);
     ~AdvSettingsDlg();
 
 private:
index 6f3f33f..5fd823d 100644 (file)
@@ -1,5 +1,6 @@
 #include "mainwidget.h"
 #include "settingsdlg.h"
+#include "advsettingsdlg.h"
 
 #include <QInputDialog>
 #include <QPainter>
@@ -10,6 +11,9 @@
 MainWidget::MainWidget (QWidget *parent)
     : QWidget(parent)
 {
+    // reset settings to defaults
+    AdvSettingsDlg asd(this);
+
     layout = new QGridLayout(this);
 
     settings = new QSettings(this);
index 28a3131..f94dbf0 100644 (file)
@@ -62,6 +62,14 @@ Remote &Remote::operator=(const Remote &other)
     return *this;
 }
 
+bool Remote::operator==(const Remote &other) const
+{
+    return (m_name == other.m_name &&
+            m_mfg == other.m_mfg &&
+            m_rating == other.m_rating &&
+            m_voteCount == other.m_voteCount);
+}
+
 void Remote::saveToFile()
 {
     if (!m_name.isEmpty()) {
index 5adcabd..3f21cee 100644 (file)
@@ -20,6 +20,7 @@ public:
             int rating = 0, int voteCount = 0);
     Remote(const Remote &);
     Remote &operator=(const Remote &);
+    bool operator==(const Remote &other) const;
     ~Remote();
 
     //getters
index c721f49..1be79bb 100644 (file)
@@ -16,8 +16,8 @@ SettingsDlg::SettingsDlg(QWidget *parent)
 {
     QSettings settings(this);
     m_layout = new QVBoxLayout(this);
-    m_btnLayout = new QHBoxLayout(m_layout);
-    m_remoteNameLayout = new QHBoxLayout(m_layout);
+    m_btnLayout = new QHBoxLayout();
+    m_remoteNameLayout = new QHBoxLayout();
     
     m_advSettingsBtn = new QPushButton(tr("Advanced"), this);
     m_selectRemoteBtn = new QPushButton(tr("Select remote"), this);
@@ -57,6 +57,8 @@ SettingsDlg::SettingsDlg(QWidget *parent)
     connect(m_rateDownBtn, SIGNAL(clicked()),
             this, SLOT(rateDownClicked()));
  
+    m_layout->addLayout(m_remoteNameLayout);
+    m_layout->addLayout(m_btnLayout);
     this->setLayout(m_layout);
 
     QString selectedRemote = QSettings(this).value("remoteName", "").toString();