]> Some of my projects - localmylist.git/commitdiff
Make it possible to start the udp client in management-gui. Fix opening episode/file.
authorAPTX <marek321@gmail.com>
Sun, 10 Jun 2012 19:15:48 +0000 (21:15 +0200)
committerAPTX <marek321@gmail.com>
Sun, 10 Jun 2012 19:15:48 +0000 (21:15 +0200)
management-gui/mainwindow.cpp
management-gui/mainwindow.h
management-gui/mainwindow.ui

index 1430309bee698f1c0ba935b71f71c1f4551a9b03..640acc9861c49b84ed1cd43ae8b0fbac31698e28 100644 (file)
@@ -148,8 +148,7 @@ void MainWindow::on_myListView_openFileRequested(const QModelIndex &index)
                q.prepare(
                        "SELECT fl.path FROM file f "
                        "       LEFT JOIN file_location fl ON fl.fid = f.fid "
-                       "       WHERE f.my_watched IS NULL "
-                       "               AND f.eid = :eid "
+                       "       WHERE f.eid = :eid "
                        "               AND fl.path IS NOT NULL "
                        "       ORDER BY f.version DESC ");
                q.bindValue(":eid", id);
@@ -159,8 +158,7 @@ void MainWindow::on_myListView_openFileRequested(const QModelIndex &index)
                q.prepare(
                        "SELECT fl.path FROM file f "
                        "       LEFT JOIN file_location fl ON fl.fid = f.fid "
-                       "       WHERE f.my_watched IS NULL "
-                       "               AND f.fid = :fid "
+                       "       WHERE f.fid = :fid "
                        "               AND fl.path IS NOT NULL ");
                q.bindValue(":fid", id);
        }
@@ -187,3 +185,9 @@ void MainWindow::on_myListView_openFileRequested(const QModelIndex &index)
        ui->statusBar->showMessage(tr("Openieng file: %1").arg(path));
 
 }
+
+void MainWindow::on_actionStartUDPCLient_triggered()
+{
+       MyList::instance()->setupUdpClient();
+       MyList::instance()->setupRequestHandler();
+}
index de85a11b96a43e225f95f2ee1e55690092becb93..9fb61d08c900e9915f34be83102f3d70b00210a8 100644 (file)
@@ -39,6 +39,8 @@ private slots:
        void on_actionHandlePendingRequests_triggered();
        void on_myListView_openFileRequested(const QModelIndex &index);
 
+       void on_actionStartUDPCLient_triggered();
+
 private:
        Ui::MainWindow *ui;
 
index aa9631d3b5a06c12a30a612089dcb394162f8cb8..2c9a408c951605a0d46200db63d70db54120c836 100644 (file)
@@ -36,6 +36,8 @@
     <addaction name="actionConnect"/>
     <addaction name="actionDisconnect"/>
     <addaction name="separator"/>
+    <addaction name="actionStartUDPCLient"/>
+    <addaction name="separator"/>
     <addaction name="actionQuit"/>
    </widget>
    <widget class="QMenu" name="menuSettings">
     <string>Reset Pending Requests</string>
    </property>
   </action>
+  <action name="actionStartUDPCLient">
+   <property name="text">
+    <string>Start UDP CLient</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <customwidgets>