void ControlToolBar::UpdatePrefs() { bool updated = false; bool active; gPrefs->Read( wxT("/GUI/ErgonomicTransportButtons"), &active, true ); if( mErgonomicTransportButtons != active ) { mErgonomicTransportButtons = active; updated = true; } gPrefs->Read( wxT("/Batch/CleanSpeechMode"), &active, false ); if( mCleanSpeechMode != active ) { mCleanSpeechMode = active; updated = true; } if( updated ) { ReCreateButtons(); Updated(); } }
// // Initialize the toolbar // void ToolBar::Create( wxWindow *parent ) { // Save parameters mParent = parent; // Create the window and label it wxPanel::Create( mParent, mType, wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxTAB_TRAVERSAL, GetTitle() ); wxPanel::SetLabel( GetLabel() ); // Go do the rest of the creation ReCreateButtons(); // ToolManager depends on this appearing to be visible for proper dock construction mVisible = true; }
// // Initialize the toolbar // void ToolBar::Create( wxWindow *parent ) { // Save parameters mParent = parent; // Create the window and label it wxPanel::Create( mParent, mType, wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxTAB_TRAVERSAL, mTitle ); SetLabel( mLabel ); // Go do the rest of the creation ReCreateButtons(); // Let the user see it in all its glory Show(); mVisible = true; }
void ControlToolBar::UpdatePrefs() { bool updated = false; bool active; gPrefs->Read( wxT("/GUI/ErgonomicTransportButtons"), &active, true ); if( mErgonomicTransportButtons != active ) { mErgonomicTransportButtons = active; updated = true; } wxString strLocale = gPrefs->Read(wxT("/Locale/Language"), wxT("")); if (mStrLocale != strLocale) { mStrLocale = strLocale; updated = true; } if( updated ) { ReCreateButtons(); // side effect: calls RegenerateToolsTooltips() Updated(); } else // The other reason to regenerate tooltips is if keyboard shortcuts for // transport buttons changed, but that's too much work to check for, so just // always do it. (Much cheaper than calling ReCreateButtons() in all cases. RegenerateToolsTooltips(); // Set label to pull in language change SetLabel(_("Transport")); // Give base class a chance ToolBar::UpdatePrefs(); }