コード例 #1
0
ファイル: smileys.cpp プロジェクト: kxepal/miranda-ng
void SmileyCategoryListType::AddProtoAsCategory(char *acc, const CMString& defaultFile)
{
	if (acc == NULL)
		return;

	const char* packnam = acc;
	if (mir_strcmp(packnam, "JABBER") == 0)
		packnam = "JGMail";
	else if (strstr(packnam, "SIP") != NULL)
		packnam = "MSN";

	char path[MAX_PATH];
	mir_snprintf(path, "Smileys\\nova\\%s.msl", packnam);

	CMString paths = A2T_SM(path), patha;
	pathToAbsolute(paths, patha);

	if (_taccess(patha.c_str(), 0) != 0)
		paths = defaultFile;
	CMString dName(acc), displayName;
	displayName.AppendFormat(TranslateT("%s global smiley pack"), dName.GetBuffer());
	CMString tname("AllProto");
	tname += A2T_SM(acc);
	AddCategory(tname, displayName, smcPhysProto, paths);
}
コード例 #2
0
ファイル: smileys.cpp プロジェクト: wyrover/miranda-ng
void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, const CMString &defaultFile)
{
	char *proto = GetContactProto(hContact);
	if (proto == NULL)
		return;

	DBVARIANT dbv;
	if (!db_get_ts(hContact, proto, "Transport", &dbv)) {
		if (dbv.ptszVal[0] == '\0') {
			db_free(&dbv);
			return;
		}
		char *trsp = mir_strdup(_T2A(dbv.ptszVal));
		_strlwr(trsp);

		const char *packname = NULL;
		if (strstr(trsp, "msn") != NULL)
			packname = "msn";
		else if (strstr(trsp, "icq") != NULL)
			packname = "icq";
		else if (strstr(trsp, "yahoo") != NULL)
			packname = "yahoo";
		else if (strstr(trsp, "aim") != NULL)
			packname = "aim";
		else if (strstr(trsp, "lcs") != NULL)
			packname = "msn";

		mir_free(trsp);

		CMString displayName = dbv.ptszVal;
		if (packname != NULL) {
			char path[MAX_PATH];
			mir_snprintf(path, "Smileys\\nova\\%s.msl", packname);

			CMString paths = _A2T(path), patha;
			pathToAbsolute(paths, patha);

			if (_taccess(patha.c_str(), 0) != 0)
				paths = defaultFile;

			AddCategory(displayName, displayName, smcTransportProto, paths);
		}
		else AddCategory(displayName, displayName, smcTransportProto, defaultFile);

		db_free(&dbv);
	}
}
コード例 #3
0
ファイル: GUIDialogLockSettings.cpp プロジェクト: micahg/xbmc
void CGUIDialogLockSettings::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  const std::shared_ptr<CSettingCategory> category = AddCategory("locksettings", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogLockSettings: unable to setup settings");
    return;
  }

  const std::shared_ptr<CSettingGroup> group = AddGroup(category);
  if (group == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogLockSettings: unable to setup settings");
    return;
  }

  if (m_getUser)
  {
    AddEdit(group, SETTING_USERNAME, 20142, 0, m_user);
    AddEdit(group, SETTING_PASSWORD, 12326, 0, m_locks.code, false, true);
    if (m_saveUserDetails != NULL)
      AddToggle(group, SETTING_PASSWORD_REMEMBER, 13423, 0, *m_saveUserDetails);

    return;
  }

  AddButton(group, SETTING_LOCKCODE, m_buttonLabel, 0);

  if (m_details)
  {
    const std::shared_ptr<CSettingGroup> groupDetails = AddGroup(category);
    if (groupDetails == NULL)
    {
      CLog::Log(LOGERROR, "CGUIDialogLockSettings: unable to setup settings");
      return;
    }

    AddToggle(groupDetails, SETTING_LOCK_MUSIC, 20038, 0, m_locks.music);
    AddToggle(groupDetails, SETTING_LOCK_VIDEOS, 20039, 0, m_locks.video);
    AddToggle(groupDetails, SETTING_LOCK_PICTURES, 20040, 0, m_locks.pictures);
    AddToggle(groupDetails, SETTING_LOCK_PROGRAMS, 20041, 0, m_locks.programs);
    AddToggle(groupDetails, SETTING_LOCK_FILEMANAGER, 20042, 0, m_locks.files);

    TranslatableIntegerSettingOptions settingsLevelOptions;
    settingsLevelOptions.push_back(std::make_pair(106,    LOCK_LEVEL::NONE));
    settingsLevelOptions.push_back(std::make_pair(593,    LOCK_LEVEL::ALL));
    settingsLevelOptions.push_back(std::make_pair(10037,  LOCK_LEVEL::STANDARD));
    settingsLevelOptions.push_back(std::make_pair(10038,  LOCK_LEVEL::ADVANCED));
    settingsLevelOptions.push_back(std::make_pair(10039,  LOCK_LEVEL::EXPERT));
    AddSpinner(groupDetails, SETTING_LOCK_SETTINGS, 20043, 0, static_cast<int>(m_locks.settings), settingsLevelOptions);
    
    AddToggle(groupDetails, SETTING_LOCK_ADDONMANAGER, 24090, 0, m_locks.addonManager);
  }

  m_changed = false;
}
コード例 #4
0
ファイル: smileys.cpp プロジェクト: kxepal/miranda-ng
void SmileyCategoryListType::AddAllProtocolsAsCategory(void)
{
	CMString displayName = TranslateT("Standard");
	CMString tname = _T("Standard");
	AddCategory(tname, displayName, smcStd);

	const CMString &defaultFile = GetSmileyCategory(tname)->GetFilename();

	PROTOCOLDESCRIPTOR **proto;
	int protoCount = 0;
	Proto_EnumProtocols(&protoCount, &proto);

	for (int i = 0; i < protoCount; i++) {
		PROTOCOLDESCRIPTOR *pd = proto[i];
		if (pd->type == PROTOTYPE_PROTOCOL && pd->cbSize == sizeof(*pd))
			AddProtoAsCategory(pd->szName, defaultFile);
	}

	PROTOACCOUNT **accList;
	Proto_EnumAccounts(&protoCount, &accList);
	for (int i = 0; i < protoCount; i++)
		AddAccountAsCategory(accList[i], defaultFile);

	for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
		AddContactTransportAsCategory(hContact, defaultFile);

	CMString cats;
	opt.ReadCustomCategories(cats);

	int cppv = 0;
	for (;;) {
		int cp = cats.Find('#', cppv);
		if (cp == -1)
			break;

		displayName = cats.Mid(cppv, cp - cppv);
		AddCategory(displayName, displayName, smcCustom, defaultFile);
		cppv = cp + 1;
	}

	if (cppv != cats.GetLength()) {
		displayName = cats.Mid(cppv);
		AddCategory(displayName, displayName, smcCustom, defaultFile);
	}
}
コード例 #5
0
	void Storage::AddNewCategories (const ExpenseEntry& entry, const QStringList& cats)
	{
		for (const auto& cat : cats)
		{
			if (!Impl_->CatCache_.contains (cat))
				AddCategory (cat);
			LinkEntry2Cat (entry, Impl_->CatCache_ [cat]);
		}
	}
コード例 #6
0
ファイル: smileys.cpp プロジェクト: kxepal/miranda-ng
void SmileyCategoryListType::AddAndLoad(const CMString& name, const CMString& displayName)
{
	if (GetSmileyCategory(name) != NULL)
		return;

	AddCategory(name, displayName, smcExt);
	// Load only if other smileys have been loaded already
	if (m_SmileyCategories.getCount() > 1)
		m_SmileyCategories[m_SmileyCategories.getCount() - 1].Load();
}
コード例 #7
0
void FVisualLoggerFilters::OnNewItemHandler(const FVisualLoggerDBRow& DBRow, int32 ItemIndex)
{
	const FVisualLogDevice::FVisualLogEntryItem& Item = DBRow.GetItems()[ItemIndex];
	TArray<FVisualLoggerCategoryVerbosityPair> Categories;
	FVisualLoggerHelpers::GetCategories(Item.Entry, Categories);
	for (auto& CategoryAndVerbosity : Categories)
	{
		AddCategory(CategoryAndVerbosity.CategoryName.ToString(), ELogVerbosity::All);
	}

	TMap<FString, TArray<FString> > OutCategories;
	FVisualLoggerHelpers::GetHistogramCategories(Item.Entry, OutCategories);
	for (const auto& CurrentCategory : OutCategories)
	{
		for (const auto& CurrentDataName : CurrentCategory.Value)
		{
			const FString GraphFilterName = CurrentCategory.Key + TEXT("$") + CurrentDataName;	
			AddCategory(GraphFilterName, ELogVerbosity::All);
		}
	}
}
コード例 #8
0
void CGUIDialogProfileSettings::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  const std::shared_ptr<CSettingCategory> category = AddCategory("profilesettings", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogProfileSettings: unable to setup settings");
    return;
  }

  const std::shared_ptr<CSettingGroup> group = AddGroup(category);
  if (group == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogProfileSettings: unable to setup settings");
    return;
  }

  const CProfilesManager &profileManager = CServiceBroker::GetProfileManager();

  AddEdit(group, SETTING_PROFILE_NAME, 20093, SettingLevel::Basic, m_name);
  AddButton(group, SETTING_PROFILE_IMAGE, 20065, SettingLevel::Basic);

  if (!m_isDefault && m_showDetails)
    AddButton(group, SETTING_PROFILE_DIRECTORY, 20070, SettingLevel::Basic);

  if (m_showDetails ||
     (m_locks.mode == LOCK_MODE_EVERYONE && profileManager.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE))
    AddButton(group, SETTING_PROFILE_LOCKS, 20066, SettingLevel::Basic);

  if (!m_isDefault && m_showDetails)
  {
    const std::shared_ptr<CSettingGroup> groupMedia = AddGroup(category);
    if (groupMedia == NULL)
    {
      CLog::Log(LOGERROR, "CGUIDialogProfileSettings: unable to setup settings");
      return;
    }

    TranslatableIntegerSettingOptions entries;
    entries.push_back(std::make_pair(20062, 0));
    entries.push_back(std::make_pair(20063, 1));
    entries.push_back(std::make_pair(20061, 2));
    if (profileManager.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE)
      entries.push_back(std::make_pair(20107, 3));

    AddSpinner(groupMedia, SETTING_PROFILE_MEDIA, 20060, SettingLevel::Basic, m_dbMode, entries);
    AddSpinner(groupMedia, SETTING_PROFILE_MEDIA_SOURCES, 20094, SettingLevel::Basic, m_sourcesMode, entries);
  }
}
コード例 #9
0
ファイル: GUIDialogNetworkSetup.cpp プロジェクト: LS80/xbmc
void CGUIDialogNetworkSetup::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  CSettingCategory *category = AddCategory("networksetupsettings", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogNetworkSetup: unable to setup settings");
    return;
  }

  CSettingGroup *group = AddGroup(category);
  if (group == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogNetworkSetup: unable to setup settings");
    return;
  }

  // Add our protocols
  StaticIntegerSettingOptions labels;
#ifdef HAS_FILESYSTEM_SMB
  labels.push_back(std::make_pair(20171, NET_PROTOCOL_SMB));
#endif
  labels.push_back(std::make_pair(20301, NET_PROTOCOL_HTTPS));
  labels.push_back(std::make_pair(20300, NET_PROTOCOL_HTTP));
  labels.push_back(std::make_pair(20254, NET_PROTOCOL_DAVS));
  labels.push_back(std::make_pair(20253, NET_PROTOCOL_DAV));
  labels.push_back(std::make_pair(20173, NET_PROTOCOL_FTP));
  labels.push_back(std::make_pair(20175, NET_PROTOCOL_UPNP));
  labels.push_back(std::make_pair(20304, NET_PROTOCOL_RSS));
#ifdef HAS_FILESYSTEM_NFS
  labels.push_back(std::make_pair(20259, NET_PROTOCOL_NFS));
#endif
#ifdef HAS_FILESYSTEM_SFTP
  labels.push_back(std::make_pair(20260, NET_PROTOCOL_SFTP));
#endif

  AddSpinner(group, SETTING_PROTOCOL, 1008, 0, m_protocol, labels);
  AddEdit(group, SETTING_SERVER_ADDRESS, 1010, 0, m_server, true);
  CSettingAction *subsetting = AddButton(group, SETTING_SERVER_BROWSE, 1024, 0, false);
  if (subsetting != NULL)
    subsetting->SetParent(SETTING_SERVER_ADDRESS);

  AddEdit(group, SETTING_REMOTE_PATH, 1012, 0, m_path, true);
  AddEdit(group, SETTING_PORT_NUMBER, 1013, 0, m_port, true);
  AddEdit(group, SETTING_USERNAME, 1014, 0, m_username, true);
  AddEdit(group, SETTING_PASSWORD, 15052, 0, m_password, true, true);
}
コード例 #10
0
void CGUIDialogProfileSettings::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  CSettingCategory *category = AddCategory("profilesettings", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogProfileSettings: unable to setup settings");
    return;
  }

  CSettingGroup *group = AddGroup(category);
  if (group == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogProfileSettings: unable to setup settings");
    return;
  }

  AddEdit(group, SETTING_PROFILE_NAME, 20093, 0, m_name);
  AddButton(group, SETTING_PROFILE_IMAGE, 20065, 0);

  if (!m_isDefault && m_showDetails)
    AddButton(group, SETTING_PROFILE_DIRECTORY, 20070, 0);

  if (m_showDetails ||
     (m_locks.mode == LOCK_MODE_EVERYONE && CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE))
    AddButton(group, SETTING_PROFILE_LOCKS, 20066, 0);

  if (!m_isDefault && m_showDetails)
  {
    CSettingGroup *groupMedia = AddGroup(category);
    if (groupMedia == NULL)
    {
      CLog::Log(LOGERROR, "CGUIDialogProfileSettings: unable to setup settings");
      return;
    }

    StaticIntegerSettingOptions entries;
    entries.push_back(std::make_pair(20062, 0));
    entries.push_back(std::make_pair(20063, 1));
    entries.push_back(std::make_pair(20061, 2));
    if (CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE)
      entries.push_back(std::make_pair(20107, 3));

    AddSpinner(groupMedia, SETTING_PROFILE_MEDIA, 20060, 0, m_dbMode, entries);
    AddSpinner(groupMedia, SETTING_PROFILE_MEDIA_SOURCES, 20094, 0, m_sourcesMode, entries);
  }
}
コード例 #11
0
void CMyRibbonBar::addTabSupport()
{
	CMFCRibbonCategory* pCategory = AddCategory (
		_T("Support"),
		IDB_SUPPORT16,
		IDB_SUPPORT);
	CMFCRibbonPanel* pPanelLocalHelp =pCategory->AddPanel (_T("Local Help System"), m_PanelImages.ExtractIcon(0));
	pPanelLocalHelp->Add (new CMFCRibbonButton (WM_SUPPORT_CONTENTS, _T("Contents"), -1,8));
	//pPanelLocalHelp->Add (new CMFCRibbonButton (WM_MAINFRAME_SUPPORT_LOCAL_EXPERT, _T("Expert Help"), -1,10));
	pPanelLocalHelp->Add(new CMFCRibbonButton(WM_SUPPORT_TIPOFTHEDAY,_T("Tip of the day"),-1,9));

	CMFCRibbonPanel* pPanelOnlineSupport =pCategory->AddPanel (_T("Online support"), m_PanelImages.ExtractIcon(0));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_HELPDESK, _T("System Help desk"), 4));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_FORUMS, _T("Public forums"), 6));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_MAILSUPPORT, _T("Mail Support"), 5));

	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_TUTORIALS, _T("Articles"), 7));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_FAQ, _T("FAQ"), 8));
	pPanelOnlineSupport->Add (new CMFCRibbonButton (WM_SUPPORT_UPDATE, _T("Update"), 9));

/*
	CMFCRibbonPanel* pPanelUpdate =pCategory->AddPanel (_T("Update"));
	pPanelUpdate->Add (new CMFCRibbonButton (ID_CHART_DESIGN_TYPE_CHANGE, _T("Update program"), -1,0));
*/


	CMFCRibbonPanel* pPanelLegalAndAbout =pCategory->AddPanel (_T("Product"), m_PanelImages.ExtractIcon(0));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_COPYRIGHT, _T("Copyright"), -1,11));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_LICENCEKEY, _T("Licence Key"), 10));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_ACTIVATE_PRODUCT, _T("Activate Product"), 11));
	pPanelLegalAndAbout->Add (new CMFCRibbonButton (WM_SUPPORT_ABOUT, _T("About"), 12));


	CMFCRibbonPanel* pPanelInvite =pCategory->AddPanel (_T("Links"), m_PanelImages.ExtractIcon(0));
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_VISIT, _T("Visit Potato Software"), -1,4));
	pPanelInvite->Add(new CMFCRibbonSeparator());

	pPanelInvite->Add(new CMFCRibbonLinkCtrl(WM_SUPPORT_INVITE, _T("Invite your friends"), _T("Invite your friends")));
	pPanelInvite->Add(new CMFCRibbonLinkCtrl(WM_SUPPORT_NEWS, _T("News"), _T("News")));
	pPanelInvite->Add(new CMFCRibbonLinkCtrl(WM_SUPPORT_PARTNER, _T("Partner with Potato Software"), _T("Partner with Potato Software")));
	pPanelInvite->Add(new CMFCRibbonSeparator());
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_GOOGLE_CODE, _T("Google code"), -1,10+4));
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_CODE_PROJECT, _T("Code Project"), -1,10+5));
	pPanelInvite->Add (new CMFCRibbonButton (WM_SUPPORT_BLOG, _T("Blog"), -1,13));

	
}
コード例 #12
0
ファイル: category.c プロジェクト: codestation/gclite
void IndexCategories(Category *head[], const char *path, int location)
{
    SceIoDirent dir;
    SceUID fd;
    u64 mtime;
    char full_path[16];
    int match;

    sce_paf_private_strcpy(full_path, path);
    SET_DEVICENAME(full_path, location);

    if((fd = sceIoDopen(full_path)) < 0) {
        return;
    }

    kprintf("Indexing categories from %s, loc: %i\n", path, location);
    match = 0;
    sce_paf_private_memset(&dir, 0, sizeof(SceIoDirent));

    while(1) {
        if(sceIoDread(fd, &dir) <= 0) {
            kprintf("End of directory list\n");
            sceIoDclose(fd);
            break;
        }
        kprintf("checking [%s], length: %i\n", dir.d_name, sce_paf_private_strlen(dir.d_name));
        if (FIO_S_ISDIR(dir.d_stat.st_mode) && dir.d_name[0] != '.') {
            if(!config.prefix && !is_game_folder(full_path, dir.d_name)) {
                if(has_directories(full_path, dir.d_name) > 0) {
                    match = 1;
                }
            } else if(config.prefix && sce_paf_private_strncmp(dir.d_name, "CAT_", 4) == 0) {
                if(has_directories(full_path, dir.d_name) > 0) {
                    sce_paf_private_strcpy(dir.d_name, dir.d_name + 4);
                    match = 1;
                }
            }
            if(match) {
                match = 0;
                sceRtcGetTick((pspTime *) &dir.d_stat.st_mtime, &mtime);
                kprintf("Adding category: [%s]\n", dir.d_name);
                AddCategory(head, dir.d_name, mtime, location);
            }
        }
    }
}
コード例 #13
0
bool wxTreeMultiXmlMapper::DoInitWizard(const wxString &start_tag)
{
    bool allok = false;
    
    // clean up the control first
    m_ctrl->DeleteAllItems();

    // reset the ID counter
    m_currentId = XMLMAP_BASE_ID;
    
    // obtain handle to document
    TiXmlHandle h(m_tiDoc);
    
    // find our first wizard declaration
    TiXmlHandle wizard = h.FirstChildElement(start_tag.c_str());

    // we expect it to be an element, and we should go from there with
    // parsing categories and other stuff..

    if(wizard.Element())
    {
        // we skip all and look for the first category element
        TiXmlElement *cat = wizard.FirstChildElement(XMLMAP_TAG_CATEGORY).Element();

        // go through the loop of creating all categories
        allok = (cat != 0);
        while(cat && allok)
        {
            // ok create a category root name, but only when we 
            // have a name to give it
            if(cat->Attribute(XMLMAP_ATTR_CAPTION))
            {
                wxTreeMultiItem item = AddCategory(cat, wxTreeMultiItem(0));
                allok = DoCreateControls(cat, item, 0, 0);
            }
            
            // find a next one
            if(allok)
                cat = cat->NextSiblingElement(XMLMAP_TAG_CATEGORY);
        }
    }

    return allok;
}
コード例 #14
0
void CMyRibbonBar::addTabExport()
{
	CMFCRibbonCategory* pCategory = AddCategory(_T("Export"), IDB_EXPORT16, IDB_EXPORT);



	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Chart"), m_PanelImages.ExtractIcon(20));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Save\nc"), -1, 0));
