From: Niki Roo Date: Thu, 11 Apr 2019 05:16:16 +0000 (+0200) Subject: Merge branch 'search' X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=commitdiff_plain;h=3172c8cf7cdb9f9bf90c4515b8494ae84e9527ff;hp=596ed3d65b2585c4358935d6fbb130f50e237787 Merge branch 'search' --- diff --git a/src/be/nikiroo/fanfix/Instance.java b/src/be/nikiroo/fanfix/Instance.java index cacbbfe..733c16c 100644 --- a/src/be/nikiroo/fanfix/Instance.java +++ b/src/be/nikiroo/fanfix/Instance.java @@ -52,6 +52,10 @@ public class Instance { // Most of the rest is dependent upon this: createConfigs(configDir, false); + + // Proxy support + // TODO: include new nikiroo-utils version + // Proxy.use(Instance.getConfig().getString(Config.USE_PROXY)); // update tracer: boolean debug = Instance.getConfig() diff --git a/src/be/nikiroo/fanfix/bundles/Config.java b/src/be/nikiroo/fanfix/bundles/Config.java index ecbfa3d..74beeae 100644 --- a/src/be/nikiroo/fanfix/bundles/Config.java +++ b/src/be/nikiroo/fanfix/bundles/Config.java @@ -64,6 +64,8 @@ public enum Config { LOGIN_YIFFSTAR_PASS, // @Meta(description = "If the last update check was done at least that many days, check for updates at startup (-1 for 'no checks' -- default is 1 day)", format = Format.INT) UPDATE_INTERVAL, // + @Meta(def = "", description = "", info = "Format is ((user(:pass)@)proxy:port), with ':' being system proxy and an empty String being no proxy") + USE_PROXY, @Meta(description = "An API key required to create a token from FimFiction", format = Format.STRING) LOGIN_FIMFICTION_APIKEY_CLIENT_ID, // @Meta(description = "An API key required to create a token from FimFiction", format = Format.PASSWORD) diff --git a/src/be/nikiroo/fanfix/bundles/config.properties b/src/be/nikiroo/fanfix/bundles/config.properties index 8f22f9f..6409539 100644 --- a/src/be/nikiroo/fanfix/bundles/config.properties +++ b/src/be/nikiroo/fanfix/bundles/config.properties @@ -77,6 +77,8 @@ LOGIN_YIFFSTAR_PASS = # If the last update check was done at least that many days, check for updates at startup (-1 for 'no checks' -- default is 1 day) # (FORMAT: INT) UPDATE_INTERVAL = +# (FORMAT: STRING) Format is ((user(:pass)@)proxy:port), with ':' being system proxy and an empty String being no proxy +USE_PROXY = # An API key required to create a token from FimFiction # (FORMAT: STRING) LOGIN_FIMFICTION_APIKEY_CLIENT_ID = diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java index ffbcda3..cd98fac 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java @@ -288,7 +288,7 @@ public class GuiReaderGroup extends JPanel { books.get(previousIndex).setSelected(false); } - if (index >= 0) { + if (index >= 0 && !books.isEmpty()) { books.get(index).setSelected(true); } }