v0.9.4: added UI support for no update service
This commit is contained in:
parent
110a8017f7
commit
0c2434a605
|
@ -532,16 +532,18 @@ public class WndSettings extends WndTabbed {
|
||||||
chkNews.checked(SPDSettings.news());
|
chkNews.checked(SPDSettings.news());
|
||||||
add(chkNews);
|
add(chkNews);
|
||||||
|
|
||||||
chkUpdates = new CheckBox(Messages.get(this, "updates")){
|
if (Updates.supportsUpdates()) {
|
||||||
@Override
|
chkUpdates = new CheckBox(Messages.get(this, "updates")) {
|
||||||
protected void onClick() {
|
@Override
|
||||||
super.onClick();
|
protected void onClick() {
|
||||||
SPDSettings.updates(checked());
|
super.onClick();
|
||||||
Updates.clearUpdate();
|
SPDSettings.updates(checked());
|
||||||
}
|
Updates.clearUpdate();
|
||||||
};
|
}
|
||||||
chkUpdates.checked(SPDSettings.updates());
|
};
|
||||||
add(chkUpdates);
|
chkUpdates.checked(SPDSettings.updates());
|
||||||
|
add(chkUpdates);
|
||||||
|
}
|
||||||
|
|
||||||
if (!DeviceCompat.isDesktop()){
|
if (!DeviceCompat.isDesktop()){
|
||||||
chkWifi = new CheckBox(Messages.get(this, "wifi")){
|
chkWifi = new CheckBox(Messages.get(this, "wifi")){
|
||||||
|
@ -562,15 +564,20 @@ public class WndSettings extends WndTabbed {
|
||||||
sep1.size(width, 1);
|
sep1.size(width, 1);
|
||||||
sep1.y = title.bottom() + 2*GAP;
|
sep1.y = title.bottom() + 2*GAP;
|
||||||
|
|
||||||
if (width > 200){
|
float pos;
|
||||||
|
if (width > 200 && chkUpdates != null){
|
||||||
chkNews.setRect(0, sep1.y + 1 + GAP, width/2-1, BTN_HEIGHT);
|
chkNews.setRect(0, sep1.y + 1 + GAP, width/2-1, BTN_HEIGHT);
|
||||||
chkUpdates.setRect(chkNews.right() + GAP, chkNews.top(), width/2-1, BTN_HEIGHT);
|
chkUpdates.setRect(chkNews.right() + GAP, chkNews.top(), width/2-1, BTN_HEIGHT);
|
||||||
|
pos = chkUpdates.bottom();
|
||||||
} else {
|
} else {
|
||||||
chkNews.setRect(0, sep1.y + 1 + GAP, width, BTN_HEIGHT);
|
chkNews.setRect(0, sep1.y + 1 + GAP, width, BTN_HEIGHT);
|
||||||
chkUpdates.setRect(0, chkNews.bottom()+ GAP, width, BTN_HEIGHT);
|
pos = chkNews.bottom();
|
||||||
|
if (chkUpdates != null) {
|
||||||
|
chkUpdates.setRect(0, chkNews.bottom() + GAP, width, BTN_HEIGHT);
|
||||||
|
pos = chkUpdates.bottom();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float pos = chkUpdates.bottom();
|
|
||||||
if (chkWifi != null){
|
if (chkWifi != null){
|
||||||
chkWifi.setRect(0, pos + GAP, width, BTN_HEIGHT);
|
chkWifi.setRect(0, pos + GAP, width, BTN_HEIGHT);
|
||||||
pos = chkWifi.bottom();
|
pos = chkWifi.bottom();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user