Esempio n. 1
0
static void Toolbar_setlabel(void)
{
    // Get current workspace name...
    DesktopInfo DI;
    HWND hwnd;

    GetDesktopInfo (& DI);
    strcpy(Toolbar_WorkspaceName, DI.name);
    if (Toolbar_ShowingExternalLabel)
        return;

#ifdef BBOPT_MEMCHECK
    // Display some statistics.
    if (m_alloc_size()) {
        struct menu_stats st;
        Menu_Stats(&st);
        sprintf(Toolbar_CurrentWindow,"Menus %d  MenuItems %d  Memory %d", st.menu_count, st.item_count, m_alloc_size());
        return;
    }
#endif
    hwnd = GetForegroundWindow();
    if (NULL == hwnd || is_bbwindow(hwnd)) {
        if (GetCapture())
            return;
        hwnd = BBhwnd;
    }
    get_window_text(hwnd, Toolbar_CurrentWindow, sizeof Toolbar_CurrentWindow);
}
Esempio n. 2
0
void Toolbar_setlabel(void)
{
	// Get current workspace name...
	DesktopInfo DI;
	GetDesktopInfo (& DI);
	_tcsncpy_s(Toolbar_WorkspaceName, 80, DI.name, _TRUNCATE);
	if (Toolbar_ShowingExternalLabel) return;
	Toolbar_CurrentWindow[0] = 0;
	struct tasklist* tl;
	dolist (tl, GetTaskListPtr()) if (tl->active) break;
	if (tl) strcpy_max(Toolbar_CurrentWindow, tl->caption, sizeof(Toolbar_CurrentWindow)/sizeof(TCHAR));
	//else strcpy(Toolbar_CurrentWindow, _T("Blackbox"));
}
Esempio n. 3
0
void MeaPositionLogMgr::WriteDesktopsSection(int indent) throw(CFileException)
{
    Write(indent, _T("<desktops>\n"));
    indent++;

    RefCountMap::const_iterator iter;
    for (iter = m_refCountMap.begin(); iter != m_refCountMap.end(); ++iter) {
        GetDesktopInfo((*iter).first).Save(*this, indent);
    }

    indent--;
    Write(indent, _T("</desktops>\n"));
}
Esempio n. 4
0
void EnumDesks (DESKENUMPROC lpEnumFunc, LPARAM lParam)
{
	DesktopInfo info;
	GetDesktopInfo(&info);
	string_node *p = info.deskNames;
	for (int n = 0; n < info.ScreensX; n++)
	{
		DesktopInfo DI;
		DI.number = n;
		DI.deskNames = info.deskNames;
		DI.isCurrent = n == info.number;
		DI.name[0] = 0;
		if (p) strcpy(DI.name, p->str), p = p->next;

		if (FALSE == lpEnumFunc(&DI, lParam))
			break;
	}
}