本文整理汇总了C++中Profile::DeleteGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ Profile::DeleteGroup方法的具体用法?C++ Profile::DeleteGroup怎么用?C++ Profile::DeleteGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Profile
的用法示例。
在下文中一共展示了Profile::DeleteGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: profile
//.........这里部分代码省略.........
{
wxLogError(_("There are no existing identities to delete."));
}
else
{
int rc = MDialog_GetSelection
(
_("Which identity would you like to delete?"),
MDIALOG_YESNOTITLE,
identities,
this
);
if ( rc != -1 )
{
ident = identities[(size_t)rc];
}
//else: cancelled
}
if ( !ident.empty() )
{
Profile *profile = mApplication->GetProfile();
if ( ident == READ_APPCONFIG(MP_CURRENT_IDENTITY) )
{
// can't keep this one
profile->writeEntry(MP_CURRENT_IDENTITY, wxEmptyString);
}
// FIXME: will this really work? if there are objects which
// use this identity the section will be recreated...
String identSection;
identSection << Profile::GetIdentityPath() << '/' << ident;
profile->DeleteGroup(identSection);
// update the identity combo in the toolbar if any
wxWindow *win = GetToolBar()->FindWindow(IDC_IDENT_COMBO);
if ( win )
{
wxChoice *combo = wxDynamicCast(win, wxChoice);
combo->Delete(combo->FindString(ident));
}
wxLogStatus(this, _("Identity '%s' deleted."), ident.c_str());
}
}
break;
case WXMENU_LANG_SET_DEFAULT:
{
static const wxFontEncoding encodingsSupported[] =
{
wxFONTENCODING_ISO8859_1, // West European (Latin1)
wxFONTENCODING_ISO8859_2, // Central and East European (Latin2)
wxFONTENCODING_ISO8859_3, // Esperanto (Latin3)
wxFONTENCODING_ISO8859_4, // Baltic (old) (Latin4)
wxFONTENCODING_ISO8859_5, // Cyrillic
wxFONTENCODING_ISO8859_6, // Arabic
wxFONTENCODING_ISO8859_7, // Greek
wxFONTENCODING_ISO8859_8, // Hebrew
wxFONTENCODING_ISO8859_9, // Turkish (Latin5)
wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6)
wxFONTENCODING_ISO8859_11, // Thai
wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it
// here anyhow to make all ISO8859
// consecutive numbers