void TinyMainWindow::on_action_network_reconnect_triggered() { connectToMPD(pv->host); update(false); showNotify(tr("Reconnected")); }
int main(int argc, char **argv) { unsigned timeout = 1, connected = 0; parseArguments(argc, argv); daemonize(); registerSignalHandlers(); termInit(); atexit(disconnectFromMPD); initCodesets(); do { if (!connected) { timeout = timeout <= 30 ? timeout * 2 : 60; connected = connectToMPD(timeout > 10 ? 10 : timeout); } if (connected) { timeout = 1; connected = getSong(); } display(timeout); } while (!done()); return 0; }
void TinyMainWindow::execConnectionDialog() { TinyConnectionDialog dlg(this, pv->host); if (dlg.exec() == QDialog::Accepted) { Host host = dlg.host(); connectToMPD(host); } updateServersComboBox(); }