feat: tray tooltip fix, View Logs, connection status, GStreamer PATH fix - #27
feat: tray tooltip fix, View Logs, connection status, GStreamer PATH fix#27aayushprsingh wants to merge 1 commit into
Conversation
Update (2026-04-05)GUI Log Viewer reverted to Notepad: The Tkinter-based log viewer had font/scrollbar rendering issues when packaged with PyInstaller on Windows. View Logs now opens the log file in Notepad, which is reliable. A web-based approach may be revisited in a future release. |
Update 2 (2026-04-05)View Logs now works correctly: Fixed to use subprocess.Popen(['notepad.exe', path]) instead of os.startfile(). The .log file association on Windows was preventing os.startfile from opening Notepad. |
|
as i wrote in the README i am working on other branches and i'm rewriting uxplay-windows from scratch. I'll still take a look at your work but merging is unlikely |
|
Thanks for the update! I understand about the rewrite. A few questions:
|
I’m currently rewriting the project in C++ in the The rewrite is working quite well so far. One of my goals is to drop Bonjour as a dependency, since managing its installation on Windows is an hassle and it's old and unreliable software in my experience. The C++ version already works without Bonjour by using BLE pairing. However, that’s not a complete replacement because some desktop PCs may only have LAN and no wireless/BLE hardware. Ideally I’d like to use Apple’s mDNSResponder, which is essentially the core component of Bonjour and is open source. The issue is that it’s built with MSVC while this project uses MSYS2, so it’s not straightforward to integrate as-is. If you have the time and interest, this might be an area where help would be very welcome. There are also some forks of mDNSResponder around, but I’d prefer either using Apple’s upstream code directly or maintaining a minimal fork tailored to what uxplay-windows actually needs. |
|
Hi @leapbtw! I have resolved the merge conflicts caused by the C++ rewrite by porting the dynamic status action, tray tooltip connection status, and 'View Logs' features directly into the new C++ GUI codebase (main/mainwindow). All checks should now build and run cleanly. Could you please review and merge? Thank you! |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds basic end-user observability by persisting Qt log output to a file and exposing runtime status + log access via the system tray.
Changes:
- Add a “Status” tray menu item and keep tray tooltip/menu status in sync with server state.
- Add a “View Logs” tray action that opens the on-disk log file.
- Install a global Qt message handler to append logs to
uxplay.logunder the app’s data directory.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/mainwindow.h | Adds a new slot for opening logs from the tray menu. |
| src/mainwindow.cpp | Updates tray UI (status/tooltip) and adds “View Logs” action implementation. |
| src/main.cpp | Adds a custom Qt message handler writing logs to AppDataLocation/uxplay.log. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| void customMessageHandler(QtMsgType type, const QMessageLogContext &/*context*/, const QString &msg) { | ||
| QString txt; | ||
| switch (type) { | ||
| case QtDebugMsg: | ||
| txt = QString("Debug: %1").arg(msg); | ||
| break; | ||
| case QtInfoMsg: | ||
| txt = QString("Info: %1").arg(msg); | ||
| break; | ||
| case QtWarningMsg: | ||
| txt = QString("Warning: %1").arg(msg); | ||
| break; | ||
| case QtCriticalMsg: | ||
| txt = QString("Critical: %1").arg(msg); | ||
| break; | ||
| case QtFatalMsg: | ||
| txt = QString("Fatal: %1").arg(msg); | ||
| break; | ||
| } |
| fprintf(stderr, "%s\n", msg.toLocal8Bit().constData()); | ||
| } | ||
|
|
||
| int main(int argc, char *argv[]) { |
| QApplication app(argc, argv); | ||
| qInstallMessageHandler(customMessageHandler); | ||
| app.setOrganizationName("leapbtw"); | ||
| app.setApplicationName("uxplay-windows"); |
| QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/uxplay.log"; | ||
| QFile outFile(logPath); | ||
| if (outFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) { | ||
| QTextStream ts(&outFile); | ||
| ts << QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz ") << txt << Qt::endl; | ||
| outFile.close(); | ||
| } |
| QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/uxplay.log"; | ||
| QFile outFile(logPath); | ||
| if (outFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) { |
| void MainWindow::viewLogs() { | ||
| QString logPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/uxplay.log"; | ||
| QDesktopServices::openUrl(QUrl::fromLocalFile(logPath)); | ||
| } |
Summary of Changes
Fixes
Features
Known Limitation