/*
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("PDF\nc"), -1, 0));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Image\nc"), -1, 0));
*/

	pPanel = pCategory->AddPanel(_T("Data Values"), m_PanelImages.ExtractIcon(20));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Add CVS\nc"), -1, 2));
	pPanel->Add(new CMFCRibbonButton(ID_CHART_DESIGN_TYPE_CHANGE, _T("Add to Excel\nc"), -1, 1));


}
コード例 #15
0
ファイル: smileys.cpp プロジェクト: kxepal/miranda-ng
void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMString& defaultFile)
{
	if (Proto_IsAccountEnabled(acc) && acc->szProtoName && IsSmileyProto(acc->szModuleName)) {
		CMString displayName(acc->tszAccountName ? acc->tszAccountName : A2T_SM(acc->szModuleName));
		CMString PhysProtoName, paths;
		DBVARIANT dbv;

		if (db_get_ts(NULL, acc->szModuleName, "AM_BaseProto", &dbv) == 0) {
			PhysProtoName = _T("AllProto");
			PhysProtoName += dbv.ptszVal;
			db_free(&dbv);
		}

		if (!PhysProtoName.IsEmpty())
			paths = g_SmileyCategories.GetSmileyCategory(PhysProtoName) ? g_SmileyCategories.GetSmileyCategory(PhysProtoName)->GetFilename() : _T("");

		if (paths.IsEmpty()) {
			const char* packnam = acc->szProtoName;
			if (mir_strcmp(packnam, "JABBER") == 0)
				packnam = "JGMail";
			else if (strstr(packnam, "SIP") != NULL)
				packnam = "MSN";

			char path[MAX_PATH];
			mir_snprintf(path, "Smileys\\nova\\%s.msl", packnam);

			paths = A2T_SM(path);
			CMString patha;
			pathToAbsolute(paths, patha);

			if (_taccess(patha.c_str(), 0) != 0)
				paths = defaultFile;
		}

		CMString tname(A2T_SM(acc->szModuleName));
		AddCategory(tname, displayName, acc->bIsVirtual ? smcVirtualProto : smcProto, paths);
	}
}
コード例 #16
0
void CMyRibbonBar::addTabHome()
{
	BOOL bNameValid;
	CString strTemp;


	CMFCRibbonCategory* pCategory = AddCategory(_T("Home"), IDB_WRITESMALL, IDB_WRITELARGE);

	// Create panel:
	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Connect to Data Sources"), m_PanelImages.ExtractIcon(3));

	pPanel->Add(new CMFCRibbonButton(WM_OPEN_TEST_FILE, _T("Single Test file"), -1, 5));
	pPanel->Add(new CMFCRibbonButton(WM_OPEN_TEST_SUITE, _T("Test suite"), -1, 4));
	pPanel->Add(new CMFCRibbonButton(WM_CONNECT_REMOTE, _T("connect to remote source"), -1, 1));

	pPanel = pCategory->AddPanel(_T("Edit and Synchronize"), m_PanelImages.ExtractIcon(3));


	pPanel->Add(new CMFCRibbonLabel(_T("Set Focus :")));
	CMFCRibbonComboBox* pCombo= new CMFCRibbonComboBox(WM_SELECT_FILEFOLDER, TRUE, -1,_T("Select File/Folder"),0);
	pPanel->Add(pCombo);
	pCombo = new CMFCRibbonComboBox(WM_SELECT_TEST, TRUE, -1,_T("Select Test"),7);
	pPanel->Add(pCombo);

	pPanel->SetJustifyColumns();



	pPanel->Add(new CMFCRibbonButton(WM_UPDATE_SUITE, _T("Update tests"), -1, 3));


	pPanel->InsertSeparator(5);

	pPanel->Add(new CMFCRibbonButton(WM_TEST_DESCRIPTION, _T("Description"), -1, 8));
	pPanel->Add(new CMFCRibbonButton(WM_TEST_DELETE, _T("Delete"), -1, 6));
	pPanel->Add(new CMFCRibbonButton(WM_TESTS_CLOSE, _T("Close"), -1, 7));

}
コード例 #17
0
ファイル: gl_canvas_wrapper.cpp プロジェクト: eranif/codelite
GLCanvasWrapper::GLCanvasWrapper()
    : wxcWidget(ID_WXGLCANVAS)
{
    m_namePattern = "m_glCanvas";

    SetPropertyString(_("Common Settings"), "wxGLCanvas");
    DelProperty(PROP_CONTROL_SPECIFIC_SETTINGS);
    AddCategory("wxGLCanvas Attribute List");

    AddProperty(new StringProperty("WX_GL_RGBA", _("Use true color palette (on if no attrs specified)")));
    m_attrs.Add("WX_GL_RGBA");

    AddProperty(new StringProperty("WX_GL_BUFFER_SIZE", _("bits for buffer if not WX_GL_RGBA")));
    m_attrs.Add("WX_GL_BUFFER_SIZE");

    AddProperty(new StringProperty("WX_GL_LEVEL", _("0 for main buffer, >0 for overlay, <0 for underlay")));
    m_attrs.Add("WX_GL_LEVEL");

    AddProperty(new StringProperty("WX_GL_DOUBLEBUFFER", _("use double buffering (on if no attrs specified)")));
    m_attrs.Add("WX_GL_DOUBLEBUFFER");

    AddProperty(new StringProperty("WX_GL_STEREO", _("use stereoscopic display")));
    m_attrs.Add("WX_GL_STEREO");

    AddProperty(new StringProperty("WX_GL_AUX_BUFFERS", _("number of auxiliary buffers")));
    m_attrs.Add("WX_GL_AUX_BUFFERS");

    AddProperty(new StringProperty("WX_GL_MIN_RED", _("use red buffer with most bits (> MIN_RED bits)")));
    m_attrs.Add("WX_GL_MIN_RED");

    AddProperty(new StringProperty("WX_GL_MIN_GREEN", _("use green buffer with most bits (> MIN_GREEN bits)")));
    m_attrs.Add("WX_GL_MIN_GREEN");

    AddProperty(new StringProperty("WX_GL_MIN_BLUE", _("use blue buffer with most bits (> MIN_BLUE bits)")));
    m_attrs.Add("WX_GL_MIN_BLUE");

    AddProperty(new StringProperty("WX_GL_MIN_ALPHA", _("use alpha buffer with most bits (> MIN_ALPHA bits)")));
    m_attrs.Add("WX_GL_MIN_ALPHA");

    AddProperty(new StringProperty("WX_GL_DEPTH_SIZE", _("bits for Z-buffer (0,16,32)")));
    m_attrs.Add("WX_GL_DEPTH_SIZE");

    AddProperty(new StringProperty("WX_GL_STENCIL_SIZE", _("bits for stencil buffer")));
    m_attrs.Add("WX_GL_STENCIL_SIZE");

    AddProperty(
        new StringProperty("WX_GL_MIN_ACCUM_RED", _("use red accum buffer with most bits (> MIN_ACCUM_RED bits)")));
    m_attrs.Add("WX_GL_MIN_ACCUM_RED");

    AddProperty(
        new StringProperty("WX_GL_MIN_ACCUM_GREEN", _("use green buffer with most bits (> MIN_ACCUM_GREEN bits)")));
    m_attrs.Add("WX_GL_MIN_ACCUM_GREEN");

    AddProperty(
        new StringProperty("WX_GL_MIN_ACCUM_BLUE", _("use blue buffer with most bits (> MIN_ACCUM_BLUE bits)")));
    m_attrs.Add("WX_GL_MIN_ACCUM_BLUE");

    AddProperty(
        new StringProperty("WX_GL_MIN_ACCUM_ALPHA", _("use alpha buffer with most bits (> MIN_ACCUM_ALPHA bits)")));
    m_attrs.Add("WX_GL_MIN_ACCUM_ALPHA");

    AddProperty(new StringProperty("WX_GL_SAMPLE_BUFFERS", _("1 for multisampling support (antialiasing)")));
    m_attrs.Add("WX_GL_SAMPLE_BUFFERS");

    AddProperty(new StringProperty("WX_GL_SAMPLES", _("4 for 2x2 antialiasing supersampling on most graphics cards")));
    m_attrs.Add("WX_GL_SAMPLES");

    SetName(GenerateName());
}
コード例 #18
0
ファイル: GUIDialogVideoSettings.cpp プロジェクト: has12/xbmc
void CGUIDialogVideoSettings::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  CSettingCategory *category = AddCategory("videosettings", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogVideoSettings: unable to setup settings");
    return;
  }

  // get all necessary setting groups
  CSettingGroup *groupVideoStream = AddGroup(category);
  if (groupVideoStream == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogVideoSettings: unable to setup settings");
    return;
  }
  CSettingGroup *groupVideo = AddGroup(category);
  if (groupVideo == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogVideoSettings: unable to setup settings");
    return;
  }
  CSettingGroup *groupVideoPlayback = AddGroup(category);
  if (groupVideoPlayback == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogVideoSettings: unable to setup settings");
    return;
  }
  CSettingGroup *groupStereoscopic = AddGroup(category);
  if (groupStereoscopic == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogVideoSettings: unable to setup settings");
    return;
  }
  CSettingGroup *groupSaveAsDefault = AddGroup(category);
  if (groupSaveAsDefault == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogVideoSettings: unable to setup settings");
    return;
  }

  bool usePopup = g_SkinInfo->HasSkinFile("DialogSlider.xml");

  CVideoSettings &videoSettings = CMediaSettings::GetInstance().GetCurrentVideoSettings();
  
  StaticIntegerSettingOptions entries;

  entries.clear();
  entries.push_back(std::make_pair(16039, VS_INTERLACEMETHOD_NONE));
  entries.push_back(std::make_pair(16019, VS_INTERLACEMETHOD_AUTO));
  entries.push_back(std::make_pair(20131, VS_INTERLACEMETHOD_RENDER_BLEND));
  entries.push_back(std::make_pair(20130, VS_INTERLACEMETHOD_RENDER_WEAVE_INVERTED));
  entries.push_back(std::make_pair(20129, VS_INTERLACEMETHOD_RENDER_WEAVE));
  entries.push_back(std::make_pair(16022, VS_INTERLACEMETHOD_RENDER_BOB_INVERTED));
  entries.push_back(std::make_pair(16021, VS_INTERLACEMETHOD_RENDER_BOB));
  entries.push_back(std::make_pair(16020, VS_INTERLACEMETHOD_DEINTERLACE));
  entries.push_back(std::make_pair(16036, VS_INTERLACEMETHOD_DEINTERLACE_HALF));
  entries.push_back(std::make_pair(16314, VS_INTERLACEMETHOD_INVERSE_TELECINE));
  entries.push_back(std::make_pair(16311, VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL));
  entries.push_back(std::make_pair(16310, VS_INTERLACEMETHOD_VDPAU_TEMPORAL));
  entries.push_back(std::make_pair(16325, VS_INTERLACEMETHOD_VDPAU_BOB));
  entries.push_back(std::make_pair(16318, VS_INTERLACEMETHOD_VDPAU_TEMPORAL_SPATIAL_HALF));
  entries.push_back(std::make_pair(16317, VS_INTERLACEMETHOD_VDPAU_TEMPORAL_HALF));
  entries.push_back(std::make_pair(16314, VS_INTERLACEMETHOD_VDPAU_INVERSE_TELECINE));
  entries.push_back(std::make_pair(16325, VS_INTERLACEMETHOD_AUTO_ION));
  entries.push_back(std::make_pair(16327, VS_INTERLACEMETHOD_VAAPI_BOB));
  entries.push_back(std::make_pair(16328, VS_INTERLACEMETHOD_VAAPI_MADI));
  entries.push_back(std::make_pair(16329, VS_INTERLACEMETHOD_VAAPI_MACI));
  entries.push_back(std::make_pair(16330, VS_INTERLACEMETHOD_MMAL_ADVANCED));
  entries.push_back(std::make_pair(16331, VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF));
  entries.push_back(std::make_pair(16332, VS_INTERLACEMETHOD_MMAL_BOB));
  entries.push_back(std::make_pair(16333, VS_INTERLACEMETHOD_MMAL_BOB_HALF));
  entries.push_back(std::make_pair(16334, VS_INTERLACEMETHOD_IMX_FASTMOTION));
  entries.push_back(std::make_pair(16335, VS_INTERLACEMETHOD_IMX_FASTMOTION_DOUBLE));

  /* remove unsupported methods */
  for (StaticIntegerSettingOptions::iterator it = entries.begin(); it != entries.end(); )
  {
    if (g_application.m_pPlayer->Supports((EINTERLACEMETHOD)it->second))
      ++it;
    else
      it = entries.erase(it);
  }

  if (!entries.empty())
  {
    AddSpinner(groupVideo, SETTING_VIDEO_INTERLACEMETHOD, 16038, 0, static_cast<int>(videoSettings.m_InterlaceMethod), entries);
  }

  entries.clear();
  entries.push_back(std::make_pair(16301, VS_SCALINGMETHOD_NEAREST));
  entries.push_back(std::make_pair(16302, VS_SCALINGMETHOD_LINEAR));
  entries.push_back(std::make_pair(16303, VS_SCALINGMETHOD_CUBIC ));
  entries.push_back(std::make_pair(16304, VS_SCALINGMETHOD_LANCZOS2));
  entries.push_back(std::make_pair(16323, VS_SCALINGMETHOD_SPLINE36_FAST));
  entries.push_back(std::make_pair(16315, VS_SCALINGMETHOD_LANCZOS3_FAST));
  entries.push_back(std::make_pair(16322, VS_SCALINGMETHOD_SPLINE36));
  entries.push_back(std::make_pair(16305, VS_SCALINGMETHOD_LANCZOS3));
  entries.push_back(std::make_pair(16306, VS_SCALINGMETHOD_SINC8));
