Bump java-gi
This commit is contained in:
parent
fc256a1376
commit
2cb852c5cb
|
@ -11,7 +11,6 @@ allprojects {
|
|||
|
||||
val lwjglVersion by extra("3.3.1")
|
||||
val imguiVersion by extra("1.86.4")
|
||||
val javaGiVersion by extra("0.3")
|
||||
val jfCommonsVersion by extra("1.1-SNAPSHOT")
|
||||
val gsonCompileVersion by extra("1.3-SNAPSHOT")
|
||||
val jlhttpVersion by extra("2.6")
|
||||
|
|
|
@ -14,9 +14,9 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
val javaGiVersion: String by rootProject.extra
|
||||
implementation("io.github.jwharm.javagi:gtk4:$javaGiVersion")
|
||||
implementation("io.github.jwharm.javagi:glib:$javaGiVersion")
|
||||
implementation("io.github.jwharm.javagi:gtk:4.8.3-0.4")
|
||||
implementation("io.github.jwharm.javagi:glib:1.2.10-0.4")
|
||||
implementation("io.github.jwharm.javagi:adwaita:1.2.0-0.4")
|
||||
implementation(project(":launcher"))
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import io.gitlab.jfronny.inceptum.gtk.control.ILabel;
|
|||
import manifold.ext.rt.api.Extension;
|
||||
import manifold.ext.rt.api.This;
|
||||
import org.gnome.adw.ActionRow;
|
||||
import org.gtk.gtk.Label;
|
||||
import org.gnome.gtk.Label;
|
||||
|
||||
@Extension
|
||||
public class ActionRowExt {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package extensions.org.gtk.gtk.Widget;
|
||||
package extensions.org.gnome.gtk.Widget;
|
||||
|
||||
import manifold.ext.rt.api.Extension;
|
||||
import manifold.ext.rt.api.This;
|
||||
import org.gtk.gtk.Widget;
|
||||
import org.gnome.gtk.Widget;
|
||||
|
||||
@Extension
|
||||
public class WidgetExt {
|
|
@ -2,7 +2,7 @@ package io.gitlab.jfronny.inceptum.gtk;
|
|||
|
||||
import io.gitlab.jfronny.inceptum.gtk.window.dialog.MicrosoftLoginDialog;
|
||||
import io.gitlab.jfronny.inceptum.gtk.window.dialog.StringInputDialog;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
import io.gitlab.jfronny.commons.StringFormatter;
|
||||
import io.gitlab.jfronny.inceptum.common.Utils;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
|
|
|
@ -4,9 +4,9 @@ import io.gitlab.jfronny.inceptum.common.*;
|
|||
import io.gitlab.jfronny.inceptum.gtk.window.MainWindow;
|
||||
import io.gitlab.jfronny.inceptum.launcher.LauncherEnv;
|
||||
import io.gitlab.jfronny.inceptum.launcher.api.account.AccountManager;
|
||||
import org.gtk.gio.ApplicationFlags;
|
||||
import org.gtk.glib.GLib;
|
||||
import org.gtk.gtk.Application;
|
||||
import org.gnome.gio.ApplicationFlags;
|
||||
import org.gnome.glib.GLib;
|
||||
import org.gnome.gtk.Application;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
|
|
@ -8,8 +8,8 @@ import io.gitlab.jfronny.inceptum.gtk.window.settings.launcher.LauncherSettingsW
|
|||
import io.gitlab.jfronny.inceptum.launcher.system.importer.Importers;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.launch.*;
|
||||
import io.gitlab.jfronny.inceptum.launcher.util.ProcessState;
|
||||
import org.gtk.gio.Menu;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gio.Menu;
|
||||
import org.gnome.gtk.*;
|
||||
import io.gitlab.jfronny.commons.ref.R;
|
||||
import io.gitlab.jfronny.inceptum.common.Utils;
|
||||
import io.gitlab.jfronny.inceptum.gtk.menu.MenuBuilder;
|
||||
|
|
|
@ -3,7 +3,7 @@ package io.gitlab.jfronny.inceptum.gtk.control;
|
|||
import io.gitlab.jfronny.commons.LazySupplier;
|
||||
import io.gitlab.jfronny.inceptum.gtk.GtkMain;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.control;
|
||||
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.ListIndexItem;
|
||||
import io.github.jwharm.javagi.util.ListIndexModel;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.Instance;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
import org.pango.EllipsizeMode;
|
||||
import org.pango.WrapMode;
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class InstanceGridEntryFactory extends SignalListItemFactory {
|
|||
var thumbnail = new InstanceThumbnail();
|
||||
box.append(thumbnail);
|
||||
|
||||
var label = new Label(null);
|
||||
var label = new Label((String) null);
|
||||
label.setSizeRequest(192, -1);
|
||||
label.maxWidthChars = 20;
|
||||
label.justify = Justification.CENTER;
|
||||
|
@ -68,7 +68,7 @@ public class InstanceGridEntryFactory extends SignalListItemFactory {
|
|||
InstanceThumbnail thumbnail = InstanceThumbnail.castFrom((Stack) box.firstChild);
|
||||
Label label = (Label) thumbnail.nextSibling;
|
||||
|
||||
Instance instance = instanceList.get(((ListIndexItem) li.getItem()).getIntValue());
|
||||
Instance instance = instanceList.get(((ListIndexModel.ListIndex) li.item).index);
|
||||
thumbnail.bind(instance);
|
||||
label.text = instance.toString();
|
||||
//TODO right click menu + double click action
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.control;
|
||||
|
||||
import io.github.jwharm.javagi.Signal;
|
||||
import io.github.jwharm.javagi.base.Signal;
|
||||
import io.github.jwharm.javagi.util.ListIndexModel;
|
||||
import io.gitlab.jfronny.commons.io.JFiles;
|
||||
import io.gitlab.jfronny.commons.ref.R;
|
||||
import io.gitlab.jfronny.inceptum.common.MetaHolder;
|
||||
|
@ -8,16 +9,15 @@ import io.gitlab.jfronny.inceptum.common.Utils;
|
|||
import io.gitlab.jfronny.inceptum.gtk.GtkMenubar;
|
||||
import io.gitlab.jfronny.inceptum.gtk.menu.MenuBuilder;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.ListIndexItem;
|
||||
import io.gitlab.jfronny.inceptum.gtk.window.settings.instance.InstanceSettingsWindow;
|
||||
import io.gitlab.jfronny.inceptum.launcher.LauncherEnv;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.Instance;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.InstanceNameTool;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.launch.LaunchType;
|
||||
import org.gnome.adw.ActionRow;
|
||||
import org.gtk.gio.Menu;
|
||||
import org.gtk.gtk.Stack;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gio.Menu;
|
||||
import org.gnome.gtk.Stack;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
@ -133,7 +133,7 @@ public class InstanceListEntryFactory extends SignalListItemFactory {
|
|||
|
||||
private record Decomposed(ListItem item, Instance instance, ActionRow row, InstanceThumbnail thumbnail, Button launch, PopoverMenu popoverMenu) {
|
||||
public static Decomposed of(ListItem item, List<Instance> instanceList) {
|
||||
Instance instance = instanceList.get(((ListIndexItem) item.getItem()).getIntValue());
|
||||
Instance instance = instanceList.get(((ListIndexModel.ListIndex) item.item).index);
|
||||
ActionRow row = (ActionRow) item.child;
|
||||
Box prefixes = (Box) row.firstChild.firstChild;
|
||||
Box suffixes = (Box) row.firstChild.lastChild;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.control;
|
||||
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.Instance;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
import java.lang.foreign.Addressable;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package io.gitlab.jfronny.inceptum.gtk.control.settings;
|
|||
|
||||
import io.gitlab.jfronny.inceptum.gtk.control.ILabel;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import io.gitlab.jfronny.inceptum.gtk.GtkEnvBackend;
|
|||
import io.gitlab.jfronny.inceptum.gtk.control.ILabel;
|
||||
import io.gitlab.jfronny.inceptum.gtk.control.settings.SettingsTab.SectionBuilder.Section;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class SettingsTab extends Box {
|
|||
|
||||
protected void section(@Nullable @PropertyKey(resourceBundle = I18n.BUNDLE) String title, SectionBuilder builder) {
|
||||
if (title != null) append(new ILabel(title, ILabel.Mode.HEADING));
|
||||
Frame frame = new Frame(null);
|
||||
Frame frame = new Frame((String) null);
|
||||
ListBox listBox = new ListBox();
|
||||
listBox.selectionMode = SelectionMode.NONE;
|
||||
listBox.showSeparators = true;
|
||||
|
|
|
@ -3,10 +3,10 @@ package io.gitlab.jfronny.inceptum.gtk.control.settings;
|
|||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import org.gnome.adw.*;
|
||||
import org.gnome.adw.HeaderBar;
|
||||
import org.gtk.gobject.BindingFlags;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gtk.gtk.Application;
|
||||
import org.gtk.gtk.Window;
|
||||
import org.gnome.gobject.BindingFlags;
|
||||
import org.gnome.gtk.*;
|
||||
import org.gnome.gtk.Application;
|
||||
import org.gnome.gtk.Window;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
|
||||
public class SettingsWindow extends Window {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.menu;
|
||||
|
||||
import org.gtk.gio.MenuItem;
|
||||
import org.gtk.gio.SimpleAction;
|
||||
import org.gnome.gio.MenuItem;
|
||||
import org.gnome.gio.SimpleAction;
|
||||
|
||||
public class BuiltButtonItem extends BuiltMenuItem {
|
||||
public BuiltButtonItem(SimpleAction action, MenuItem menuItem) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.menu;
|
||||
|
||||
import org.gtk.gio.*;
|
||||
import org.gnome.gio.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.menu;
|
||||
|
||||
import org.gtk.gio.SimpleAction;
|
||||
import org.gtk.glib.Variant;
|
||||
import org.gnome.gio.SimpleAction;
|
||||
import org.gnome.glib.Variant;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.menu;
|
||||
|
||||
import org.gtk.gio.MenuItem;
|
||||
import org.gtk.gio.SimpleAction;
|
||||
import org.gtk.glib.Variant;
|
||||
import org.gnome.gio.MenuItem;
|
||||
import org.gnome.gio.SimpleAction;
|
||||
import org.gnome.glib.Variant;
|
||||
|
||||
public class BuiltToggleItem extends BuiltMenuItem {
|
||||
public BuiltToggleItem(SimpleAction action, MenuItem menuItem) {
|
||||
|
|
|
@ -3,12 +3,12 @@ package io.gitlab.jfronny.inceptum.gtk.menu;
|
|||
import io.gitlab.jfronny.commons.throwable.ThrowingRunnable;
|
||||
import io.gitlab.jfronny.inceptum.common.Utils;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import org.gtk.gio.MenuItem;
|
||||
import org.gtk.gio.*;
|
||||
import org.gtk.glib.Variant;
|
||||
import org.gtk.glib.VariantType;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gtk.gtk.Application;
|
||||
import org.gnome.gio.MenuItem;
|
||||
import org.gnome.gio.*;
|
||||
import org.gnome.glib.Variant;
|
||||
import org.gnome.glib.VariantType;
|
||||
import org.gnome.gtk.*;
|
||||
import org.gnome.gtk.Application;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.util;
|
||||
|
||||
import io.github.jwharm.javagi.Interop;
|
||||
import io.github.jwharm.javagi.Marshal;
|
||||
import org.gtk.glib.Type;
|
||||
import org.gtk.gobject.*;
|
||||
|
||||
import java.lang.foreign.*;
|
||||
|
||||
public class ListIndexItem extends GObject {
|
||||
protected ListIndexItem(Addressable address) {
|
||||
super(address);
|
||||
}
|
||||
|
||||
public static final Marshal<Addressable, ListIndexItem> fromAddress =
|
||||
(input, scope) -> input.equals(MemoryAddress.NULL) ? null : new ListIndexItem(input);
|
||||
|
||||
public static MemoryLayout getMemoryLayout() {
|
||||
return MemoryLayout.structLayout(
|
||||
GObject.getMemoryLayout().withName("parent_instance"),
|
||||
Interop.valueLayout.C_INT.withName("int_value")
|
||||
).withName("ListIndexModel");
|
||||
}
|
||||
|
||||
private static Type type;
|
||||
public static Type getType() {
|
||||
if (type == null) {
|
||||
// Register the new gtype
|
||||
type = GObjects.typeRegisterStaticSimple(
|
||||
GObject.getType(),
|
||||
"ListIndexItem",
|
||||
(short) ObjectClass.getMemoryLayout().byteSize(),
|
||||
(gclass, data) -> {},
|
||||
(short) getMemoryLayout().byteSize(),
|
||||
(inst, gclass) -> {},
|
||||
TypeFlags.NONE
|
||||
);
|
||||
}
|
||||
Interop.register(type, fromAddress);
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setIntValue(int value) {
|
||||
getMemoryLayout()
|
||||
.varHandle(MemoryLayout.PathElement.groupElement("int_value"))
|
||||
.set(MemorySegment.ofAddress((MemoryAddress) handle(), getMemoryLayout().byteSize(), MemorySession.openImplicit()), value);
|
||||
}
|
||||
|
||||
public int getIntValue() {
|
||||
return (int) getMemoryLayout()
|
||||
.varHandle(MemoryLayout.PathElement.groupElement("int_value"))
|
||||
.get(MemorySegment.ofAddress((MemoryAddress) handle(), getMemoryLayout().byteSize(), MemorySession.openImplicit()));
|
||||
}
|
||||
|
||||
public ListIndexItem(int value) {
|
||||
super(getType(), null);
|
||||
setIntValue(value);
|
||||
}
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.util;
|
||||
|
||||
import io.github.jwharm.javagi.Interop;
|
||||
import io.github.jwharm.javagi.Marshal;
|
||||
import org.gtk.gio.ListModel;
|
||||
import org.gtk.gio.ListModelInterface;
|
||||
import org.gtk.glib.Type;
|
||||
import org.gtk.gobject.*;
|
||||
|
||||
import java.lang.foreign.*;
|
||||
|
||||
public class ListIndexModel extends GObject implements ListModel {
|
||||
protected ListIndexModel(Addressable address) {
|
||||
super(address);
|
||||
}
|
||||
|
||||
public static final Marshal<Addressable, ListIndexModel> fromAddress =
|
||||
(input, scope) -> input.equals(MemoryAddress.NULL) ? null : new ListIndexModel(input);
|
||||
|
||||
public static MemoryLayout getMemoryLayout() {
|
||||
return MemoryLayout.structLayout(
|
||||
GObject.getMemoryLayout().withName("parent_instance"),
|
||||
Interop.valueLayout.C_INT.withName("size")
|
||||
).withName("ListIndexModel");
|
||||
}
|
||||
|
||||
private static Type type;
|
||||
public static Type getType() {
|
||||
if (type == null) {
|
||||
// Register the new gtype
|
||||
type = GObjects.typeRegisterStaticSimple(
|
||||
GObject.getType(),
|
||||
"ListIndexModel",
|
||||
(short) ObjectClass.getMemoryLayout().byteSize(),
|
||||
(gclass, data) -> {},
|
||||
(short) getMemoryLayout().byteSize(),
|
||||
(inst, gclass) -> {},
|
||||
TypeFlags.NONE
|
||||
);
|
||||
GObjects.typeAddInterfaceStatic(type, ListModel.getType(), InterfaceInfo.builder()
|
||||
.setInterfaceInit((iface, data) -> {
|
||||
ListModelInterface lmi = ListModelInterface.fromAddress.marshal(iface.handle(), null);
|
||||
lmi.setGetItemType(ListModel::getItemType);
|
||||
lmi.setGetNItems(ListModel::getNItems);
|
||||
lmi.setGetItem(ListModel::getItem);
|
||||
})
|
||||
.setInterfaceData(null)
|
||||
.setInterfaceFinalize(null)
|
||||
.build());
|
||||
}
|
||||
Interop.register(type, fromAddress);
|
||||
return type;
|
||||
}
|
||||
|
||||
private ListIndexModel() {
|
||||
super(getType(), null);
|
||||
}
|
||||
|
||||
public ListIndexModel(int size) {
|
||||
this();
|
||||
setSize(size);
|
||||
}
|
||||
|
||||
public void setSize(int size) {
|
||||
int oldSize = getNItems();
|
||||
getMemoryLayout()
|
||||
.varHandle(MemoryLayout.PathElement.groupElement("size"))
|
||||
.set(MemorySegment.ofAddress((MemoryAddress) handle(), getMemoryLayout().byteSize(), MemorySession.openImplicit()), size);
|
||||
itemsChanged(0, oldSize, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getItemType() {
|
||||
return ListIndexItem.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNItems() {
|
||||
return (int) getMemoryLayout()
|
||||
.varHandle(MemoryLayout.PathElement.groupElement("size"))
|
||||
.get(MemorySegment.ofAddress((MemoryAddress) handle(), getMemoryLayout().byteSize(), MemorySession.openImplicit()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public GObject getItem(int position) {
|
||||
if (position < 0 || position >= getNItems()) return null;
|
||||
return new ListIndexItem(position);
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.window;
|
||||
|
||||
import io.gitlab.jfronny.inceptum.gtk.GtkMain;
|
||||
import org.gtk.gtk.AboutDialog;
|
||||
import org.gtk.gtk.License;
|
||||
import org.gnome.gtk.AboutDialog;
|
||||
import org.gnome.gtk.License;
|
||||
import io.gitlab.jfronny.inceptum.common.BuildMetadata;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.window;
|
||||
|
||||
import io.github.jwharm.javagi.util.ListIndexModel;
|
||||
import io.gitlab.jfronny.inceptum.common.InceptumConfig;
|
||||
import io.gitlab.jfronny.inceptum.common.Utils;
|
||||
import io.gitlab.jfronny.inceptum.gtk.GtkMenubar;
|
||||
|
@ -7,15 +8,14 @@ import io.gitlab.jfronny.inceptum.gtk.control.InstanceGridEntryFactory;
|
|||
import io.gitlab.jfronny.inceptum.gtk.control.InstanceListEntryFactory;
|
||||
import io.gitlab.jfronny.inceptum.gtk.menu.MenuBuilder;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.ListIndexModel;
|
||||
import io.gitlab.jfronny.inceptum.gtk.window.settings.launcher.LauncherSettingsWindow;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.*;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.launch.LaunchType;
|
||||
import org.gnome.adw.Clamp;
|
||||
import org.gnome.adw.StatusPage;
|
||||
import org.gtk.gio.Menu;
|
||||
import org.gtk.glib.GLib;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gio.Menu;
|
||||
import org.gnome.glib.GLib;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
@ -76,7 +76,7 @@ public class MainWindow extends ApplicationWindow {
|
|||
header.packEnd(accountsButton);
|
||||
|
||||
instanceList = new ArrayList<>();
|
||||
instanceListIndex = new ListIndexModel(instanceList.size());
|
||||
instanceListIndex = ListIndexModel.newInstance(instanceList.size());
|
||||
var selection = new NoSelection(instanceListIndex);
|
||||
|
||||
ListView listView = new ListView(selection, new InstanceListEntryFactory(app, instanceList));
|
||||
|
@ -86,7 +86,7 @@ public class MainWindow extends ApplicationWindow {
|
|||
// Double click
|
||||
GtkMenubar.launch(instanceList.get(position), LaunchType.Client);
|
||||
});
|
||||
Frame frame = new Frame(null);
|
||||
Frame frame = new Frame((String) null);
|
||||
frame.child = listView;
|
||||
frame.marginHorizontal = 24;
|
||||
frame.marginVertical = 12;
|
||||
|
@ -133,7 +133,7 @@ public class MainWindow extends ApplicationWindow {
|
|||
Utils.LOGGER.error("Could not run update task", e);
|
||||
}
|
||||
return GLib.SOURCE_CONTINUE;
|
||||
}, null);
|
||||
});
|
||||
onCloseRequest(() -> {
|
||||
try {
|
||||
isw.close();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.window;
|
||||
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
public class NewInstanceWindow extends Assistant {
|
||||
public NewInstanceWindow(Application app) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package io.gitlab.jfronny.inceptum.gtk.window.dialog;
|
|||
import io.gitlab.jfronny.inceptum.common.Utils;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import io.gitlab.jfronny.inceptum.launcher.api.account.*;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.net.URI;
|
||||
|
|
|
@ -7,8 +7,8 @@ import io.gitlab.jfronny.inceptum.gtk.GtkEnvBackend;
|
|||
import io.gitlab.jfronny.inceptum.gtk.GtkMain;
|
||||
import io.gitlab.jfronny.inceptum.gtk.util.I18n;
|
||||
import io.gitlab.jfronny.inceptum.launcher.util.ProcessState;
|
||||
import org.gtk.glib.GLib;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.glib.GLib;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
public class ProcessStateWatcherDialog extends MessageDialog {
|
||||
private final ProcessState state;
|
||||
|
@ -55,7 +55,7 @@ public class ProcessStateWatcherDialog extends MessageDialog {
|
|||
widget.queueDraw();
|
||||
}
|
||||
return GLib.SOURCE_CONTINUE;
|
||||
}, null);
|
||||
});
|
||||
new Thread(() -> {
|
||||
try {
|
||||
executor.run();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.window.dialog;
|
||||
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class StringInputDialog extends MessageDialog {
|
||||
|
|
|
@ -11,7 +11,7 @@ import io.gitlab.jfronny.inceptum.launcher.system.exporter.Exporter;
|
|||
import io.gitlab.jfronny.inceptum.launcher.system.exporter.Exporters;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.Instance;
|
||||
import io.gitlab.jfronny.inceptum.launcher.util.ProcessState;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.window.settings.instance;
|
||||
|
||||
import io.github.jwharm.javagi.GErrorException;
|
||||
import io.github.jwharm.javagi.base.GErrorException;
|
||||
import io.gitlab.jfronny.commons.ArgumentsTokenizer;
|
||||
import io.gitlab.jfronny.commons.io.JFiles;
|
||||
import io.gitlab.jfronny.inceptum.common.*;
|
||||
|
@ -15,9 +15,9 @@ import io.gitlab.jfronny.inceptum.launcher.model.inceptum.InstanceMeta;
|
|||
import io.gitlab.jfronny.inceptum.launcher.model.mojang.VersionsList;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.*;
|
||||
import io.gitlab.jfronny.inceptum.launcher.util.GameVersionParser;
|
||||
import org.gtk.gio.File;
|
||||
import org.gtk.gobject.BindingFlags;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gio.File;
|
||||
import org.gnome.gobject.BindingFlags;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
|
|
@ -2,7 +2,7 @@ package io.gitlab.jfronny.inceptum.gtk.window.settings.instance;
|
|||
|
||||
import io.gitlab.jfronny.inceptum.gtk.control.settings.SettingsWindow;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.Instance;
|
||||
import org.gtk.gtk.Application;
|
||||
import org.gnome.gtk.Application;
|
||||
|
||||
public class InstanceSettingsWindow extends SettingsWindow {
|
||||
public InstanceSettingsWindow(Application app, Instance instance) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import io.gitlab.jfronny.inceptum.gtk.control.settings.SettingsTab;
|
|||
import io.gitlab.jfronny.inceptum.gtk.window.dialog.MicrosoftLoginDialog;
|
||||
import io.gitlab.jfronny.inceptum.launcher.api.account.AccountManager;
|
||||
import io.gitlab.jfronny.inceptum.launcher.api.account.MicrosoftAccount;
|
||||
import org.gtk.gtk.*;
|
||||
import org.gnome.gtk.*;
|
||||
|
||||
public class AccountsTab extends SettingsTab implements SettingsTab.SectionBuilder {
|
||||
public AccountsTab(Window window) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import io.gitlab.jfronny.inceptum.common.InceptumConfig;
|
|||
import io.gitlab.jfronny.inceptum.common.model.inceptum.UpdateChannel;
|
||||
import io.gitlab.jfronny.inceptum.gtk.control.settings.IRow;
|
||||
import io.gitlab.jfronny.inceptum.gtk.control.settings.SettingsTab;
|
||||
import org.gtk.gtk.Window;
|
||||
import org.gnome.gtk.Window;
|
||||
|
||||
public class GeneralTab extends SettingsTab {
|
||||
public GeneralTab(Window window) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.gitlab.jfronny.inceptum.gtk.window.settings.launcher;
|
||||
|
||||
import io.gitlab.jfronny.inceptum.gtk.control.settings.SettingsWindow;
|
||||
import org.gtk.gtk.Application;
|
||||
import org.gnome.gtk.Application;
|
||||
|
||||
public class LauncherSettingsWindow extends SettingsWindow {
|
||||
public LauncherSettingsWindow(Application app) {
|
||||
|
|
Loading…
Reference in New Issue