コード例 #1
0
static void   sttReloadButtons()
{
	int i=0;
	tbcheck ;
	tblock;
	{
		int vis=ModernGetSettingByte(NULL,"CLUI","ShowButtonBar",SETTINGS_SHOWBUTTONBAR_DEFAULT);
		WindowList_Broadcast(tbdat.hToolBarWindowList,MTBM_UPDATEFRAMEVISIBILITY,(WPARAM)ModernGetSettingByte(NULL,"CLUI","ShowButtonBar",SETTINGS_SHOWBUTTONBAR_DEFAULT),0);
	}

	WindowList_Broadcast(tbdat.hToolBarWindowList, MTBM_REMOVE_ALL_BUTTONS, 0,0);
	for (i=0; i<tbdat.listOfButtons->realCount; i++)
	{	
		BYTE bVisible;
		BYTE bPanel;
		DWORD dwOrder;

		MTB_BUTTONINFO * mtbi = (MTB_BUTTONINFO *)tbdat.listOfButtons->items[i];
		
		bVisible=mtbi->bVisible;
		sttGetButtonSettings(mtbi->szButtonID, &bVisible, &dwOrder, &bPanel);
		
		mtbi->nOrderValue = dwOrder ? dwOrder : mtbi->nOrderValue;
		mtbi->bVisible = bVisible;
		mtbi->bPanelID = bPanel;
		
		if (mtbi->bVisible) 
			ToolBar_AddButtonToBars(mtbi);
	}
	tbunlock;
	sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) );
	sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) );
	sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );

}
コード例 #2
0
ファイル: msgs.cpp プロジェクト: kxepal/miranda-ng
int OnSystemPreshutdown(WPARAM, LPARAM)
{
	WindowList_Broadcast(g_dat.hMessageWindowList, WM_CLOSE, 0, 0);
	WindowList_Broadcast(g_dat.hParentWindowList, WM_CLOSE, 0, 0);
	DeinitStatusIcons();
	return 0;
}
コード例 #3
0
ファイル: msgs.cpp プロジェクト: truefriend-cz/miranda-ng
static int IconsChanged(WPARAM, LPARAM)
{
	FreeMsgLogIcons();
	LoadMsgLogIcons();
	WindowList_Broadcast(g_dat.hMessageWindowList, DM_REMAKELOG, 0, 0);
	// change all the icons
	WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATEWINICON, 0, 0);
	return 0;
}
コード例 #4
0
ファイル: main.cpp プロジェクト: tweimer/miranda-ng
static int HookContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
	char *szProto = GetContactProto(hContact);
	if (strcmpnull(cws->szModule, "CList") && strcmpnull(cws->szModule, szProto))
		return 0;

	WindowList_Broadcast(g_hSendWindowList, DM_UPDATETITLE, 0, 0);
	WindowList_Broadcast(g_hRecvWindowList, DM_UPDATETITLE, 0, 0);
	return 0;
}
コード例 #5
0
ファイル: awaymsg.cpp プロジェクト: kmdtukl/miranda-ng
int AwayMsgPreShutdown(void)
{
	if (hWindowList) {
		WindowList_Broadcast(hWindowList, WM_CLOSE, 0, 0);
		WindowList_Destroy(hWindowList);
	}
	if (hWindowList2) {
		WindowList_Broadcast(hWindowList2, WM_CLOSE, 0, 0);
		WindowList_Destroy(hWindowList2);
	}
	return 0;
}
コード例 #6
0
ファイル: weather.cpp プロジェクト: Seldom/miranda-ng
int WeatherShutdown(WPARAM, LPARAM)
{
	KillTimer(NULL, timerId);		// kill update timer

	SaveOptions();					// save options once more
	status = ID_STATUS_OFFLINE;		// set status to offline

	CallService(MS_NETLIB_SHUTDOWN, (WPARAM)hNetlibHttp, 0);

	WindowList_Broadcast(hWindowList, WM_CLOSE, 0, 0);
	WindowList_Broadcast(hDataWindowList, WM_CLOSE, 0, 0);
	SendMessage(hWndSetup, WM_CLOSE, 0, 0);

	return 0;
}
コード例 #7
0
int AddStickyStatusIcon(WPARAM wParam, LPARAM lParam) {
	StatusIconData *sid = (StatusIconData *)lParam;
	struct StatusIconListNode *siln = (struct StatusIconListNode *)mir_alloc(sizeof(struct StatusIconListNode));
	struct StatusIconListNode *siln2 = status_icon_list;

	siln->sid.cbSize = sid->cbSize;
	siln->sid.szModule = mir_strdup(sid->szModule);
	siln->sid.dwId = sid->dwId;
	siln->sid.hIcon = DuplicateIcon(NULL, sid->hIcon);
	siln->sid.hIconDisabled = DuplicateIcon(NULL, sid->hIconDisabled);
	siln->sid.flags = sid->flags;
	if(sid->szTooltip) siln->sid.szTooltip = mir_strdup(sid->szTooltip);
	else siln->sid.szTooltip = 0;
	siln->next = NULL;

	while(siln2 && siln2->next) {
		siln2 = siln2->next;
	}
	if (siln2) {
		siln2->next = siln;
	} else {
		status_icon_list = siln;
	}

	status_icon_list_size++;

	WindowList_Broadcast(g_dat->hParentWindowList, DM_STATUSICONCHANGE, 0, 0);
	return 0;
}
コード例 #8
0
ファイル: statusicon.c プロジェクト: TonyAlloa/miranda-dev
INT_PTR RemoveStatusIcon(WPARAM wParam, LPARAM lParam) {
	StatusIconData *sid = (StatusIconData *)lParam;
	struct StatusIconListNode *current = status_icon_list, *prev = 0;

	while(current) {
		if(strcmp(current->sid.szModule, sid->szModule) == 0 && current->sid.dwId == sid->dwId) {
			if(prev) prev->next = current->next;
			else status_icon_list = current->next;

			status_icon_list_size--;

			mir_free(current->sid.szModule);
			DestroyIcon(current->sid.hIcon);
			if(current->sid.hIconDisabled) DestroyIcon(current->sid.hIconDisabled);
			mir_free(current->sid.szTooltip);
			mir_free(current);
			WindowList_Broadcast(g_dat->hMessageWindowList, DM_STATUSICONCHANGE, 0, 0);
			return 0;
		}

		prev = current;
		current = current->next;
	}

	return 1;
}
コード例 #9
0
ファイル: msgs.cpp プロジェクト: truefriend-cz/miranda-ng
int PreshutdownSendRecv(WPARAM, LPARAM)
{
	WindowList_Broadcast(g_dat.hMessageWindowList, WM_CLOSE, 0, 0);

	DeinitStatusIcons();
	return 0;
}
コード例 #10
0
ファイル: msgs.cpp プロジェクト: kxepal/miranda-ng
static int MessageSettingChanged(WPARAM hContact, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
	char *szProto = GetContactProto(hContact); // szProto maybe NULL
	if (!strcmp(cws->szModule, "CList") || !mir_strcmp(cws->szModule, szProto))
		WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, hContact, lParam);
	return 0;
}
コード例 #11
0
ファイル: history.cpp プロジェクト: Seldom/miranda-ng
static int PreShutdownHistoryModule(WPARAM, LPARAM)
{
	if (hWindowList) {
		WindowList_Broadcast(hWindowList, WM_DESTROY, 0, 0);
		WindowList_Destroy(hWindowList);
	}
	return 0;
}
コード例 #12
0
ファイル: IEHistory.cpp プロジェクト: kmdtukl/miranda-ng
extern "C" int __declspec(dllexport) Unload()
{
	DestroyServices();

	WindowList_Broadcast(hOpenWindowsList, WM_CLOSE, 0, 0);
	WindowList_Destroy(hOpenWindowsList);
	return 0;
}
コード例 #13
0
ファイル: alarm_win.cpp プロジェクト: chinadayang/miranda-ng
void DeinitAlarmWin()
{	
	WindowList_Broadcast(hAlarmWindowList, WM_COMMAND, IDC_SNOOZE, 0);
	WindowList_Destroy(hAlarmWindowList);

	if (hBackgroundBrush) DeleteObject(hBackgroundBrush);
	if (hTitleFont) DeleteObject(hTitleFont);
	if (hWindowFont) DeleteObject(hWindowFont);
}
コード例 #14
0
ファイル: msgs.c プロジェクト: BackupTheBerlios/mgoodies-svn
static int AvatarChanged(WPARAM wParam, LPARAM lParam) {
	if (wParam == 0) {			// protocol picture has changed...
		WindowList_Broadcast(g_dat->hMessageWindowList, DM_AVATARCHANGED, wParam, lParam);
	} else {
	    HWND hwnd = WindowList_Find(g_dat->hMessageWindowList, (HANDLE)wParam);
		SendMessage(hwnd, DM_AVATARCHANGED, wParam, lParam);
	}
    return 0;
}
コード例 #15
0
ファイル: main.cpp プロジェクト: MrtsComputers/miranda-ng
//
//  wParam - Section name
//  lParam - Icon ID
//
int OnSkinIconsChanged(WPARAM wParam,LPARAM lParam)
{
	for(int indx = 0; indx < SIZEOF(hIcons); indx++)
		hIcons[indx] = Skin_GetIconByHandle( iconList[indx].hIcolib );

	WindowList_Broadcast(hFileList, WM_FE_SKINCHANGE, 0,0);

	return 0;
}
コード例 #16
0
static INT_PTR    svcToolBarRemoveButton(WPARAM wParam, LPARAM lParam)
{
	HANDLE hButton=(HANDLE)wParam;
	tbcheck 0;
	tblock;
	WindowList_Broadcast(tbdat.hToolBarWindowList, MTBM_REMOVEBUTTON, wParam, lParam);
	tbunlock;
	return 0;
}
コード例 #17
0
ファイル: msgs.cpp プロジェクト: truefriend-cz/miranda-ng
static int MessageSettingChanged(WPARAM hContact, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
	if (cws->szModule == NULL)
		return 0;

	if (!mir_strcmp(cws->szModule, "CList"))
		WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM)cws, 0);
	else if (hContact) {
		if (cws->szSetting && !mir_strcmp(cws->szSetting, "Timezone"))
			WindowList_Broadcast(g_dat.hMessageWindowList, DM_NEWTIMEZONE, (WPARAM)cws, 0);
		else {
			char *szProto = GetContactProto(hContact);
			if (szProto && !mir_strcmp(cws->szModule, szProto))
				WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM)cws, 0);
		}
	}
	return 0;
}
コード例 #18
0
static int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
	char *szProto = GetContactProto(wParam);
	if (mir_strcmp(cws->szModule, "CList") && (szProto == NULL || mir_strcmp(cws->szModule, szProto)))
		return 0;

	WindowList_Broadcast(hUrlWindowList, DM_UPDATETITLE, 0, 0);
	return 0;
}
コード例 #19
0
ファイル: msgs.c プロジェクト: BackupTheBerlios/mgoodies-svn
static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
	char *szProto;

	szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
	if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto)))
		return 0;
	WindowList_Broadcast(g_dat->hMessageWindowList, DM_UPDATETITLE, (WPARAM) cws, 0);
	return 0;
}
コード例 #20
0
ファイル: Services.cpp プロジェクト: kxepal/miranda-ng
int NewsAggrPreShutdown(WPARAM, LPARAM)
{
	if (hAddFeedDlg)
		SendMessage(hAddFeedDlg, WM_CLOSE, 0, 0);

	WindowList_Broadcast(hChangeFeedDlgList, WM_CLOSE, 0, 0);

	KillTimer(NULL, timerId);
	NetlibUnInit();
	return 0;
}
コード例 #21
0
ファイル: statusicon.cpp プロジェクト: kxepal/miranda-ng
static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
{
	if (hContact == NULL)
		WindowList_Broadcast(g_dat.hMessageWindowList, DM_STATUSICONCHANGE, 0, 0);
	else {
		HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, hContact);
		if (hwnd != NULL)
			PostMessage(hwnd, DM_STATUSICONCHANGE, 0, 0);
	}
	return 0;
}
コード例 #22
0
static MTB_BUTTONINFO * ToolBar_AddButtonToBars(MTB_BUTTONINFO * mtbi)
{	
	int result=0;
	if (!mtbi->bVisible) return 0;
	WindowList_Broadcast(tbdat.hToolBarWindowList, MTBM_ADDBUTTON, (WPARAM)mtbi, 0);
	if (mtbi->hWindow) 
		sttUpdateButtonState( mtbi );
	if (mtbi->hwndToolBar) 
		SendMessage( mtbi->hwndToolBar, MTBM_REPOSBUTTONS, 0, 0);
	return mtbi;
}
コード例 #23
0
int IconsChanged(WPARAM wParam, LPARAM lParam)
{
	if (hMsgMenuItem) {
		int j;
		CLISTMENUITEM mi;
		mi.cbSize = sizeof(mi);
		mi.flags = CMIM_ICON;
		mi.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
		for (j = 0; j < hMsgMenuItemCount; j++) {
			CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hMsgMenuItem[j], (LPARAM) & mi);
		}
	}
	FreeMsgLogIcons();
	LoadMsgLogIcons();
	LoadProtocolIcons();
	WindowList_Broadcast(g_dat->hMessageWindowList, DM_REMAKELOG, 0, 0);
	// change all the icons
	WindowList_Broadcast(g_dat->hMessageWindowList, DM_CHANGEICONS, 0, 0);
	WindowList_Broadcast(g_dat->hMessageWindowList, DM_UPDATETITLE, 0, 0);
	return 0;
}
コード例 #24
0
ファイル: Services.cpp プロジェクト: 0xmono/miranda-ng
int NewsAggrPreShutdown(WPARAM wParam, LPARAM lParam)
{
	if (hAddFeedDlg)
		SendMessage(hAddFeedDlg, WM_CLOSE, 0, 0);

	WindowList_Broadcast(hChangeFeedDlgList, WM_CLOSE, 0, 0);

	KillTimer(NULL, timerId);
	NetlibUnInit();

	CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"NewsAggregator/CheckAllFeeds");
	return 0;
}
コード例 #25
0
static int PreShutdown(WPARAM wParam, LPARAM lParam)
{
	int i;

	for (i = 0; i < MAX_REGS(hHooks); i++)
		UnhookEvent(hHooks[i]);

	for (i = 0; i < MAX_REGS(hServices); i++)
		DestroyServiceFunction(hServices[i]);

	WindowList_Broadcast(hAvatarWindowsList,WM_CLOSE,0,0);

	return 0;
}
コード例 #26
0
static int SRUrlShutdown(WPARAM, LPARAM)
{
	if (hEventContactSettingChange)
		UnhookEvent(hEventContactSettingChange);

	if (hContactDeleted)
		UnhookEvent(hContactDeleted);

	if (hUrlWindowList) {
		WindowList_Broadcast(hUrlWindowList, WM_CLOSE, 0, 0);
		WindowList_Destroy(hUrlWindowList);
	}
	return 0;
}
コード例 #27
0
ファイル: statusicon.c プロジェクト: TonyAlloa/miranda-dev
void RemoveAllStatusIcons(void) {
	struct StatusIconListNode *current;

	while(status_icon_list) {
		current = status_icon_list;
		status_icon_list = status_icon_list->next;
		status_icon_list_size--;

		mir_free(current->sid.szModule);
		DestroyIcon(current->sid.hIcon);
		if(current->sid.hIconDisabled) DestroyIcon(current->sid.hIconDisabled);
		if(current->sid.szTooltip) mir_free(current->sid.szTooltip);
		mir_free(current);
	}

	WindowList_Broadcast(g_dat->hMessageWindowList, DM_STATUSICONCHANGE, 0, 0);
}
コード例 #28
0
static int ModifyStatusIcon(WPARAM wParam, LPARAM lParam) {
	HANDLE hContact = (HANDLE)wParam;

	StatusIconData *sid = (StatusIconData *)lParam;
	struct StatusIconListNode *current = status_icon_list;

	while(current) {
		if(strcmp(current->sid.szModule, sid->szModule) == 0 && current->sid.dwId == sid->dwId) {
			if(!hContact) {
				current->sid.flags = sid->flags;
				if(sid->hIcon) {
					DestroyIcon(current->sid.hIcon);
					current->sid.hIcon = DuplicateIcon(NULL, sid->hIcon);
				}
				if(sid->hIconDisabled) {
					DestroyIcon(current->sid.hIconDisabled);
					current->sid.hIconDisabled = DuplicateIcon(NULL, sid->hIconDisabled);
				}
				if(sid->szTooltip) {
					if(current->sid.szTooltip) mir_free(current->sid.szTooltip);
					current->sid.szTooltip = mir_strdup(sid->szTooltip);
				}

				WindowList_Broadcast(g_dat->hParentWindowList, DM_STATUSICONCHANGE, 0, 0);
			} else {
				char buff[256];
				HWND hwnd;
				sprintf(buff, "SRMMStatusIconFlags%d", (int)sid->dwId);
				DBWriteContactSettingByte(hContact, sid->szModule, buff, (BYTE)sid->flags);
				hwnd = WindowList_Find(g_dat->hMessageWindowList, hContact);
				if (hwnd == NULL) {
					hwnd = SM_FindWindowByContact(hContact);

				}
				if (hwnd != NULL) {
					PostMessage(GetParent(hwnd), DM_STATUSICONCHANGE, 0, 0);
				}
			}
			return 0;
		}

		current = current->next;
	}

	return 1;
}
コード例 #29
0
ファイル: alarm_win.cpp プロジェクト: chinadayang/miranda-ng
int ReloadFonts(WPARAM, LPARAM)
{
	LOGFONT log_font;
	title_font_colour = CallService(MS_FONT_GETT, (WPARAM)&title_font_id, (LPARAM)&log_font);
	DeleteObject(hTitleFont);
	hTitleFont = CreateFontIndirect(&log_font);

	window_font_colour = CallService(MS_FONT_GETT, (WPARAM)&window_font_id, (LPARAM)&log_font);
	DeleteObject(hWindowFont);
	hWindowFont = CreateFontIndirect(&log_font);

	COLORREF bkCol = CallService(MS_COLOUR_GETT, (WPARAM)&bk_colour_id, 0);
	DeleteObject(hBackgroundBrush);
	hBackgroundBrush = CreateSolidBrush(bkCol);

	WindowList_Broadcast(hAlarmWindowList, WMU_REFRESH, 0, 0);
	return 0;
}
コード例 #30
0
ファイル: alarm_win.cpp プロジェクト: tweimer/miranda-ng
int ReloadFonts(WPARAM, LPARAM)
{
	LOGFONT log_font;
	title_font_colour = Font_GetW(title_font_id, &log_font);
	DeleteObject(hTitleFont);
	hTitleFont = CreateFontIndirect(&log_font);

	window_font_colour = Font_GetW(window_font_id, &log_font);
	DeleteObject(hWindowFont);
	hWindowFont = CreateFontIndirect(&log_font);

	COLORREF bkCol = Colour_GetW(bk_colour_id);
	DeleteObject(hBackgroundBrush);
	hBackgroundBrush = CreateSolidBrush(bkCol);

	WindowList_Broadcast(hAlarmWindowList, WMU_REFRESH, 0, 0);
	return 0;
}