本文整理汇总了C++中Profile::DeleteEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ Profile::DeleteEntry方法的具体用法?C++ Profile::DeleteEntry怎么用?C++ Profile::DeleteEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile::DeleteEntry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DontTryToCreate
void MFolderFromProfile::DontTryToCreate()
{
if ( m_profile->HasEntry(MP_FOLDER_TRY_CREATE) )
{
m_profile->DeleteEntry(MP_FOLDER_TRY_CREATE);
}
}
示例2: profile
//.........这里部分代码省略.........
}
wxLogStatus(this, _("Created new identity '%s'."), ident.c_str());
}
}
break;
// change the current identity
case WXMENU_FILE_IDENT_CHANGE:
{
wxArrayString identities = Profile::GetAllIdentities();
if ( identities.IsEmpty() )
{
wxLogError(_("There are no existing identities to choose from.\n"
"Please create an identity first."));
}
else
{
identities.Insert(_("Default"), 0);
int rc = MDialog_GetSelection
(
_("Select the new identity"),
MDIALOG_YESNOTITLE,
identities,
this
);
if ( rc != -1 )
{
Profile *profile = mApplication->GetProfile();
if ( rc == 0 )
{
// restore the default identity
profile->DeleteEntry(GetOptionName(MP_CURRENT_IDENTITY));
}
else
{
wxString ident = identities[(size_t)rc];
profile->writeEntry(MP_CURRENT_IDENTITY, ident);
}
// update the identity combo in the toolbar if any
wxWindow *win = GetToolBar()->FindWindow(IDC_IDENT_COMBO);
if ( win )
{
wxChoice *combo = wxDynamicCast(win, wxChoice);
combo->SetSelection(rc);
}
// TODO: should update everything (all options might have
// changed)
}
//else: dialog cancelled, nothing to do
}
}
break;
// edit an identity's parameters
case WXMENU_FILE_IDENT_EDIT:
{
String ident;
wxArrayString identities = Profile::GetAllIdentities();
if ( identities.IsEmpty() )
{
wxLogError(_("There are no existing identities to edit.\n"
"Please create an identity first."));