Compare commits
7 Commits
2.7-java-5
...
2.7-java-7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39f6893742 | ||
|
|
7bf7b8981c | ||
|
|
09abe21fed | ||
|
|
6fae0fe425 | ||
|
|
0558176847 | ||
|
|
c553201cda | ||
|
|
665be9494b |
@@ -2,7 +2,7 @@ allprojects {
|
|||||||
apply plugin: 'findbugs'
|
apply plugin: 'findbugs'
|
||||||
|
|
||||||
group = 'com.lyndir.masterpassword'
|
group = 'com.lyndir.masterpassword'
|
||||||
version = '2.7.5'
|
version = '2.7.7'
|
||||||
|
|
||||||
tasks.withType( JavaCompile ) {
|
tasks.withType( JavaCompile ) {
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ _initialize_needs() {
|
|||||||
if [[ $platform = windows ]]; then
|
if [[ $platform = windows ]]; then
|
||||||
needs cmd
|
needs cmd
|
||||||
export VSINSTALLDIR="${VSINSTALLDIR:-$(cd "$(cygpath -F 0x002a)/Microsoft Visual Studio"/*/*/Common7/.. && pwd)}"
|
export VSINSTALLDIR="${VSINSTALLDIR:-$(cd "$(cygpath -F 0x002a)/Microsoft Visual Studio"/*/*/Common7/.. && pwd)}"
|
||||||
[[ -e "$VSINSTALLDIR/Common7/Tools/VsMSBuildCmd.bat" ]] || { echo >&2 "Missing: msbuild. Please install 'Build Tools for Visual Studio'."; return 1; }
|
[[ -e "$VSINSTALLDIR/Common7/Tools/VsMSBuildCmd.bat" ]] || { echo >&2 "Missing: msbuild. Please install 'Build Tools for Visual Studio'. See https://visualstudio.microsoft.com/downloads/?q=build+tools"; return 1; }
|
||||||
else
|
else
|
||||||
needs libtool:libtoolize,glibtoolize automake autoconf make
|
needs libtool:libtoolize,glibtoolize automake autoconf make
|
||||||
fi
|
fi
|
||||||
@@ -202,7 +202,7 @@ _target_build() {
|
|||||||
|
|
||||||
if [[ $platform = windows ]]; then
|
if [[ $platform = windows ]]; then
|
||||||
# I cannot for the life of me figure out how to pass this command directly into cmd.
|
# I cannot for the life of me figure out how to pass this command directly into cmd.
|
||||||
printf '"%%VSINSTALLDIR%%\Common7\Tools\VsMSBuildCmd.bat" && msbuild /t:Rebuild /p:Configuration=ReleaseDLL;Platform=%s;OutDir=%s' "$arch" "$(cygpath -w "${prefix##$PWD/}/$arch/")" > .build.bat
|
printf '"%%VSINSTALLDIR%%\Common7\Tools\VsMSBuildCmd.bat" && msbuild /t:Rebuild /p:Configuration=Release;Platform=%s;OutDir=%s' "$arch" "$(cygpath -w "${prefix##$PWD/}/$arch/")" > .build.bat
|
||||||
cmd //c .build.bat
|
cmd //c .build.bat
|
||||||
rm -f .build.bat
|
rm -f .build.bat
|
||||||
else
|
else
|
||||||
@@ -278,7 +278,10 @@ _finalize_merge() {
|
|||||||
# By default, this will run `make clean`.
|
# By default, this will run `make clean`.
|
||||||
finalize_clean() { _finalize_clean "$@"; }
|
finalize_clean() { _finalize_clean "$@"; }
|
||||||
_finalize_clean() {
|
_finalize_clean() {
|
||||||
|
if [[ $platform = windows ]]; then :
|
||||||
|
else
|
||||||
[[ ! -e Makefile ]] || make -s clean
|
[[ ! -e Makefile ]] || make -s clean
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# build <name> [<platform>]
|
# build <name> [<platform>]
|
||||||
|
|||||||
BIN
platform-independent/c/core/lib/windows/x86/mpw.dll
Executable file → Normal file
BIN
platform-independent/c/core/lib/windows/x86/mpw.dll
Executable file → Normal file
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,10 @@
|
|||||||
package com.lyndir.masterpassword.gui.util;
|
package com.lyndir.masterpassword.gui.util;
|
||||||
|
|
||||||
|
import com.google.common.base.Predicates;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.Iterables;
|
||||||
|
import com.lyndir.lhunath.opal.system.logging.Logger;
|
||||||
|
import com.lyndir.lhunath.opal.system.util.ObjectUtils;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@@ -15,6 +20,8 @@ import javax.swing.event.ListSelectionListener;
|
|||||||
public class CollectionListModel<E> extends AbstractListModel<E>
|
public class CollectionListModel<E> extends AbstractListModel<E>
|
||||||
implements ComboBoxModel<E>, ListSelectionListener, Selectable<E, CollectionListModel<E>> {
|
implements ComboBoxModel<E>, ListSelectionListener, Selectable<E, CollectionListModel<E>> {
|
||||||
|
|
||||||
|
private static final Logger logger = Logger.get( CollectionListModel.class );
|
||||||
|
|
||||||
private final List<E> model = new LinkedList<>();
|
private final List<E> model = new LinkedList<>();
|
||||||
@Nullable
|
@Nullable
|
||||||
private JList<E> list;
|
private JList<E> list;
|
||||||
@@ -51,16 +58,11 @@ public class CollectionListModel<E> extends AbstractListModel<E>
|
|||||||
* This operation will mutate the internal model to reflect the given model.
|
* This operation will mutate the internal model to reflect the given model.
|
||||||
* The given model will remain untouched and independent from this object.
|
* The given model will remain untouched and independent from this object.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({ "unchecked", "SuspiciousToArrayCall" })
|
@SuppressWarnings({ "Guava", "AssignmentToForLoopParameter" })
|
||||||
public synchronized void set(final Collection<? extends E> elements) {
|
public synchronized void set(final Iterable<? extends E> elements) {
|
||||||
set( (E[]) elements.toArray( new Object[0] ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("AssignmentToForLoopParameter")
|
|
||||||
public synchronized void set(final E... elements) {
|
|
||||||
ListIterator<E> oldIt = model.listIterator();
|
ListIterator<E> oldIt = model.listIterator();
|
||||||
for (int from = 0; oldIt.hasNext(); ++from) {
|
for (int from = 0; oldIt.hasNext(); ++from) {
|
||||||
int to = Arrays.binarySearch( elements, oldIt.next() );
|
int to = Iterables.indexOf( elements, Predicates.equalTo( oldIt.next() ) );
|
||||||
|
|
||||||
if (to != from) {
|
if (to != from) {
|
||||||
oldIt.remove();
|
oldIt.remove();
|
||||||
@@ -69,19 +71,25 @@ public class CollectionListModel<E> extends AbstractListModel<E>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int to = 0; to < elements.length; ++to) {
|
int to = 0;
|
||||||
E newSite = elements[to];
|
for (final E newSite : elements) {
|
||||||
|
|
||||||
if ((to >= model.size()) || !Objects.equals( model.get( to ), newSite )) {
|
if ((to >= model.size()) || !Objects.equals( model.get( to ), newSite )) {
|
||||||
model.add( to, newSite );
|
model.add( to, newSite );
|
||||||
fireIntervalAdded( this, to, to );
|
fireIntervalAdded( this, to, to );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
++to;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((selectedItem == null) || !model.contains( selectedItem ))
|
if ((selectedItem == null) || !model.contains( selectedItem ))
|
||||||
setSelectedItem( getElementAt( 0 ) );
|
setSelectedItem( getElementAt( 0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SafeVarargs
|
||||||
|
public final synchronized void set(final E... elements) {
|
||||||
|
set( ImmutableList.copyOf( elements ) );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({ "unchecked", "SuspiciousMethodCalls" })
|
@SuppressWarnings({ "unchecked", "SuspiciousMethodCalls" })
|
||||||
public synchronized void setSelectedItem(@Nullable final Object newSelectedItem) {
|
public synchronized void setSelectedItem(@Nullable final Object newSelectedItem) {
|
||||||
|
|||||||
Submodule public/site updated: 0623231ad5...ff77947d44
Reference in New Issue
Block a user