mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
fixed library directories list + processing config change events
This commit is contained in:
parent
fdf80bd6a4
commit
bd65b8c426
2 changed files with 21 additions and 20 deletions
|
@ -130,6 +130,7 @@ final class SQLiteConfig extends ConfigInterface.Stub {
|
||||||
mySetValueStatement.execute();
|
mySetValueStatement.execute();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
}
|
}
|
||||||
|
sendChangeEvent(group, name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
package org.geometerplus.fbreader.library;
|
package org.geometerplus.fbreader.library;
|
||||||
|
|
||||||
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
||||||
import org.geometerplus.zlibrary.core.options.Config;
|
|
||||||
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
import org.geometerplus.zlibrary.core.resources.ZLResource;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.Paths;
|
import org.geometerplus.fbreader.Paths;
|
||||||
|
@ -28,15 +27,26 @@ import org.geometerplus.fbreader.Paths;
|
||||||
public class FileFirstLevelTree extends FirstLevelTree {
|
public class FileFirstLevelTree extends FirstLevelTree {
|
||||||
FileFirstLevelTree(RootTree root) {
|
FileFirstLevelTree(RootTree root) {
|
||||||
super(root, ROOT_FILE_TREE);
|
super(root, ROOT_FILE_TREE);
|
||||||
Config.Instance().runOnStart(new Runnable() {
|
}
|
||||||
public void run() {
|
|
||||||
for (String dir : Paths.BookPathOption().getValue()) {
|
@Override
|
||||||
addChild(dir, "fileTreeLibrary", dir);
|
public String getTreeTitle() {
|
||||||
}
|
return getName();
|
||||||
addChild("/", "fileTreeRoot", null);
|
}
|
||||||
addChild(Paths.cardDirectory(), "fileTreeCard", null);
|
|
||||||
}
|
@Override
|
||||||
});
|
public Status getOpeningStatus() {
|
||||||
|
return Status.ALWAYS_RELOAD_BEFORE_OPENING;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void waitForOpening() {
|
||||||
|
clear();
|
||||||
|
for (String dir : Paths.BookPathOption().getValue()) {
|
||||||
|
addChild(dir, "fileTreeLibrary", dir);
|
||||||
|
}
|
||||||
|
addChild("/", "fileTreeRoot", null);
|
||||||
|
addChild(Paths.cardDirectory(), "fileTreeCard", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addChild(String path, String resourceKey, String summary) {
|
private void addChild(String path, String resourceKey, String summary) {
|
||||||
|
@ -51,14 +61,4 @@ public class FileFirstLevelTree extends FirstLevelTree {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTreeTitle() {
|
|
||||||
return getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Status getOpeningStatus() {
|
|
||||||
return Status.READY_TO_OPEN;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue