Compare commits

...

9 Commits

Author SHA1 Message Date
Zlatin Balevsky
0eb5870e9b Release 0.1.13 2019-06-15 09:19:19 +01:00
Zlatin Balevsky
051efbfaba prevent empty searches 2019-06-15 09:11:42 +01:00
Zlatin Balevsky
6b38d7bffb fix sorting bug try 2 2019-06-15 08:58:51 +01:00
Zlatin Balevsky
5778d537ce Release 0.1.12 2019-06-15 08:39:19 +01:00
Zlatin Balevsky
93664a7985 update readme 2019-06-15 08:37:29 +01:00
Zlatin Balevsky
edd58e0c90 allow cancelling of downloads while hashlist is being fetched 2019-06-15 08:35:23 +01:00
Zlatin Balevsky
9ac52b61dc sort results table on update 2019-06-15 08:33:22 +01:00
Zlatin Balevsky
0a4b9c7029 shut down connection manager last 2019-06-15 08:20:10 +01:00
Zlatin Balevsky
87b366a205 add ability to cancel failed downloads 2019-06-14 22:49:56 +01:00
8 changed files with 14 additions and 10 deletions

View File

@@ -31,4 +31,3 @@ The first time you run MuWire it will ask you to select a nickname. This nickna
### Known bugs and limitations
* Many UI features you would expect are not there yet
* Sorting the results table sometimes causes the wrong result to be downloaded

View File

@@ -34,7 +34,7 @@ class Cli {
Core core
try {
core = new Core(props, home, "0.1.11")
core = new Core(props, home, "0.1.13")
} catch (Exception bad) {
bad.printStackTrace(System.out)
println "Failed to initialize core, exiting"

View File

@@ -53,7 +53,7 @@ class CliDownloader {
Core core
try {
core = new Core(props, home, "0.1.11")
core = new Core(props, home, "0.1.13")
} catch (Exception bad) {
bad.printStackTrace(System.out)
println "Failed to initialize core, exiting"

View File

@@ -234,14 +234,14 @@ public class Core {
}
public void shutdown() {
log.info("shutting down connection manager")
connectionManager.shutdown()
log.info("shutting down download manageer")
downloadManager.shutdown()
log.info("shutting down connection acceeptor")
connectionAcceptor.stop()
log.info("shutting down connection establisher")
connectionEstablisher.stop()
log.info("shutting down connection manager")
connectionManager.shutdown()
}
static main(args) {
@@ -268,7 +268,7 @@ public class Core {
}
}
Core core = new Core(props, home, "0.1.11")
Core core = new Core(props, home, "0.1.13")
core.startServices()
// ... at the end, sleep or execute script

View File

@@ -1,5 +1,5 @@
group = com.muwire
version = 0.1.11
version = 0.1.13
groovyVersion = 2.4.15
slf4jVersion = 1.7.25
spockVersion = 1.1-groovy-2.4

View File

@@ -39,6 +39,9 @@ class MainFrameController {
cardsPanel.getLayout().show(cardsPanel, "search window")
def search = builder.getVariable("search-field").text
search = search.trim()
if (search.length() == 0)
return
def uuid = UUID.randomUUID()
Map<String, Object> params = new HashMap<>()
params["search-terms"] = search
@@ -86,8 +89,8 @@ class MainFrameController {
return
def sortEvt = group.view.lastSortEvent
if (sortEvt != null) {
row = sortEvt.convertPreviousRowIndexToModel(row)
}
row = group.view.resultsTable.rowSorter.convertRowIndexToModel(row)
}
group.model.results[row]
}

View File

@@ -280,11 +280,12 @@ class MainFrameView {
switch(downloader.getCurrentState()) {
case Downloader.DownloadState.CONNECTING :
case Downloader.DownloadState.DOWNLOADING :
case Downloader.DownloadState.HASHLIST:
model.cancelButtonEnabled = true
model.retryButtonEnabled = false
break
case Downloader.DownloadState.FAILED:
model.cancelButtonEnabled = false
model.cancelButtonEnabled = true
model.retryButtonEnabled = true
break
default:

View File

@@ -97,6 +97,7 @@ class SearchTabView {
resultsTable.rowSorter.addRowSorterListener({ evt -> lastSortEvent = evt})
resultsTable.rowSorter.setSortsOnUpdates(true)
resultsTable.addMouseListener(new MouseAdapter() {
@Override