git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e96619e
)
GUI: search: stories with tags
author
Niki Roo
<niki@nikiroo.be>
Wed, 17 Apr 2019 17:02:15 +0000
(19:02 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Wed, 17 Apr 2019 17:02:15 +0000
(19:02 +0200)
src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java
b/src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java
index c421ba6b006a43425aa735f6f1a0a4cc38ee95eb..f0285d789b7859e6b008344a273af517e5b75a88 100644
(file)
--- a/
src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java
+++ b/
src/be/nikiroo/fanfix/reader/ui/GuiReaderSearch.java
@@
-311,7
+311,22
@@
public class GuiReaderSearch extends JFrame {
addTagBar(tag, new Runnable() {
@Override
public void run() {
addTagBar(tag, new Runnable() {
@Override
public void run() {
- // TODO: stories if needed
+ // TODO: slow ui
+ SearchableTag tag = ((SearchableTag) combo
+ .getSelectedItem());
+ if (tag != null && tag.isLeaf()) {
+ BasicSearchable searchable = BasicSearchable
+ .getSearchable(supportType);
+ List<MetaData> metas = new ArrayList<MetaData>();
+ try {
+ metas = searchable.search(tag, 1);
+ search(metas, 1,
+ searchable.searchPages(tag), 0);
+ } catch (IOException e) {
+ error(e);
+ }
+ }
+
setWaitingScreen(false);
}
});
setWaitingScreen(false);
}
});
@@
-319,6
+334,7
@@
public class GuiReaderSearch extends JFrame {
}
});
}
});
+ combos.add(combo);
tagBars.add(combo);
}
tagBars.add(combo);
}
@@
-349,7
+365,6
@@
public class GuiReaderSearch extends JFrame {
children = tag.getChildren();
} else {
children = null;
children = tag.getChildren();
} else {
children = null;
- // TODO: stories
}
}
}
}