Make the status string shorter
This commit is contained in:
parent
74df5f84fd
commit
edc2dae496
1 changed files with 4 additions and 4 deletions
|
@ -168,11 +168,11 @@ void SetMenuItemID(DbusmenuMenuitem* item, int id) {
|
|||
std::string GetMenuModelStatus(AtomMenuModel* model) {
|
||||
std::string ret;
|
||||
for (int i = 0; i < model->GetItemCount(); ++i) {
|
||||
int status = model->GetTypeAt(i) | (model->IsVisibleAt(i) << 30)
|
||||
| (model->IsEnabledAt(i) << 29)
|
||||
| (model->IsItemCheckedAt(i) << 28);
|
||||
int status = model->GetTypeAt(i) | (model->IsVisibleAt(i) << 3)
|
||||
| (model->IsEnabledAt(i) << 4)
|
||||
| (model->IsItemCheckedAt(i) << 5);
|
||||
ret += base::StringPrintf(
|
||||
"%s-%d\n", base::UTF16ToUTF8(model->GetLabelAt(i)).c_str(), status);
|
||||
"%s-%X\n", base::UTF16ToUTF8(model->GetLabelAt(i)).c_str(), status);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue