| 131 | } |
| 132 | |
| 133 | void StPluginItemWidget::UpdateStatus() { |
| 134 | if (!lbl_enabled_) { |
| 135 | return; |
| 136 | } |
| 137 | |
| 138 | bool need_update = false; |
| 139 | auto enabled = item_info_->info_->enabled(); |
| 140 | if (enabled) { |
| 141 | if (lbl_enabled_->text() != kDisplayPluginEnabled) { |
| 142 | need_update = true; |
| 143 | } |
| 144 | } |
| 145 | else { |
| 146 | if (lbl_enabled_->text() != kDisplayPluginDisabled) { |
| 147 | need_update = true; |
| 148 | } |
| 149 | } |
| 150 | if (need_update) { |
| 151 | UpdatePluginStatus(enabled); |
| 152 | } |
| 153 | |
| 154 | } |
| 155 | |
| 156 | void StPluginItemWidget::UpdatePluginStatus(bool enabled) { |
| 157 | if (enabled) { |