//  entries.push_back(make_pair(?????, VS_SCALINGMETHOD_NEDI));
  entries.push_back(std::make_pair(16307, VS_SCALINGMETHOD_BICUBIC_SOFTWARE));
  entries.push_back(std::make_pair(16308, VS_SCALINGMETHOD_LANCZOS_SOFTWARE));
  entries.push_back(std::make_pair(16309, VS_SCALINGMETHOD_SINC_SOFTWARE));
  entries.push_back(std::make_pair(13120, VS_SCALINGMETHOD_VDPAU_HARDWARE));
  entries.push_back(std::make_pair(16319, VS_SCALINGMETHOD_DXVA_HARDWARE));
  entries.push_back(std::make_pair(16316, VS_SCALINGMETHOD_AUTO));

  /* remove unsupported methods */
  for(StaticIntegerSettingOptions::iterator it = entries.begin(); it != entries.end(); )
  {
    if (g_application.m_pPlayer->Supports((ESCALINGMETHOD)it->second))
      ++it;
    else
      it = entries.erase(it);
  }

  AddSpinner(groupVideo, SETTING_VIDEO_SCALINGMETHOD, 16300, 0, static_cast<int>(videoSettings.m_ScalingMethod), entries);

#ifdef HAS_VIDEO_PLAYBACK
  AddVideoStreams(groupVideoStream, SETTING_VIDEO_STREAM);

  if (g_application.m_pPlayer->Supports(RENDERFEATURE_STRETCH) || g_application.m_pPlayer->Supports(RENDERFEATURE_PIXEL_RATIO))
  {
    entries.clear();
    for (int i = 0; i < 7; ++i)
      entries.push_back(std::make_pair(630 + i, i));
    AddSpinner(groupVideo, SETTING_VIDEO_VIEW_MODE, 629, 0, videoSettings.m_ViewMode, entries);
  }
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_ZOOM))
    AddSlider(groupVideo, SETTING_VIDEO_ZOOM, 216, 0, videoSettings.m_CustomZoomAmount, "%2.2f", 0.5f, 0.01f, 2.0f, 216, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_VERTICAL_SHIFT))
    AddSlider(groupVideo, SETTING_VIDEO_VERTICAL_SHIFT, 225, 0, videoSettings.m_CustomVerticalShift, "%2.2f", -2.0f, 0.01f, 2.0f, 225, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_PIXEL_RATIO))
    AddSlider(groupVideo, SETTING_VIDEO_PIXEL_RATIO, 217, 0, videoSettings.m_CustomPixelRatio, "%2.2f", 0.5f, 0.01f, 2.0f, 217, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_POSTPROCESS))
    AddToggle(groupVideo, SETTING_VIDEO_POSTPROCESS, 16400, 0, videoSettings.m_PostProcess);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_BRIGHTNESS))
    AddPercentageSlider(groupVideoPlayback, SETTING_VIDEO_BRIGHTNESS, 464, 0, static_cast<int>(videoSettings.m_Brightness), 14047, 1, 464, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_CONTRAST))
    AddPercentageSlider(groupVideoPlayback, SETTING_VIDEO_CONTRAST, 465, 0, static_cast<int>(videoSettings.m_Contrast), 14047, 1, 465, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_GAMMA))
    AddPercentageSlider(groupVideoPlayback, SETTING_VIDEO_GAMMA, 466, 0, static_cast<int>(videoSettings.m_Gamma), 14047, 1, 466, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_NOISE))
    AddSlider(groupVideoPlayback, SETTING_VIDEO_VDPAU_NOISE, 16312, 0, videoSettings.m_NoiseReduction, "%2.2f", 0.0f, 0.01f, 1.0f, 16312, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_SHARPNESS))
    AddSlider(groupVideoPlayback, SETTING_VIDEO_VDPAU_SHARPNESS, 16313, 0, videoSettings.m_Sharpness, "%2.2f", -1.0f, 0.02f, 1.0f, 16313, usePopup);
  if (g_application.m_pPlayer->Supports(RENDERFEATURE_NONLINSTRETCH))
    AddToggle(groupVideoPlayback, SETTING_VIDEO_NONLIN_STRETCH, 659, 0, videoSettings.m_CustomNonLinStretch);
#endif

  // stereoscopic settings
  entries.clear();
  entries.push_back(std::make_pair(16316, RENDER_STEREO_MODE_OFF));
  entries.push_back(std::make_pair(36503, RENDER_STEREO_MODE_SPLIT_HORIZONTAL));
  entries.push_back(std::make_pair(36504, RENDER_STEREO_MODE_SPLIT_VERTICAL));
  AddSpinner(groupStereoscopic, SETTING_VIDEO_STEREOSCOPICMODE  , 36535, 0, videoSettings.m_StereoMode, entries);
  AddToggle(groupStereoscopic, SETTING_VIDEO_STEREOSCOPICINVERT, 36536, 0, videoSettings.m_StereoInvert);

  // general settings
  AddButton(groupSaveAsDefault, SETTING_VIDEO_MAKE_DEFAULT, 12376, 0);
  AddButton(groupSaveAsDefault, SETTING_VIDEO_CALIBRATION, 214, 0);
}
コード例 #19
0
void CGUIDialogAudioSubtitleSettings::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  CSettingCategory *category = AddCategory("audiosubtitlesettings", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogAudioSubtitleSettings: unable to setup settings");
    return;
  }

  // get all necessary setting groups
  CSettingGroup *groupAudio = AddGroup(category);
  if (groupAudio == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogAudioSubtitleSettings: unable to setup settings");
    return;
  }
  CSettingGroup *groupSubtitles = AddGroup(category);
  if (groupSubtitles == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogAudioSubtitleSettings: unable to setup settings");
    return;
  }
  CSettingGroup *groupSaveAsDefault = AddGroup(category);
  if (groupSaveAsDefault == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogAudioSubtitleSettings: unable to setup settings");
    return;
  }

  bool usePopup = g_SkinInfo->HasSkinFile("DialogSlider.xml");

  CVideoSettings &videoSettings = CMediaSettings::GetInstance().GetCurrentVideoSettings();
  
  if (g_application.m_pPlayer->HasPlayer())
  {
    g_application.m_pPlayer->GetAudioCapabilities(m_audioCaps);
    g_application.m_pPlayer->GetSubtitleCapabilities(m_subCaps);
  }

  // register IsPlayingPassthrough condition
  m_settingsManager->AddCondition("IsPlayingPassthrough", IsPlayingPassthrough);

  CSettingDependency dependencyAudioOutputPassthroughDisabled(SettingDependencyTypeEnable, m_settingsManager);
  dependencyAudioOutputPassthroughDisabled.Or()
    ->Add(CSettingDependencyConditionPtr(new CSettingDependencyCondition(SETTING_AUDIO_PASSTHROUGH, "false", SettingDependencyOperatorEquals, false, m_settingsManager)))
    ->Add(CSettingDependencyConditionPtr(new CSettingDependencyCondition("IsPlayingPassthrough", "", "", true, m_settingsManager)));
  SettingDependencies depsAudioOutputPassthroughDisabled;
  depsAudioOutputPassthroughDisabled.push_back(dependencyAudioOutputPassthroughDisabled);

  m_dspEnabled = CServiceBroker::GetSettings().GetBool(CSettings::SETTING_AUDIOOUTPUT_DSPADDONSENABLED);

  // audio settings
  // audio volume setting
  m_volume = g_application.GetVolume(false);
  CSettingNumber *settingAudioVolume = AddSlider(groupAudio, SETTING_AUDIO_VOLUME, 13376, 0, m_volume, 14054, VOLUME_MINIMUM, VOLUME_MAXIMUM / 100.0f, VOLUME_MAXIMUM);
  settingAudioVolume->SetDependencies(depsAudioOutputPassthroughDisabled);
  static_cast<CSettingControlSlider*>(settingAudioVolume->GetControl())->SetFormatter(SettingFormatterPercentAsDecibel);

  if (m_dspEnabled)
    AddButton(groupAudio, SETTING_AUDIO_DSP, 24136, 0);

  // audio volume amplification setting
  if (SupportsAudioFeature(IPC_AUD_AMP) && !m_dspEnabled)
  {
    CSettingNumber *settingAudioVolumeAmplification = AddSlider(groupAudio, SETTING_AUDIO_VOLUME_AMPLIFICATION, 660, 0, videoSettings.m_VolumeAmplification, 14054, VOLUME_DRC_MINIMUM * 0.01f, (VOLUME_DRC_MAXIMUM - VOLUME_DRC_MINIMUM) / 6000.0f, VOLUME_DRC_MAXIMUM * 0.01f);
    settingAudioVolumeAmplification->SetDependencies(depsAudioOutputPassthroughDisabled);
  }

  // audio delay setting
  if (SupportsAudioFeature(IPC_AUD_OFFSET) && !m_dspEnabled)
  {
    CSettingNumber *settingAudioDelay = AddSlider(groupAudio, SETTING_AUDIO_DELAY, 297, 0, videoSettings.m_AudioDelay, 0, -g_advancedSettings.m_videoAudioDelayRange, 0.025f, g_advancedSettings.m_videoAudioDelayRange, 297, usePopup);
    static_cast<CSettingControlSlider*>(settingAudioDelay->GetControl())->SetFormatter(SettingFormatterDelay);
  }
  
  // audio stream setting
  if (SupportsAudioFeature(IPC_AUD_SELECT_STREAM))
    AddAudioStreams(groupAudio, SETTING_AUDIO_STREAM);

  // audio output to all speakers setting
  //! @todo remove this setting
  if (SupportsAudioFeature(IPC_AUD_OUTPUT_STEREO) && !m_dspEnabled)
    AddToggle(groupAudio, SETTING_AUDIO_OUTPUT_TO_ALL_SPEAKERS, 252, 0, videoSettings.m_OutputToAllSpeakers);

  // audio digital/analog setting
  if (SupportsAudioFeature(IPC_AUD_SELECT_OUTPUT))
  {
    m_passthrough = CServiceBroker::GetSettings().GetBool(CSettings::SETTING_AUDIOOUTPUT_PASSTHROUGH);
    AddToggle(groupAudio, SETTING_AUDIO_PASSTHROUGH, 348, 0, m_passthrough);
  }

  // subtitle settings
  m_subtitleVisible = g_application.m_pPlayer->GetSubtitleVisible();
  // subtitle enabled setting
  AddToggle(groupSubtitles, SETTING_SUBTITLE_ENABLE, 13397, 0, m_subtitleVisible);

  // subtitle delay setting
  if (SupportsSubtitleFeature(IPC_SUBS_OFFSET))
  {
    CSettingNumber *settingSubtitleDelay = AddSlider(groupSubtitles, SETTING_SUBTITLE_DELAY, 22006, 0, videoSettings.m_SubtitleDelay, 0, -g_advancedSettings.m_videoSubsDelayRange, 0.1f, g_advancedSettings.m_videoSubsDelayRange, 22006, usePopup);
    static_cast<CSettingControlSlider*>(settingSubtitleDelay->GetControl())->SetFormatter(SettingFormatterDelay);
  }

  // subtitle stream setting
  if (SupportsSubtitleFeature(IPC_SUBS_SELECT))
    AddSubtitleStreams(groupSubtitles, SETTING_SUBTITLE_STREAM);

  // subtitle browser setting
  if (SupportsSubtitleFeature(IPC_SUBS_EXTERNAL))
    AddButton(groupSubtitles, SETTING_SUBTITLE_BROWSER, 13250, 0);

  // subtitle stream setting
  AddButton(groupSaveAsDefault, SETTING_AUDIO_MAKE_DEFAULT, 12376, 0);
}
コード例 #20
0
bool wxTreeMultiXmlMapper::DoCreateControls(TiXmlElement *cat, wxTreeMultiItem &pitem, wxWindow *pwnd, wxSizer *szr)
{
    bool allOk = true;
    
    wxCHECK(cat, false);
    wxString value;
    wxWindow *wnd = 0;

    // go through all siblings of this 
    TiXmlNode *node = cat->FirstChild();
    while(node && allOk)
    {
        // cast to element. When it is an element, work this
        TiXmlElement *el = node->ToElement();
        if(el)
        {
            value = el->Value();
            
            // when we are dealing with a <row> element, we introduce a wxBoxSizer + panel
            // to add more on one row
            if(value.IsSameAs(XMLMAP_TAG_ROW, false))
            {
                // we are in a row. All elements inside need to be parent
                // of this element, and we use a sizer to layout
                wxPanel *pnl = new wxPanel((pwnd != 0 ? pwnd : m_ctrl), -1);
                wxBoxSizer *bsz = new wxBoxSizer(wxHORIZONTAL);
                allOk = DoCreateControls(el, pitem, pnl, bsz);
                if(allOk)
                {
                    // ok now we have all added elements, set the sizer and 
                    // add the item when we have no parent control nomore
                    pnl->SetSizerAndFit(bsz);
                    if(pwnd == 0)
                    {
                        // add the window 
                        m_ctrl->AppendWindow(pitem, pnl);
                    }
                }
                else
                    delete bsz;
            }
            else if(value.IsSameAs(XMLMAP_TAG_CATEGORY, false)) // is it an <category> element?
            {
                if(!pwnd)
                {
                    // only allow when we have no parent window
                    wxTreeMultiItem item = AddCategory(el, pitem);
                    allOk = DoCreateControls(el, item, 0, 0);
                }
                else
                {
                    // we do not allow a category inside another window!
                    // so we report this as an error
                    wxLogError(_("Cannot have a <" XMLMAP_TAG_CATEGORY "> inside <" XMLMAP_TAG_ROW "> tags!"));
                    allOk = false;
                }
            }
            else if(value.IsSameAs(XMLMAP_TAG_CHECKBOX, false)) 
                // is it a <checkbox> element?
                wnd = AddCheckBox(el, (pwnd != 0 ? pwnd : m_ctrl));
            else if(value.IsSameAs(XMLMAP_TAG_BUTTON, false)) 
                // is it a <button> element?
                wnd = AddButton(el, (pwnd != 0 ? pwnd : m_ctrl));
            else
                // we encountered a strange element, just ignore
                allOk = true;

            // if we have a window to add, do this.
            if(wnd)
            {
                // add to sizer when there is one, else
                // do not add but trust the parent will be added
                if(szr)
                    szr->Add(wnd, 0, wxALIGN_CENTER_VERTICAL);
                else
                    m_ctrl->AppendWindow(pitem, wnd);
                
                allOk = (wnd != 0);
                wnd = 0;
            }
        }

        // get next sibling on this level
        if(allOk)
            node = node->NextSibling();
    }

    return allOk;
}
コード例 #21
0
void CMyRibbonBar::addTabCompare()
{
	CMFCRibbonCategory* pCategory = AddCategory(_T("Compare"), IDB_ANALYZE16, IDB_COMPARE);

	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Selection"), m_PanelImages.ExtractIcon(13));

	pPanel->Add(new CMFCRibbonLabel(_T("Set Focus :")));
	CMFCRibbonComboBox* pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_FOCUS_SELTEST, TRUE, -1,_T("Select Test"),0);
/*
	pSelectionCB->AddItem(_T("Test1"),0);
	pSelectionCB->AddItem(_T("Test2"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);

	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_FOCUS_SELITEM, TRUE, -1,_T("Select Item"),7);
/*
	pSelectionCB->AddItem(_T("ActivityA"),0);
	pSelectionCB->AddItem(_T("Task T1"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);

	pPanel->SetJustifyColumns();

//
	pPanel = pCategory->AddPanel(_T("Single Activity"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_TIMELINE, _T("Show TimeLine"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_STAGES, _T("Differenced events"), -1, 1));

	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_SINGLEACTIVITY_SELTASK, TRUE, -1,_T("Task :"),3);
/*
	pSelectionCB->AddItem(_T("Task T0"),0);
	pSelectionCB->AddItem(_T("Task T1"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_WITHTASK_STACKED, _T("Stacked"), 0, 2));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_WITHTASK_TOTAL, _T("Total Times"), 0, 3));
	//
	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Worker :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_SINGLEACTIVITY_SELWORKER, TRUE, -1,_T("Thread :"),1);
	/*
	pSelectionCB->AddItem(_T("Worker T0"),0);
		pSelectionCB->AddItem(_T("Thread T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEACTIVITY_WITHWORKER_TOTAL, _T("Time Total"), 0, 4));

	pPanel = pCategory->AddPanel(_T("All Activities"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SALLACTIVITIES_TOTAL, _T("Total time"), 0, 7));


	pPanel = pCategory->AddPanel(_T("Single Task"), m_PanelImages.ExtractIcon(19));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLETASK_RUNHISTO, _T("Runs History"), 0, 5));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLETASK_TOTAL, _T("Total Time"), -1, 6));

	pPanel = pCategory->AddPanel(_T("All Tasks"), m_PanelImages.ExtractIcon(19));

	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_ALLTASKS_TOTAL, _T("Total Time"), 0, 8));


	pPanel = pCategory->AddPanel(_T("Worker"), m_PanelImages.ExtractIcon(17));

	//pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_RUNPAUSE, _T("Run|Pause Time"), 0, 10));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_RUNHISTO, _T("Run History"), 0, 11));
	pPanel->AddSeparator();

	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_COMPARE_SINGLEWORKER_SELTASK, TRUE, -1,_T("Task :"),3);
	/*
	pSelectionCB->AddItem(_T("Task T0"),0);
		pSelectionCB->AddItem(_T("Task T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);
	/*pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_WITHTASK_STACKED, _T("Stacked"), 0, 0));*/
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_SINGLEWORKER_WITHTASK_TOTAL, _T("Time Total"), 0, 12));

	pPanel = pCategory->AddPanel(_T("All Workers"), m_PanelImages.ExtractIcon(27));
	pPanel->Add(new CMFCRibbonButton(WM_COMPARE_ALLWORKERS_TOTAL, _T("Total Times"), 0, 13));

	

}
コード例 #22
0
ファイル: settingsdialog.cpp プロジェクト: Gu1/Clementine
SettingsDialog::SettingsDialog(Application* app, BackgroundStreams* streams,
                               QWidget* parent)
    : QDialog(parent),
      app_(app),
      model_(app_->library_model()->directory_model()),
      gst_engine_(qobject_cast<GstEngine*>(app_->player()->engine())),
      song_info_view_(nullptr),
      streams_(streams),
      global_search_(app_->global_search()),
      appearance_(app_->appearance()),
      ui_(new Ui_SettingsDialog),
      loading_settings_(false) {
  ui_->setupUi(this);
  ui_->list->setItemDelegate(new SettingsItemDelegate(this));

  QTreeWidgetItem* general = AddCategory(tr("General"));

  AddPage(Page_Playback, new PlaybackSettingsPage(this), general);
  AddPage(Page_Behaviour, new BehaviourSettingsPage(this), general);
  AddPage(Page_Library, new LibrarySettingsPage(this), general);
  AddPage(Page_Proxy, new NetworkProxySettingsPage(this), general);
  AddPage(Page_Transcoding, new TranscoderSettingsPage(this), general);
  AddPage(Page_NetworkRemote, new NetworkRemoteSettingsPage(this), general);

#ifdef HAVE_WIIMOTEDEV
  AddPage(Page_Wiimotedev, new WiimoteSettingsPage(this), general);
#endif

  // User interface
  QTreeWidgetItem* iface = AddCategory(tr("User interface"));
  AddPage(Page_GlobalShortcuts, new GlobalShortcutsSettingsPage(this), iface);
  AddPage(Page_GlobalSearch, new GlobalSearchSettingsPage(this), iface);
  AddPage(Page_Appearance, new AppearanceSettingsPage(this), iface);
  AddPage(Page_SongInformation, new SongInfoSettingsPage(this), iface);
  AddPage(Page_Notifications, new NotificationsSettingsPage(this), iface);

  // Internet providers
  QTreeWidgetItem* providers = AddCategory(tr("Internet providers"));

#ifdef HAVE_LIBLASTFM
  AddPage(Page_Lastfm, new LastFMSettingsPage(this), providers);
#endif

  AddPage(Page_Grooveshark, new GroovesharkSettingsPage(this), providers);

#ifdef HAVE_GOOGLE_DRIVE
  AddPage(Page_GoogleDrive, new GoogleDriveSettingsPage(this), providers);
#endif

#ifdef HAVE_DROPBOX
  AddPage(Page_Dropbox, new DropboxSettingsPage(this), providers);
#endif

#ifdef HAVE_BOX
  AddPage(Page_Box, new BoxSettingsPage(this), providers);
#endif

#ifdef HAVE_SKYDRIVE
  AddPage(Page_Skydrive, new SkydriveSettingsPage(this), providers);
#endif

  AddPage(Page_SoundCloud, new SoundCloudSettingsPage(this), providers);
  AddPage(Page_Spotify, new SpotifySettingsPage(this), providers);

#ifdef HAVE_VK
  AddPage(Page_Vk, new VkSettingsPage(this), providers);
#endif

#ifdef HAVE_SEAFILE
  AddPage(Page_Seafile, new SeafileSettingsPage(this), providers);
#endif



  AddPage(Page_Magnatune, new MagnatuneSettingsPage(this), providers);
  AddPage(Page_DigitallyImported, new DigitallyImportedSettingsPage(this),
          providers);
  AddPage(Page_BackgroundStreams, new BackgroundStreamsSettingsPage(this),
          providers);
  AddPage(Page_Subsonic, new SubsonicSettingsPage(this), providers);
  AddPage(Page_Podcasts, new PodcastSettingsPage(this), providers);

  providers->sortChildren(0, Qt::AscendingOrder);

  // List box
  connect(ui_->list,
          SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
          SLOT(CurrentItemChanged(QTreeWidgetItem*)));
  ui_->list->setCurrentItem(pages_[Page_Playback].item_);

  // Make sure the list is big enough to show all the items
  ui_->list->setMinimumWidth(
      static_cast<QAbstractItemView*>(ui_->list)->sizeHintForColumn(0));

  ui_->buttonBox->button(QDialogButtonBox::Cancel)
      ->setShortcut(QKeySequence::Close);
}
コード例 #23
0
void EditMetadataDialog::customEvent(QEvent *levent)
{
    if (levent->type() == DialogCompletionEvent::kEventType)
    {
        DialogCompletionEvent *dce = (DialogCompletionEvent*)(levent);

        const QString resultid = dce->GetId();

        if (resultid == CEID_COVERARTFILE)
            SetCoverArt(dce->GetResultText());
        else if (resultid == CEID_BANNERFILE)
            SetBanner(dce->GetResultText());
        else if (resultid == CEID_FANARTFILE)
            SetFanart(dce->GetResultText());
        else if (resultid == CEID_SCREENSHOTFILE)
            SetScreenshot(dce->GetResultText());
        else if (resultid == CEID_TRAILERFILE)
            SetTrailer(dce->GetResultText());
        else if (resultid == CEID_NEWCATEGORY)
            AddCategory(dce->GetResultText());
    }
    else if (levent->type() == MetadataLookupEvent::kEventType)
    {
        MetadataLookupEvent *lue = (MetadataLookupEvent *)levent;

        MetadataLookupList lul = lue->lookupList;

        if (lul.isEmpty())
            return;

        // There should really only be one result here.
        // If not, USER ERROR!
        if (lul.count() == 1)
        {
            OnArtworkSearchDone(lul[0]);
        }
        else
        {
            if (m_busyPopup)
            {
                m_busyPopup->Close();
                m_busyPopup = NULL;
            }
        }
    }
    else if (levent->type() == MetadataLookupFailure::kEventType)
    {
        MetadataLookupFailure *luf = (MetadataLookupFailure *)levent;

        MetadataLookupList lul = luf->lookupList;

        if (m_busyPopup)
        {
            m_busyPopup->Close();
            m_busyPopup = NULL;
        }

        if (lul.size())
        {
            MetadataLookup *lookup = lul[0];
            LOG(VB_GENERAL, LOG_INFO,
                QString("No results found for %1 %2 %3").arg(lookup->GetTitle())
                    .arg(lookup->GetSeason()).arg(lookup->GetEpisode()));
        }
    }
    else if (levent->type() == ImageDLEvent::kEventType)
    {
        ImageDLEvent *ide = (ImageDLEvent *)levent;

        MetadataLookup *lookup = ide->item;

        if (!lookup)
            return;

        handleDownloadedImages(lookup);
    }
    else if (levent->type() == ImageDLFailureEvent::kEventType)
    {
        MythErrorNotification n(tr("Failed to retrieve image"),
                                tr("Metadata Editor"),
                                tr("Check logs"));
        GetNotificationCenter()->Queue(n);
    }
}
コード例 #24
0
ファイル: gui.cpp プロジェクト: VonChenPlus/reactos
    VOID InitCategoriesList(VOID)
    {
        HTREEITEM hRootItem1, hRootItem2;

        hRootItem1 = AddCategory(TVI_ROOT, IDS_INSTALLED, IDI_CATEGORY);
        AddCategory(hRootItem1, IDS_APPLICATIONS, IDI_APPS);
        AddCategory(hRootItem1, IDS_UPDATES, IDI_APPUPD);

        hRootItem2 = AddCategory(TVI_ROOT, IDS_AVAILABLEFORINST, IDI_CATEGORY);
        AddCategory(hRootItem2, IDS_CAT_AUDIO, IDI_CAT_AUDIO);
        AddCategory(hRootItem2, IDS_CAT_VIDEO, IDI_CAT_VIDEO);
        AddCategory(hRootItem2, IDS_CAT_GRAPHICS, IDI_CAT_GRAPHICS);
        AddCategory(hRootItem2, IDS_CAT_GAMES, IDI_CAT_GAMES);
        AddCategory(hRootItem2, IDS_CAT_INTERNET, IDI_CAT_INTERNET);
        AddCategory(hRootItem2, IDS_CAT_OFFICE, IDI_CAT_OFFICE);
        AddCategory(hRootItem2, IDS_CAT_DEVEL, IDI_CAT_DEVEL);
        AddCategory(hRootItem2, IDS_CAT_EDU, IDI_CAT_EDU);
        AddCategory(hRootItem2, IDS_CAT_ENGINEER, IDI_CAT_ENGINEER);
        AddCategory(hRootItem2, IDS_CAT_FINANCE, IDI_CAT_FINANCE);
        AddCategory(hRootItem2, IDS_CAT_SCIENCE, IDI_CAT_SCIENCE);
        AddCategory(hRootItem2, IDS_CAT_TOOLS, IDI_CAT_TOOLS);
        AddCategory(hRootItem2, IDS_CAT_DRIVERS, IDI_CAT_DRIVERS);
        AddCategory(hRootItem2, IDS_CAT_LIBS, IDI_CAT_LIBS);
        AddCategory(hRootItem2, IDS_CAT_OTHER, IDI_CAT_OTHER);

        m_TreeView->SetImageList(hImageTreeView, TVSIL_NORMAL);
        m_TreeView->Expand(hRootItem2, TVE_EXPAND);
        m_TreeView->Expand(hRootItem1, TVE_EXPAND);
        m_TreeView->SelectItem(hRootItem1);
    }
