Implement XDG compliance, logging, and improved 401 error handling
- Install to ~/.local/bin/winamp-mpris - Use ~/.local/state/winamp-mpris/bridge.log for logging - Use $XDG_RUNTIME_DIR/winamp-mpris.pid for PID management - Add detailed user notification for 401 Unauthorized errors - Add install.sh for automated, standard-compliant setup - Include Winamp Web Interface source code and installer in repository
This commit is contained in:
32
gen_httpSrv_systray/title.cpp
Normal file
32
gen_httpSrv_systray/title.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <windows.h>
|
||||
#include <winsock.h>
|
||||
|
||||
#include "main.h"
|
||||
|
||||
extern HINSTANCE inst;
|
||||
extern HWND hwnd;
|
||||
|
||||
extern char host[255], username[20], password[20], title[255];
|
||||
extern int port, default_action, update_delay;
|
||||
|
||||
extern char szAppName[], AboutText[];
|
||||
|
||||
extern HWND ConfigWnd, VolumeWnd;
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// Thread to update title in systray tooltip
|
||||
DWORD WINAPI TitleThread(LPVOID param)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
MakeRequest(host,port,"/smalltitle",false,false,true);
|
||||
if (StrComp(title,""))
|
||||
wsprintf(title,"%s",szAppName);
|
||||
systray_modify(hwnd,1030,LoadIcon(inst, MAKEINTRESOURCE(GetIconID())),title);
|
||||
//MessageBox(hwnd,title,"Title",MB_OK | MB_TOPMOST);
|
||||
Sleep(update_delay*1000);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user