updated packaging changelogs
[woller] / woller.cpp
index f08af4a..d78162c 100644 (file)
@@ -210,10 +210,10 @@ ConfigWidget::ConfigWidget(QWidget *parent, QList<host_s> *hosts)
     this->setWindowTitle(tr("Woller Config"));
 #ifdef Q_WS_MAEMO_5
     this->setAttribute(Qt::WA_Maemo5StackedWindow);
-    this->setWindowFlags(this->windowFlags() | Qt::Window);
 #else
     this->setWindowModality(Qt::ApplicationModal);
 #endif
+    this->setWindowFlags(this->windowFlags() | Qt::Window);
     add_host = new QPushButton(tr("&Add Host"), this);
     edit_host = new QPushButton(tr("&Edit Host"), this);
     del_host = new QPushButton(tr("&Delete Host"), this);
@@ -368,10 +368,10 @@ HostWidget::HostWidget(QWidget *parent, host_s *host)
     this->setWindowTitle(tr("WOL target details"));
 #ifdef Q_WS_MAEMO_5
     this->setAttribute(Qt::WA_Maemo5StackedWindow);
-    this->setWindowFlags(this->windowFlags() | Qt::Window);
 #else
     this->setWindowModality(Qt::ApplicationModal);
 #endif
+    this->setWindowFlags(this->windowFlags() | Qt::Window);
     vlayout = new QVBoxLayout(this);
 
     host_row = new QHBoxLayout;
@@ -389,7 +389,7 @@ HostWidget::HostWidget(QWidget *parent, host_s *host)
             tr("HW address of target, e.g. 00:01:02:AA:BB:CC. "
                "Hint, in Linux/Unix: \"ifconfig\","
                "in Windows \"ipconfig /all\""));
-    mac->setInputMask("HH:HH:HH:HH:HH:HH;0");
+    mac->setInputMask("HH:HH:HH:HH:HH:HH;_");
     mac_row->addWidget(mac_lbl);
     mac_row->addWidget(mac);
     vlayout->addLayout(mac_row);
@@ -442,11 +442,13 @@ void HostWidget::ok_sig()
         msgBox.exec();
         return;
     }
-    new_host->mac= this->mac->text();
-    if (new_host->mac.isEmpty())
+
+    new_host->mac = this->mac->text();
+    if (new_host->mac.length() != MAX_MAC_STR_LEN)
     {
         QMessageBox msgBox;
-        msgBox.setText("You must set mac!");
+        msgBox.setText("You must set mac to full 12 digits!\n" \
+                       "E.g. 00:11:22:33:44:55:66");
         msgBox.exec();
         return;
     }
@@ -462,7 +464,6 @@ void HostWidget::ok_sig()
 HostWidget::~HostWidget()
 {
     qDebug() << "host ~widget" << endl;
-    delete vlayout;
     delete host_row;
     delete host_lbl;
     delete hostname;
@@ -475,7 +476,7 @@ HostWidget::~HostWidget()
     delete button_row;
     delete cancel;
     delete ok;
-    //delete new_host;
+    delete vlayout;
 }