コード例 #25
0
void CGUIDialogCMSSettings::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  const std::shared_ptr<CSettingCategory> category = AddCategory("cms", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogCMSSettings: unable to setup settings");
    return;
  }

  // get all necessary setting groups
  const std::shared_ptr<CSettingGroup> groupColorManagement = AddGroup(category);
  if (groupColorManagement == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogCMSSettings: unable to setup settings");
    return;
  }

  bool usePopup = g_SkinInfo->HasSkinFile("DialogSlider.xml");

  TranslatableIntegerSettingOptions entries;

  // create "depsCmsEnabled" for settings depending on CMS being enabled
  CSettingDependency dependencyCmsEnabled(SettingDependencyType::Enable, GetSettingsManager());
  dependencyCmsEnabled.Or()
    ->Add(CSettingDependencyConditionPtr(new CSettingDependencyCondition(SETTING_VIDEO_CMSENABLE, "true", SettingDependencyOperator::Equals, false, GetSettingsManager())));
  SettingDependencies depsCmsEnabled;
  depsCmsEnabled.push_back(dependencyCmsEnabled);

  // create "depsCms3dlut" for 3dlut settings
  CSettingDependency dependencyCms3dlut(SettingDependencyType::Visible, GetSettingsManager());
  dependencyCms3dlut.And()
    ->Add(CSettingDependencyConditionPtr(new CSettingDependencyCondition(SETTING_VIDEO_CMSMODE, std::to_string(CMS_MODE_3DLUT), SettingDependencyOperator::Equals, false, GetSettingsManager())));
  SettingDependencies depsCms3dlut;
  depsCms3dlut.push_back(dependencyCmsEnabled);
  depsCms3dlut.push_back(dependencyCms3dlut);

  // create "depsCmsIcc" for display settings with icc profile
  CSettingDependency dependencyCmsIcc(SettingDependencyType::Visible, GetSettingsManager());
  dependencyCmsIcc.And()
    ->Add(CSettingDependencyConditionPtr(new CSettingDependencyCondition(SETTING_VIDEO_CMSMODE, std::to_string(CMS_MODE_PROFILE), SettingDependencyOperator::Equals, false, GetSettingsManager())));
  SettingDependencies depsCmsIcc;
  depsCmsIcc.push_back(dependencyCmsEnabled);
  depsCmsIcc.push_back(dependencyCmsIcc);

  // create "depsCmsGamma" for effective gamma adjustment (not available with bt.1886)
  CSettingDependency dependencyCmsGamma(SettingDependencyType::Visible, GetSettingsManager());
  dependencyCmsGamma.And()
    ->Add(CSettingDependencyConditionPtr(new CSettingDependencyCondition(SETTING_VIDEO_CMSGAMMAMODE, std::to_string(CMS_TRC_BT1886), SettingDependencyOperator::Equals, true, GetSettingsManager())));
  SettingDependencies depsCmsGamma;
  depsCmsGamma.push_back(dependencyCmsEnabled);
  depsCmsGamma.push_back(dependencyCmsIcc);
  depsCmsGamma.push_back(dependencyCmsGamma);

  // color management settings
  AddToggle(groupColorManagement, SETTING_VIDEO_CMSENABLE, 36560, SettingLevel::Basic, CServiceBroker::GetSettings().GetBool(SETTING_VIDEO_CMSENABLE));

  int currentMode = CServiceBroker::GetSettings().GetInt(SETTING_VIDEO_CMSMODE);
  entries.clear();
  // entries.push_back(std::make_pair(16039, CMS_MODE_OFF)); // FIXME: get from CMS class
  entries.push_back(std::make_pair(36580, CMS_MODE_3DLUT));
#ifdef HAVE_LCMS2
  entries.push_back(std::make_pair(36581, CMS_MODE_PROFILE));
