mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
added missing win32 files
fixed UNIX EOL on VC6 project files svn path=/trunk/icecast/; revision=4116
This commit is contained in:
parent
7c7fa73422
commit
e99a228b68
@ -34,6 +34,7 @@ extern "C" {
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
#define ICECAST_VERSION "2.0alpha1"
|
||||
CEdit *g_accessControl;
|
||||
CEdit *g_errorControl;
|
||||
CIcecast2winDlg *g_mainDialog;
|
||||
@ -334,6 +335,10 @@ BOOL CIcecast2winDlg::OnInitDialog()
|
||||
|
||||
m_pTray = NULL;
|
||||
|
||||
char version[255] = "";
|
||||
sprintf(version, "Icecast2 Version %s", ICECAST_VERSION);
|
||||
SetWindowText(version);
|
||||
|
||||
if (m_Autostart) {
|
||||
OnStart();
|
||||
}
|
||||
@ -680,6 +685,7 @@ void CIcecast2winDlg::OnStart()
|
||||
CIcecast2winApp *myApp = (CIcecast2winApp *)AfxGetApp();
|
||||
|
||||
// TODO: Add your control notification handler code here
|
||||
|
||||
if (global.running == ICE_RUNNING) {
|
||||
StopServer();
|
||||
}
|
||||
|
35
win32/TRAYNOT.h
Normal file
35
win32/TRAYNOT.h
Normal file
@ -0,0 +1,35 @@
|
||||
// CTrayNot window
|
||||
#ifndef _CTRAYNOT
|
||||
#define _CTRAYNOT
|
||||
|
||||
class CTrayNot : public CObject
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CTrayNot ( CWnd* pWnd, UINT uCallbackMessage,
|
||||
LPCTSTR szTip, HICON* pList ) ;
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
BOOL m_bEnabled ;
|
||||
NOTIFYICONDATA m_tnd ;
|
||||
HICON* m_pIconList ;
|
||||
|
||||
|
||||
public:
|
||||
void SetState ( int id = 0 ) ;
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CTrayNot)
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
virtual ~CTrayNot();
|
||||
void SetTIP(char *pTip);
|
||||
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif
|
65
win32/Traynot.cpp
Normal file
65
win32/Traynot.cpp
Normal file
@ -0,0 +1,65 @@
|
||||
#include "stdafx.h"
|
||||
#include "TrayNot.h"
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CTrayNot
|
||||
|
||||
CTrayNot::CTrayNot ( CWnd* pWnd, UINT uCallbackMessage,
|
||||
LPCTSTR szTip, HICON* pList )
|
||||
{
|
||||
// this is only for Windows 95 (or higher)
|
||||
m_bEnabled = ( GetVersion() & 0xff ) >= 4 ;
|
||||
if (!m_bEnabled)
|
||||
return ;
|
||||
|
||||
// load up the NOTIFYICONDATA structure
|
||||
m_tnd.cbSize = sizeof(NOTIFYICONDATA) ;
|
||||
m_tnd.hWnd = pWnd->GetSafeHwnd() ;
|
||||
m_tnd.uID = 0 ;
|
||||
m_tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP ;
|
||||
m_tnd.uCallbackMessage = uCallbackMessage;
|
||||
strcpy ( m_tnd.szTip, "Icecast2");
|
||||
//or you could use:
|
||||
//strcpy ( m_tnd.szTip, AfxGetApp()->m_pszAppName);
|
||||
//this will display the app name instead of the string you specify
|
||||
|
||||
|
||||
|
||||
// save the pointer to the icon list and set the initial
|
||||
// default icon.
|
||||
m_pIconList = pList ;
|
||||
m_tnd.hIcon = m_pIconList[0] ;
|
||||
Shell_NotifyIcon (NIM_ADD,&m_tnd);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
CTrayNot::~CTrayNot()
|
||||
{
|
||||
if (m_bEnabled)
|
||||
Shell_NotifyIcon (NIM_DELETE, &m_tnd);
|
||||
}
|
||||
|
||||
void CTrayNot::SetState(int id)
|
||||
{
|
||||
if (!m_bEnabled)
|
||||
return;
|
||||
m_tnd.hIcon = m_pIconList[id];
|
||||
m_tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP ;
|
||||
|
||||
//Ive found in windows XP that this command makes the icon not visable in the system tray....we dont want that now
|
||||
//do we?
|
||||
Shell_NotifyIcon(NIM_MODIFY, &m_tnd);
|
||||
}
|
||||
void CTrayNot::SetTIP(char *pTip) {
|
||||
memset(m_tnd.szTip, '\000', sizeof(m_tnd.szTip));
|
||||
strncpy(m_tnd.szTip, pTip, sizeof(m_tnd.szTip)-1);
|
||||
|
||||
Shell_NotifyIcon(NIM_MODIFY, &m_tnd);
|
||||
}
|
@ -13,7 +13,7 @@ AllowNoIcons=yes
|
||||
LicenseFile=..\COPYING
|
||||
InfoAfterFile=..\README
|
||||
OutputDir=.
|
||||
OutputBaseFilename=Icecast2_win32_08282002_setup
|
||||
OutputBaseFilename=Icecast2_win32_2.0_alpha1_setup
|
||||
WizardImageFile=icecast2logo2.bmp
|
||||
; uncomment the following line if you want your installation to run on NT 3.51 too.
|
||||
; MinVersion=4,3.51
|
||||
|
Loading…
Reference in New Issue
Block a user