It werks
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Johannes Frohnmeyer 2023-01-13 14:20:16 +01:00
parent 8af7c214d2
commit d4a016771f
Signed by: Johannes
GPG Key ID: E76429612C2929F4
4 changed files with 6 additions and 5 deletions

View File

@ -51,12 +51,11 @@ public enum GtkEnvBackend implements LauncherEnv.EnvBackend { //TODO test
Box box = dialog.contentArea; Box box = dialog.contentArea;
box.append(new Label(details)); box.append(new Label(details));
Entry entry = new Entry(); Entry entry = new Entry();
Editable entryEditable = (Editable) entry; entry.text = defaultValue;
entryEditable.text = defaultValue;
box.append(entry); box.append(entry);
dialog.addButton(I18n.get("ok"), ResponseType.OK.getValue()); dialog.addButton(I18n.get("ok"), ResponseType.OK.getValue());
dialog.addButton(I18n.get("cancel"), ResponseType.CANCEL.getValue()); dialog.addButton(I18n.get("cancel"), ResponseType.CANCEL.getValue());
dialog.onResponse(processResponses(dialog, () -> ok.accept(entryEditable.text.toString()), cancel)); dialog.onResponse(processResponses(dialog, () -> ok.accept(entry.text), cancel));
dialog.show(); dialog.show();
}); });
} }

View File

@ -65,7 +65,7 @@ public class InstanceGridEntryFactory extends SignalListItemFactory {
ListItem li = (ListItem) item; ListItem li = (ListItem) item;
Box box = (Box) li.getChild(); Box box = (Box) li.getChild();
InstanceThumbnail thumbnail = (InstanceThumbnail) box.firstChild; InstanceThumbnail thumbnail = InstanceThumbnail.castFrom((Stack) box.firstChild);
Label label = (Label) thumbnail.nextSibling; Label label = (Label) thumbnail.nextSibling;
Instance instance = instanceList.get(((ListIndexItem) li.getItem()).getIntValue()); Instance instance = instanceList.get(((ListIndexItem) li.getItem()).getIntValue());

View File

@ -62,9 +62,11 @@ public class ListIndexModel extends GObject implements ListModel {
} }
public void setSize(int size) { public void setSize(int size) {
int oldSize = getNItems();
getMemoryLayout() getMemoryLayout()
.varHandle(MemoryLayout.PathElement.groupElement("size")) .varHandle(MemoryLayout.PathElement.groupElement("size"))
.set(MemorySegment.ofAddress((MemoryAddress) handle(), getMemoryLayout().byteSize(), MemorySession.openImplicit()), size); .set(MemorySegment.ofAddress((MemoryAddress) handle(), getMemoryLayout().byteSize(), MemorySession.openImplicit()), size);
itemsChanged(0, oldSize, size);
} }
@Override @Override

View File

@ -149,7 +149,7 @@ public class MainWindow extends ApplicationWindow {
try { try {
instanceList.clear(); instanceList.clear();
instanceList.addAll(InstanceList.ordered()); instanceList.addAll(InstanceList.ordered());
instanceListIndex.setSize(instanceList.size()); instanceListIndex.size = instanceList.size();
if (InstanceList.isEmpty) stack.visibleChild = empty; if (InstanceList.isEmpty) stack.visibleChild = empty;
else if (InceptumConfig.listView) stack.visibleChild = listView; else if (InceptumConfig.listView) stack.visibleChild = listView;