msgstr ""
msgctxt "#10036"
-msgid "Level: Basic"
+msgid "Basic"
msgstr ""
msgctxt "#10037"
-msgid "Level: Standard"
+msgid "Standard"
msgstr ""
msgctxt "#10038"
-msgid "Level: Advanced"
+msgid "Advanced"
msgstr ""
msgctxt "#10039"
-msgid "Level: Expert"
+msgid "Expert"
msgstr ""
#: xbmc/guilib/WindowIDs.h
msgid "Add-on browser"
msgstr ""
+#: xbmc/settings/windows/GUIWindowSettingsCategory.cpp
msgctxt "#10041"
-msgid "Reset settings"
+msgid "Reset above settings to default"
msgstr ""
+#: xbmc/settings/windows/GUIWindowSettingsCategory.cpp
msgctxt "#10042"
msgid "Are you sure you want to reset the settings in this category?"
msgstr ""
msgid "No help available"
msgstr ""
-#empty strings from id 10045 to 10099
+msgctxt "#10045"
+msgid "Resets all the visible settings to their default values."
+msgstr ""
+
+#empty strings from id 10046 to 10099
#: xbmc/guilib/WindowIDs.h
msgctxt "#10100"
#define CONTROL_START_CONTROL -80
#define CONTRL_BTN_LEVELS 20
+#define RESET_SETTING_ID "settings.reset"
+
typedef struct {
int id;
string name;
: CGUIWindow(WINDOW_SETTINGS_MYPICTURES, "SettingsCategory.xml"),
m_settings(CSettings::Get()),
m_iSetting(0), m_iCategory(0), m_iSection(0),
+ m_resetSetting(NULL),
m_pOriginalSpin(NULL),
m_pOriginalRadioButton(NULL),
m_pOriginalCategoryButton(NULL),
delete m_pOriginalEdit;
m_pOriginalEdit = NULL;
}
+
+ delete m_resetSetting;
}
bool CGUIWindowSettingsCategory::OnMessage(CGUIMessage &message)
m_iCategory = 0;
ResetControlStates();
}
+
+ m_resetSetting = new CSettingAction(RESET_SETTING_ID);
+ m_resetSetting->SetLabel(10041);
+ m_resetSetting->SetHelp(10045);
+
m_iSection = (int)message.GetParam2() - (int)CGUIWindow::GetID();
CGUIWindow::OnMessage(message);
if (!settingMap.empty())
m_settings.RegisterCallback(this, settingMap);
+
+ if (!settingMap.empty())
+ {
+ // add "Reset" control
+ AddSeparator(group->GetWidth(), iControlID);
+ AddSetting(m_resetSetting, group->GetWidth(), iControlID);
+ }
// update our settings (turns controls on/off as appropriate)
UpdateSettings();
void CGUIWindowSettingsCategory::OnClick(BaseSettingControlPtr pSettingControl)
{
+ if (pSettingControl->GetSetting()->GetId() == RESET_SETTING_ID)
+ {
+ OnAction(CAction(ACTION_SETTINGS_RESET));
+ return;
+ }
+
// we need to first set the delayed setting and then execute OnClick()
// because OnClick() triggers OnSettingChanged() and there we need to
// know if the changed setting is delayed or not