#endif
  std::shared_ptr<CSettingInt> settingCmsMode = AddSpinner(groupColorManagement, SETTING_VIDEO_CMSMODE, 36562, SettingLevel::Basic, currentMode, entries);
  settingCmsMode->SetDependencies(depsCmsEnabled);

  std::string current3dLUT = CServiceBroker::GetSettings().GetString(SETTING_VIDEO_CMS3DLUT);
  std::shared_ptr<CSettingString> settingCms3dlut = AddList(groupColorManagement, SETTING_VIDEO_CMS3DLUT, 36564, SettingLevel::Basic, current3dLUT, Cms3dLutsFiller, 36564);
  settingCms3dlut->SetDependencies(depsCms3dlut);

  // display settings
  int currentWhitepoint = CServiceBroker::GetSettings().GetInt(SETTING_VIDEO_CMSWHITEPOINT);
  entries.clear();
  entries.push_back(std::make_pair(36586, CMS_WHITEPOINT_D65));
  entries.push_back(std::make_pair(36587, CMS_WHITEPOINT_D93));
  std::shared_ptr<CSettingInt> settingCmsWhitepoint = AddSpinner(groupColorManagement, SETTING_VIDEO_CMSWHITEPOINT, 36568, SettingLevel::Basic, currentWhitepoint, entries);
  settingCmsWhitepoint->SetDependencies(depsCmsIcc);

  int currentPrimaries = CServiceBroker::GetSettings().GetInt(SETTING_VIDEO_CMSPRIMARIES);
  entries.clear();
  entries.push_back(std::make_pair(36588, CMS_PRIMARIES_AUTO));
  entries.push_back(std::make_pair(36589, CMS_PRIMARIES_BT709));
  entries.push_back(std::make_pair(36590, CMS_PRIMARIES_170M));
  entries.push_back(std::make_pair(36591, CMS_PRIMARIES_BT470M));
  entries.push_back(std::make_pair(36592, CMS_PRIMARIES_BT470BG));
  entries.push_back(std::make_pair(36593, CMS_PRIMARIES_240M));
  std::shared_ptr<CSettingInt> settingCmsPrimaries = AddSpinner(groupColorManagement, SETTING_VIDEO_CMSPRIMARIES, 36570, SettingLevel::Basic, currentPrimaries, entries);
  settingCmsPrimaries->SetDependencies(depsCmsIcc);

  int currentGammaMode = CServiceBroker::GetSettings().GetInt(SETTING_VIDEO_CMSGAMMAMODE);
  entries.clear();
  entries.push_back(std::make_pair(36582, CMS_TRC_BT1886));
  entries.push_back(std::make_pair(36583, CMS_TRC_INPUT_OFFSET));
  entries.push_back(std::make_pair(36584, CMS_TRC_OUTPUT_OFFSET));
  entries.push_back(std::make_pair(36585, CMS_TRC_ABSOLUTE));
  std::shared_ptr<CSettingInt> settingCmsGammaMode = AddSpinner(groupColorManagement, SETTING_VIDEO_CMSGAMMAMODE, 36572, SettingLevel::Basic, currentGammaMode, entries);
  settingCmsGammaMode->SetDependencies(depsCmsIcc);

  float currentGamma = CServiceBroker::GetSettings().GetInt(SETTING_VIDEO_CMSGAMMA)/100.0f;
  if (currentGamma == 0.0) currentGamma = 2.20;
  std::shared_ptr<CSettingNumber> settingCmsGamma = AddSlider(groupColorManagement, SETTING_VIDEO_CMSGAMMA, 36574, SettingLevel::Basic, currentGamma, 36597, 1.6, 0.05, 2.8, 36574, usePopup);
  settingCmsGamma->SetDependencies(depsCmsGamma);

  int currentLutSize = CServiceBroker::GetSettings().GetInt(SETTING_VIDEO_CMSLUTSIZE);
  entries.clear();
  entries.push_back(std::make_pair(36594, 4));
  entries.push_back(std::make_pair(36595, 6));
  entries.push_back(std::make_pair(36596, 8));
  std::shared_ptr<CSettingInt> settingCmsLutSize = AddSpinner(groupColorManagement, SETTING_VIDEO_CMSLUTSIZE, 36576, SettingLevel::Basic, currentLutSize, entries);
  settingCmsLutSize->SetDependencies(depsCmsIcc);
}
コード例 #26
0
void CGUIDialogSubtitleSettings::InitializeSettings()
{
  CGUIDialogSettingsManualBase::InitializeSettings();

  const std::shared_ptr<CSettingCategory> category = AddCategory("audiosubtitlesettings", -1);
  if (category == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogSubtitleSettings: unable to setup settings");
    return;
  }

  // get all necessary setting groups
  const std::shared_ptr<CSettingGroup> groupAudio = AddGroup(category);
  if (groupAudio == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogSubtitleSettings: unable to setup settings");
    return;
  }
  const std::shared_ptr<CSettingGroup> groupSubtitles = AddGroup(category);
  if (groupSubtitles == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogSubtitleSettings: unable to setup settings");
    return;
  }
  const std::shared_ptr<CSettingGroup> groupSaveAsDefault = AddGroup(category);
  if (groupSaveAsDefault == NULL)
  {
    CLog::Log(LOGERROR, "CGUIDialogSubtitleSettings: unable to setup settings");
    return;
  }

  bool usePopup = g_SkinInfo->HasSkinFile("DialogSlider.xml");

  const CVideoSettings videoSettings = g_application.GetAppPlayer().GetVideoSettings();

  if (g_application.GetAppPlayer().HasPlayer())
  {
    g_application.GetAppPlayer().GetSubtitleCapabilities(m_subtitleCapabilities);
  }

  // subtitle settings
  m_subtitleVisible = g_application.GetAppPlayer().GetSubtitleVisible();

  // subtitle enabled setting
  AddToggle(groupSubtitles, SETTING_SUBTITLE_ENABLE, 13397, SettingLevel::Basic, m_subtitleVisible);

  // subtitle delay setting
  if (SupportsSubtitleFeature(IPC_SUBS_OFFSET))
  {
    std::shared_ptr<CSettingNumber> settingSubtitleDelay = AddSlider(groupSubtitles, SETTING_SUBTITLE_DELAY, 22006, SettingLevel::Basic, videoSettings.m_SubtitleDelay, 0, -CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_videoSubsDelayRange, 0.1f, CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_videoSubsDelayRange, 22006, usePopup);
    std::static_pointer_cast<CSettingControlSlider>(settingSubtitleDelay->GetControl())->SetFormatter(SettingFormatterDelay);
  }

  // subtitle stream setting
  if (SupportsSubtitleFeature(IPC_SUBS_SELECT))
    AddSubtitleStreams(groupSubtitles, SETTING_SUBTITLE_STREAM);

  // subtitle browser setting
  if (SupportsSubtitleFeature(IPC_SUBS_EXTERNAL))
    AddButton(groupSubtitles, SETTING_SUBTITLE_BROWSER, 13250, SettingLevel::Basic);

  AddButton(groupSubtitles, SETTING_SUBTITLE_SEARCH, 24134, SettingLevel::Basic);

  // subtitle stream setting
  AddButton(groupSaveAsDefault, SETTING_MAKE_DEFAULT, 12376, SettingLevel::Basic);
}
コード例 #27
0
void CMyRibbonBar::addTabAnalyze()
{
	CMFCRibbonCategory* pCategory = AddCategory(_T("Analyze"), IDB_ANALYZE16, IDB_ANALYZE);

	CMFCRibbonPanel* pPanel = pCategory->AddPanel(_T("Selection"), m_PanelImages.ExtractIcon(13));

	pPanel->Add(new CMFCRibbonLabel(_T("Set Focus :")));
	CMFCRibbonComboBox* pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_TEST_SELECT, TRUE, -1,_T("Select Test"),0);
	/*
	pSelectionCB->AddItem(_T("Test1"),0);
		pSelectionCB->AddItem(_T("Test2"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);

	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_ITEM_SELECT, TRUE, -1,_T("Select Item"),7);
	/*
	pSelectionCB->AddItem(_T("ActivityA"),0);
		pSelectionCB->AddItem(_T("Task T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);

	pPanel->SetJustifyColumns();

	//
	pPanel = pCategory->AddPanel(_T("Single Activity"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_TIMELINE, _T("TimeLines"), -1, 0));
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_STAGES, _T("Clustered stages"), -1, 2));
	//pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_TOTALTIME, _T("Total Times"), -1, 0));
		//send to compare.
	
	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_SINGLEACTIVITY_CB_TASKSEL, TRUE, -1,_T("Task :"),3);
	pPanel->Add(pSelectionCB);

	CMFCRibbonButton* pBtn = new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_WITHTASK_STACKED, _T("Stacked"), 0, 1);
	pBtn->SetMenu(IDR_MENU_RIBBON_ACTIVITY1, TRUE);
	pPanel->Add(pBtn);

	pBtn = new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_WITHTASK_TOTAL, _T("Total Times"), 0, 4);
	pBtn->SetMenu(IDR_MENU_RIBBON_ACTIVITY2, TRUE);
	pPanel->Add(pBtn);

	//
	pPanel->AddSeparator();
	pPanel->Add(new CMFCRibbonLabel(_T("Select Worker :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_SINGLEACTIVITY_CB_WORKERSEL, TRUE, -1,_T("Thread :"),1);
/*
	pSelectionCB->AddItem(_T("Worker T0"),0);
	pSelectionCB->AddItem(_T("Thread T1"));
	pSelectionCB->SelectItem(0);*/

	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEACTIVITY_WITHWORKER_TOTALTIME, _T("Time Total"), 0, 5));

	pPanel = pCategory->AddPanel(_T("All Activities"), m_PanelImages.ExtractIcon(18));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_ALLACTIVITIES_TOTAL, _T("Total time"), 0, 3));


	pPanel = pCategory->AddPanel(_T("Single Task"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLETASK_RUNSHISTORY, _T("Runs History"), 0, 6));
	//pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLETASK_TOTAL, _T("Total Time"), 0, 0));
		//send to compare.

	pPanel = pCategory->AddPanel(_T("All Tasks"), m_PanelImages.ExtractIcon(19));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_ALLTASKS_TOTAL, _T("Total Time"), 0, 10));
			//add average time ?



	pPanel = pCategory->AddPanel(_T("Worker"), m_PanelImages.ExtractIcon(17));

	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEWORKER_RUNPAUSE, _T("Run|Pause Time"), 0, 12));
	pPanel->AddSeparator();

	pPanel->Add(new CMFCRibbonLabel(_T("Select Task :")));
	pSelectionCB = new CMFCRibbonComboBox(WM_ANALYSIS_SINGLEWORKER_CB_SELTASK, TRUE, -1,_T("Task :"),3);
	/*
	pSelectionCB->AddItem(_T("Task T0"),0);
		pSelectionCB->AddItem(_T("Task T1"));
		pSelectionCB->SelectItem(0);*/
	
	pPanel->Add(pSelectionCB);
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEWORKER_WITHTASK_MULTIPLESTACKED, _T("Multiple Stacked"), 0, 13));
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_SINGLEWORKER_WITHTASK_TIMETOTAL, _T("Time Total"), 0, 14));

	pPanel = pCategory->AddPanel(_T("All Workers"), m_PanelImages.ExtractIcon(27));
	pPanel->Add(new CMFCRibbonButton(WM_ANALYSIS_ALLWORKERS_TOTAL, _T("Total Times"), 0, 11));


	/*
pPanel = pCategory->AddPanel(_T("Tasks and activity"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Pie"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Pie"), 0, 0));

	pPanel = pCategory->AddPanel(_T("Tasks and thread"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Task Pie"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Stacked"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("Tasks Pie"), 0, 0));

	pPanel = pCategory->AddPanel(_T("Threads and activity"), m_PanelImages.ExtractIcon(27));

	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("All Threads Column"), 0, 0));
	pPanel->Add(new CMFCRibbonButton(ID_EDIT_PASTE, _T("all Threads Vs Activity Time two columns"), 0, 0));
*/


}
コード例 #28
0
ファイル: EffectManager.cpp プロジェクト: jeevithag/audacity
EffectManager::EffectManager()
{
#ifdef EFFECT_CATEGORIES
   mCategories = new CategoryMap();
   mRootCategories = new CategorySet();
   mUnsorted = new EffectSet();
   
   // Create effect category graph. These categories and relationships
   // are taken from revision 2 of lv2.ttl, loaders for other plugin systems 
   // (such as LADSPA/LRDF) should map their categories to these ones when 
   // applicable. Individual LADSPA/LRDF and LV2 plugins can add new 
   // categories and make them subcategories of the existing ones, but not 
   // add subcategory relationships between these categories.
   //
   // We need some persistent, global identifiers for categories - LRDF
   // and LV2 uses URI strings so we do that too. The URIs here are the
   // same ones as in lv2.ttl. Category identifiers in other plugin systems
   // must be mapped to URIs by their loaders.

#define LV2PREFIX "http://lv2plug.in/ns/lv2core#"
   
   typedef EffectCategory* CatPtr;
   
   CatPtr gen = AddCategory(wxT(LV2PREFIX) wxT("GeneratorPlugin"),
                            _("Generator"));
   CatPtr inst = AddCategory(wxT(LV2PREFIX) wxT("InstrumentPlugin"),
   /* i18n-hint: (noun).*/
                             _("Instrument"));
   CatPtr osc = AddCategory(wxT(LV2PREFIX) wxT("OscillatorPlugin"),
                            _("Oscillator"));
   CatPtr util = AddCategory(wxT(LV2PREFIX) wxT("UtilityPlugin"),
                             _("Utility"));
   CatPtr conv = AddCategory(wxT(LV2PREFIX) wxT("ConverterPlugin"),
                             _("Converter"));
   CatPtr anal = AddCategory(wxT(LV2PREFIX) wxT("AnalyserPlugin"),
                             _("Analyser"));
   CatPtr mix = AddCategory(wxT(LV2PREFIX) wxT("MixerPlugin"),
                            _("Mixer"));
   CatPtr sim = AddCategory(wxT(LV2PREFIX) wxT("SimulatorPlugin"),
                            _("Simulator"));
   CatPtr del = AddCategory(wxT(LV2PREFIX) wxT("DelayPlugin"),
                            _("Delay"));
   CatPtr mod = AddCategory(wxT(LV2PREFIX) wxT("ModulatorPlugin"),
                            _("Modulator"));
   CatPtr rev = AddCategory(wxT(LV2PREFIX) wxT("ReverbPlugin"),
                            _("Reverb"));
   CatPtr phas = AddCategory(wxT(LV2PREFIX) wxT("PhaserPlugin"),
                             _("Phaser"));
   CatPtr flng = AddCategory(wxT(LV2PREFIX) wxT("FlangerPlugin"),
                             _("Flanger"));
   CatPtr chor = AddCategory(wxT(LV2PREFIX) wxT("ChorusPlugin"),
                             _("Chorus"));
   CatPtr flt = AddCategory(wxT(LV2PREFIX) wxT("FilterPlugin"),
                            _("Filter"));
   CatPtr lp = AddCategory(wxT(LV2PREFIX) wxT("LowpassPlugin"),
                           _("Lowpass"));
   CatPtr bp = AddCategory(wxT(LV2PREFIX) wxT("BandpassPlugin"),
                           _("Bandpass"));
   CatPtr hp = AddCategory(wxT(LV2PREFIX) wxT("HighpassPlugin"),
                           _("Highpass"));
   CatPtr comb = AddCategory(wxT(LV2PREFIX) wxT("CombPlugin"),
                             _("Comb"));
   CatPtr alp = AddCategory(wxT(LV2PREFIX) wxT("AllpassPlugin"),
                            _("Allpass"));
   CatPtr eq = AddCategory(wxT(LV2PREFIX) wxT("EQPlugin"),
                           _("Equaliser"));
   CatPtr peq = AddCategory(wxT(LV2PREFIX) wxT("ParaEQPlugin"),
                            _("Parametric"));
   CatPtr meq = AddCategory(wxT(LV2PREFIX) wxT("MultiEQPlugin"),
                            _("Multiband"));
   CatPtr spec = AddCategory(wxT(LV2PREFIX) wxT("SpectralPlugin"),
                             _("Spectral Processor"));
   CatPtr ptch = AddCategory(wxT(LV2PREFIX) wxT("PitchPlugin"),
                             _("Pitch Shifter"));
   CatPtr amp = AddCategory(wxT(LV2PREFIX) wxT("AmplifierPlugin"),
                            _("Amplifier"));
   CatPtr dist = AddCategory(wxT(LV2PREFIX) wxT("DistortionPlugin"),
                             _("Distortion"));
   CatPtr shp = AddCategory(wxT(LV2PREFIX) wxT("WaveshaperPlugin"),
                            _("Waveshaper"));
   CatPtr dyn = AddCategory(wxT(LV2PREFIX) wxT("DynamicsPlugin"),
                            _("Dynamics Processor"));
   CatPtr cmp = AddCategory(wxT(LV2PREFIX) wxT("CompressorPlugin"),
                            _("Compressor"));
   CatPtr exp = AddCategory(wxT(LV2PREFIX) wxT("ExpanderPlugin"),
                            _("Expander"));
   CatPtr lim = AddCategory(wxT(LV2PREFIX) wxT("LimiterPlugin"),
                            _("Limiter"));
   CatPtr gate = AddCategory(wxT(LV2PREFIX) wxT("GatePlugin"),
                             _("Gate"));
   
   AddCategoryParent(inst, gen);
   AddCategoryParent(osc, gen);
   AddCategoryParent(conv, util);
   AddCategoryParent(anal, util);
   AddCategoryParent(mix, util);
   AddCategoryParent(rev, sim);
   AddCategoryParent(rev, del);
   AddCategoryParent(phas, mod);
   AddCategoryParent(flng, mod);
   AddCategoryParent(chor, mod);
   AddCategoryParent(lp, flt);
   AddCategoryParent(bp, flt);
   AddCategoryParent(hp, flt);
   AddCategoryParent(comb, flt);
   AddCategoryParent(alp, flt);
   AddCategoryParent(eq, flt);
   AddCategoryParent(peq, eq);
   AddCategoryParent(meq, eq);
   AddCategoryParent(ptch, spec);
   AddCategoryParent(shp, dist);
   AddCategoryParent(cmp, dyn);
   AddCategoryParent(exp, dyn);
   AddCategoryParent(lim, dyn);
   AddCategoryParent(gate, dyn);
   // We also add a couple of categories for internal use. These are not
   // in lv2.ttl.

#define ATEAM "http://audacityteam.org/namespace#"
   
   CatPtr nrm = AddCategory(wxT(ATEAM) wxT("NoiseRemoval"),
                            _("Noise Removal"));
   CatPtr pnt = AddCategory(wxT(ATEAM) wxT("PitchAndTempo"),
                            _("Pitch and Tempo"));
   CatPtr tim = AddCategory(wxT(ATEAM) wxT("TimelineChanger"),
                            _("Timeline Changer"));
   CatPtr aTim = AddCategory(wxT(ATEAM) wxT("TimeAnalyser"),
                             _("Time"));
   CatPtr onst = AddCategory(wxT(ATEAM) wxT("OnsetDetector"),
                             _("Onsets"));
   AddCategoryParent(nrm, util);
   AddCategoryParent(tim, util);
   AddCategoryParent(aTim, anal);
   AddCategoryParent(onst, aTim);
   
   // We freeze the internal subcategory relations between the categories
   // added so far so LADSPA/LRDF or other category systems don't ruin
   // our hierarchy.
   FreezeCategories();
   
#endif

#if defined(EXPERIMENTAL_REALTIME_EFFECTS)
   mRealtimeLock.Enter();
   mRealtimeActive = false;
   mRealtimeSuspended = true;
   mRealtimeLatency = 0;
   mRealtimeLock.Leave();
#endif

#if defined(EXPERIMENTAL_EFFECTS_RACK)
   mRack = NULL;
#endif
}
コード例 #29
0
ファイル: winmain.c プロジェクト: rmallof/reactos
VOID
InitCategoriesList(VOID)
{
    HTREEITEM hRootItem1, hRootItem2;

    /* Create image list */
    hImageTreeView = ImageList_Create(TREEVIEW_ICON_SIZE,
                                      TREEVIEW_ICON_SIZE,
                                      GetSystemColorDepth() | ILC_MASK,
                                      0, 1);

    hRootItem1 = AddCategory(TVI_ROOT, IDS_INSTALLED, IDI_CATEGORY);
    AddCategory(hRootItem1, IDS_APPLICATIONS, IDI_APPS);
    AddCategory(hRootItem1, IDS_UPDATES, IDI_APPUPD);

    hRootItem2 = AddCategory(TVI_ROOT, IDS_AVAILABLEFORINST, IDI_CATEGORY);
    AddCategory(hRootItem2, IDS_CAT_AUDIO, IDI_CAT_AUDIO);
    AddCategory(hRootItem2, IDS_CAT_VIDEO, IDI_CAT_VIDEO);
    AddCategory(hRootItem2, IDS_CAT_GRAPHICS, IDI_CAT_GRAPHICS);
    AddCategory(hRootItem2, IDS_CAT_GAMES, IDI_CAT_GAMES);
    AddCategory(hRootItem2, IDS_CAT_INTERNET, IDI_CAT_INTERNET);
    AddCategory(hRootItem2, IDS_CAT_OFFICE, IDI_CAT_OFFICE);
    AddCategory(hRootItem2, IDS_CAT_DEVEL, IDI_CAT_DEVEL);
    AddCategory(hRootItem2, IDS_CAT_EDU, IDI_CAT_EDU);
    AddCategory(hRootItem2, IDS_CAT_ENGINEER, IDI_CAT_ENGINEER);
    AddCategory(hRootItem2, IDS_CAT_FINANCE, IDI_CAT_FINANCE);
    AddCategory(hRootItem2, IDS_CAT_SCIENCE, IDI_CAT_SCIENCE);
    AddCategory(hRootItem2, IDS_CAT_TOOLS, IDI_CAT_TOOLS);
    AddCategory(hRootItem2, IDS_CAT_DRIVERS, IDI_CAT_DRIVERS);
    AddCategory(hRootItem2, IDS_CAT_LIBS, IDI_CAT_LIBS);
    AddCategory(hRootItem2, IDS_CAT_OTHER, IDI_CAT_OTHER);

    (VOID) TreeView_SetImageList(hTreeView, hImageTreeView, TVSIL_NORMAL);

    (VOID) TreeView_Expand(hTreeView, hRootItem2, TVE_EXPAND);
    (VOID) TreeView_Expand(hTreeView, hRootItem1, TVE_EXPAND);

    (VOID) TreeView_SelectItem(hTreeView, hRootItem1);
}
コード例 #30
0
ファイル: options.cpp プロジェクト: TonyAlloa/miranda-dev
//OptionsDialog class functions
BOOL OptionsDialogType::DialogProcedure(UINT msg, WPARAM wParam, LPARAM lParam)
{
	BOOL Result = FALSE;

	switch(msg) 
	{
	case WM_INITDIALOG:
		InitDialog();
		Result = TRUE;
		break;

	case WM_DESTROY:
		DestroyDialog();
		break;

	case WM_COMMAND:
		switch (LOWORD(wParam)) 
		{
		case IDC_FILENAME:
			switch(HIWORD(wParam))
			{
			case EN_KILLFOCUS:
				FilenameChanged();
				break;

			case EN_CHANGE:
				if (GetFocus() == (HWND)lParam) SetChanged();
				break;
			}
			break;

		case IDC_BROWSE:
			if (HIWORD(wParam) == BN_CLICKED)
			{
				if (BrowseForSmileyPacks(GetSelProto()))
				{
					UpdateControls(true); 
					SetChanged();
				}
			}
			break;

		case IDC_SMLOPTBUTTON:
			if (HIWORD(wParam) == BN_CLICKED) ShowSmileyPreview();
			break;

		case IDC_USESTDPACK:
			if (HIWORD(wParam) == BN_CLICKED)
			{
				PopulateSmPackList(); 
				SetChanged();
			}
			break;

		case IDC_PLUGENABLED:
			if (HIWORD(wParam) == BN_CLICKED)
			{
				BOOL en = IsDlgButtonChecked(m_hwndDialog, IDC_PLUGENABLED) == BST_UNCHECKED;
				EnableWindow(GetDlgItem(m_hwndDialog, IDC_SMLBUT), en);
				SetChanged();
			}
			break;

		case IDC_ADDCATEGORY:
			if (HIWORD(wParam) == BN_CLICKED)
			{
				AddCategory();
			}
			break;

		case IDC_DELETECATEGORY:
			if (HIWORD(wParam) == BN_CLICKED)
			{
				if (tmpsmcat.DeleteCustomCategory(GetSelProto()))
				{
					PopulateSmPackList();
					SetChanged();
				}
			}
			break;

		case IDC_SPACES:
		case IDC_SCALETOTEXTHEIGHT:
		case IDC_APPENDSPACES:
		case IDC_SMLBUT:
		case IDC_SCALEALLSMILEYS:
		case IDC_IEVIEWSTYLE:
		case IDC_ANIMATESEL:
		case IDC_ANIMATEDLG:
		case IDC_INPUTSMILEYS:
		case IDC_DCURSORSMILEY:
		case IDC_DISABLECUSTOM:
		case IDC_HQSCALING:
			if (HIWORD(wParam) == BN_CLICKED) SetChanged();
			break;

		case IDC_SELCLR:
			if (HIWORD(wParam) == CPN_COLOURCHANGED) SetChanged();
			break;

		case IDC_MAXCUSTSMSZ:
		case IDC_MINSMSZ:
			if (HIWORD(wParam) == EN_CHANGE && GetFocus() == (HWND)lParam) SetChanged();
			break;
		}
		break;

	case UM_CHECKSTATECHANGE:
		UserAction((HTREEITEM)lParam);
		break;

	case WM_NOTIFY:
		switch(((LPNMHDR)lParam)->idFrom)
		{
		case 0:
			switch (((LPNMHDR)lParam)->code)
			{
			case PSN_APPLY:
				ApplyChanges();
				break;
			}
			break;

		case IDC_CATEGORYLIST:
			switch (((LPNMHDR)lParam)->code)
			{
			case NM_CLICK:
				{
					TVHITTESTINFO ht = {0};

					DWORD dwpos = GetMessagePos();
					POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
					MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);

					TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
					if (TVHT_ONITEM & ht.flags)
						FilenameChanged();
					if (TVHT_ONITEMSTATEICON & ht.flags)
						PostMessage(m_hwndDialog, UM_CHECKSTATECHANGE, 0, (LPARAM)ht.hItem);
				}

			case TVN_KEYDOWN:
				if (((LPNMTVKEYDOWN) lParam)->wVKey == VK_SPACE)
					PostMessage(m_hwndDialog, UM_CHECKSTATECHANGE, 0, 
					(LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
				break;

			case TVN_SELCHANGEDA:
			case TVN_SELCHANGEDW:
				{
					LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lParam;
					if (pnmtv->itemNew.state & TVIS_SELECTED)
						UpdateControls();
				}
				break;
			}
			break;
		}
		break;
	}

	return Result;
}