52 |
} |
} |
53 |
catch ( ... ) |
catch ( ... ) |
54 |
{ |
{ |
55 |
wxMessageBox("Could not open kernel file - aborting program"); |
wxMessageBox(wxT("Could not open kernel file - aborting program")); |
56 |
OnQuit(); |
OnQuit(); |
57 |
} |
} |
58 |
|
|
79 |
|
|
80 |
for (int i=0; i<mParser.GetStateCount() ; i++) |
for (int i=0; i<mParser.GetStateCount() ; i++) |
81 |
{ |
{ |
82 |
strings.Add( mParser.GetStateDescription(i) ); |
std::string statedesc = mParser.GetStateDescription(i); |
83 |
|
strings.Add( wxString(statedesc.c_str(),wxConvISO8859_1) ); |
84 |
} |
} |
85 |
|
|
86 |
mButtonbox = new wxRadioBox(this, ID_RADIOBOX, wxT("Throttle values"), wxDefaultPosition, wxDefaultSize,strings,1); |
mButtonbox = new wxRadioBox(this, ID_RADIOBOX, wxT("Throttle values"), wxDefaultPosition, wxDefaultSize,strings,1); |
117 |
{ |
{ |
118 |
mParser.ReadAcpiFile(); |
mParser.ReadAcpiFile(); |
119 |
mButtonbox->SetSelection( mParser.GetCurrentState() ); |
mButtonbox->SetSelection( mParser.GetCurrentState() ); |
120 |
|
|
121 |
|
std::string statedesc = mParser.GetStateDescription( mParser.GetCurrentState() ); |
122 |
|
|
123 |
wxString tooltip = wxT("wxCpuThrottle - "); |
wxString tooltip = wxT("wxCpuThrottle - "); |
124 |
tooltip += mParser.GetStateDescription( mParser.GetCurrentState() ); |
tooltip += wxString(statedesc.c_str(), wxConvISO8859_1); |
125 |
|
|
126 |
mTrayIcon->SetIcon( mIcon, tooltip ); |
mTrayIcon->SetIcon( mIcon, tooltip ); |
127 |
} |
} |