Skip to content

Commit

Permalink
Merge pull request #128 from Kennox/release-0-6-1
Browse files Browse the repository at this point in the history
Release v0.6.1
  • Loading branch information
l-marchesi authored May 17, 2017
2 parents f5828b1 + 3cc36a7 commit c92cb57
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 25 deletions.
10 changes: 6 additions & 4 deletions config/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html.
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
To completely disable a check, just comment it out or delete it from the file.
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->

Expand Down Expand Up @@ -93,6 +90,11 @@
<property name="tokens" value="COMMA"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapMethodRef"/>
<property name="tokens" value="METHOD_REF"/>
<property name="option" value="nl"/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern"
Expand Down
55 changes: 54 additions & 1 deletion debianfx/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,57 @@ Name[de]=Fernwartung (JavaFX)
Name[en]=Remote Support (JavaFX)
Name[it]=Assistenza Remota (JavaFX)
StartupNotify=true
Type=Application" > /usr/share/applications/ch-imedias-rsccfx.desktop
Type=Application" > /usr/share/applications/ch-imedias-rsccfx.desktop

echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<supporters>
<supporter>
<description>imedias</description>
<address>agora.imedias.ch</address>
<port></port>
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
<supporter>
<description>imedias (encrypted)</description>
<address>agora.imedias.ch</address>
<port></port>
<encrypted>true</encrypted>
<chargeable>false</chargeable>
</supporter>
<supporter>
<description>IFE Informatik AG</description>
<address>46.14.169.243</address>
<port></port>
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
<supporter>
<description>Edelmanns Informatik GmbH</description>
<address>lernstick.edelmanns.ch</address>
<port></port>
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
<supporter>
<description>Ronny Standtke</description>
<address>standtke.nsupdate.info</address>
<port></port>
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
<supporter>
<description>dindan solutions GmbH</description>
<address>dindan.dyndns.info</address>
<port></port>
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
<supporter>
<description></description>
<address></address>
<port></port>
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
</supporters>' > /home/user/.rscc/rscc-defaults-lernstick.xml
13 changes: 8 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
<groupId>ch.fhnw</groupId>
<artifactId>rscc</artifactId>
<version>0.0.1-SNAPSHOT</version>
Expand Down Expand Up @@ -70,7 +73,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -80,7 +83,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<version>1.6.0</version>
<executions>
<execution>
<id>create-strings</id>
Expand Down Expand Up @@ -108,7 +111,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>7.6</version>
<version>7.7</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -136,7 +139,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<version>3.0.0</version>
<executions>
<execution>
<id>add-resource</id>
Expand Down Expand Up @@ -172,7 +175,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
7 changes: 7 additions & 0 deletions resources/rscc-defaults-lernstick.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,11 @@
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
<supporter>
<description></description>
<address></address>
<port></port>
<encrypted>false</encrypted>
<chargeable>false</chargeable>
</supporter>
</supporters>
65 changes: 65 additions & 0 deletions src/ch/imedias/rsccfx/localization/Bundle_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,68 @@ remoteSupportFrameSeekSupportPanelTabConstraintsTabTitle=Cerca
remoteSupportFrameTitle=Assistenza remota
startService=Avvia servizio
stopService=Arresta servizio

#Home
homeRequestBigLbl=Ho bisogno di aiuto
homeRequestSmallLbl=Si prega di cercarsi aiuto remoto.
homeSupportBigLbl=Io voglio aiutare qualcuno
homeSupportSmallLbl=Qualcuno ha bisogno del mio aiuto

#RequestView
requestTitleLbl=Genera chiave
requestDescriptionLbl=Si prega di condividere questa chiave con il tuo supporter e attendere per la connessione.
requestKeyGeneratorPane= Generazione chiave
requestGeneratedKeyFld=Chiave viene generata…
requestPredefinedAdressessPane=Indirizzi predefiniti
requestStatusLblWaiting=Attesa ...
requestStatusLblReady=Pronto!

#SupportView
supportTitleLbl=Inserire chiave
supportDescriptionLbl=Per avviare una nuova connessione di supporto remoto immettere la frase chiave generata è condivisa dal partner.
supportConnectBtn=Connesso
supportKeyInputPane=Inserire chiave
supportAdressBookPane=Avviare servizio
supportStatusLblWaiting=In attesa ...
supportStatusLblReady=Pronto!
requestSupporterDescriptionLbl=Scegliere il supporter di aiuto. È inoltre possibile aggiungere un nuovo supporter o modificare uno esistente. Per favore contattare il proprio supporter per i dettagli della connessione.

#StartServiceView
startServiceBtn=Avviare servizio
startServiceTitleLbl=Avviare servizio
startServiceDescpriptionLbl=Il suo partner può connettersi soltanto attraverso la rubrica se lei avvia il servizio prima.

#PopOver
supportHelpLbl=Generazione chiavi - creazione di connessione\n\nPer creare una connessione tra di voi e il suo supporter è necessario generare una chiave e condividerla con il proprio supporter. Il tuo supporter utilizzerà questa chiave per connettersi con il suo dispositivo.\n\nBarra di stato \n\n La barra di stato alla fine della finestra mostra se esiste una possibilità di creare una connessione.\n\nVerde: Possibile stabilire la connessione. \nArancione: Non è ancora possibile stabilire una connessione. \n\nPer favore contatti il suo supporter se non è possibile creare una connessione.
requestHelpLbl=Inserimento chiave - creazione connessione\n\nPer stabilire una connessione è necessario la chiave generata dal partner. Inserisci la chiave nel campo di testo a sinistra e premere \u0022Connect \u0022 per stabilire una connessione.\n\nBarra di stato\n\nLa barra di stato alla fine della finestra mostra se esiste una possibilità di creare una connessione.\n\nVerde: Possibile stabilire una connessione.\nArancione: Non è ancora possibile stabilire una connessione.\n\nPer favore contattare imedias se non è possibile creare una connessione.
homeHelpLbl=Qui può scegliere tra le opzioni \u0022Ho bisogno di aiuto\u0022 e \u0022 Desidero aiutare qualcuno \u0022.\n\nPremere su \u0022Ho bisogno di aiuto\u0022 se un supporter deve connettersi con il suo dispositivo.\n\nDesidero aiutare qualcuno se desiderate connettersi con un computer di un'altra persona da aiutare.

#Dialog
dialogTitleText=Dettagli sul supporter
dialogNameText=Nome
dialogAddressText=Indirizzo
dialogPortText=Porta
dialogImageText=Immagine
dialogChargeableLbl=Addebitabile
dialogEncryptedLbl=Criptato

#Settings
supportCompressionLbl=Compressione
supportQualityLbl=Qualità
supportBgr233Lbl=BGR233
requestViewOnlyLbl=Solo leggere
bgr233DescriptionLbl=Questa opzione riduce la qualità della connessione.

#ExpertSettings
expertSettingsDialogTitle=Proprietà avanzate
expertForceConnectOverServerLbl=Forza connessione tramite server
expertKeyserverIpLbl=Indirizzo IP del server chiavi
expertKeyserverHttpLbl=Porta HTTP del server chiavi
expertVncPortLbl=Porta VNC
expertIcePortLbl=Porta ICE
expertUdpPackageSizeLbl=Grandezza pacchetti UDP
expertProxyPortLbl=Porta Proxy
expertStunServerPortLbl=Porta stunserver
expertStunserverLbl=Stunservers
expertSettingsBtn=Impostazioni avanzate
settingsTitleLbl=Impostazioni avanzate
6 changes: 4 additions & 2 deletions src/ch/imedias/rsccfx/model/xml/SupporterHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class SupporterHelper {
private static final Logger LOGGER =
Logger.getLogger(SupporterHelper.class.getName());
private static final String SUPPORT_ADDRESSES = "supportAddresses";
private static final String DEFAULT_SUPPORTERS_FILENAME = "rscc-defaults-lernstick.xml";
private static final String DEFAULT_SUPPORTERS_FILENAME =
"/home/user/.rscc/rscc-defaults-lernstick.xml";
private final Preferences preferences = Preferences.userNodeForPackage(RsccApp.class);

/**
Expand Down Expand Up @@ -51,8 +52,9 @@ public void saveSupporters(List<Supporter> supporters) {
* Returns a default list of supporters.
*/
public List<Supporter> getDefaultSupporters() {
LOGGER.info("Loading default supporter list");
File supportersXmlFile =
new File(getClass().getClassLoader().getResource(DEFAULT_SUPPORTERS_FILENAME).getFile());
new File(DEFAULT_SUPPORTERS_FILENAME);
return getSupportersFromXml(supportersXmlFile);
}

Expand Down
24 changes: 11 additions & 13 deletions src/ch/imedias/rsccfx/view/RsccRequestPresenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import ch.imedias.rsccfx.model.Rscc;
import ch.imedias.rsccfx.model.xml.Supporter;
import ch.imedias.rsccfx.model.xml.SupporterHelper;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import javafx.application.Platform;
Expand All @@ -27,15 +28,14 @@ public class RsccRequestPresenter implements ControlledPresenter {
private static final Logger LOGGER =
Logger.getLogger(RsccRequestPresenter.class.getName());
private static final int GRID_MAXIMUM_COLUMNS = 3;
public static List<Supporter> supporters = new ArrayList<>();
private final Rscc model;
private final RsccRequestView view;
private final HeaderPresenter headerPresenter;
private final SupporterHelper supporterHelper;
private ViewController viewParent;
private PopOverHelper popOverHelper;
private int buttonSize = 0;
public static List<Supporter> supporters;


/**
* Initializes a new RsccRequestPresenter with the matching view.
Expand Down Expand Up @@ -141,31 +141,31 @@ private void initHeader() {
* Calls createSupporterList() and creates a button for every supporter found.
*/
public void initSupporterList() {
supporters = supporterHelper.loadSupporters();
List<Supporter> loadedSupporters = supporterHelper.loadSupporters();
// check if invalid format of XML was found during loading
if (supporters == null) {
supporters = supporterHelper.getDefaultSupporters();
supporterHelper.saveSupporters(supporters);
if (loadedSupporters == null) {
loadedSupporters = supporterHelper.getDefaultSupporters();
}

supporters.stream().forEachOrdered(this::createNewSupporterBtn);
loadedSupporters.stream().forEachOrdered(this::createNewSupporterBtn);

createNewSupporterBtn(new Supporter());
supporterHelper.saveSupporters(supporters);
}

/**
* Creates new SupporterButton and adds it to the GridPane.
*/
public void createNewSupporterBtn(Supporter supporter) {
supporters.add(supporter);

Button supporterBtn = new Button(supporter.toString());
supporterBtn.getStyleClass().add("supporterBtn");
initButtonSize(supporterBtn);
attachContextMenu(supporterBtn, supporter);

supporterBtn.setOnAction(event -> {
// if create new button was pressed
if ("+".equals(supporter.toString())) {
// if create new button (last button) was pressed
if (supporters.get(supporters.size() - 1) == supporter) {
createNewSupporterBtn(new Supporter());
}
// Open Dialog to modify data
Expand All @@ -186,14 +186,12 @@ private void attachContextMenu(Button button, Supporter supporter) {
ContextMenu contextMenu = new ContextMenu();

MenuItem editMenuItem = new MenuItem("Edit");
// FIXME: new Supporter() must be changed to the supporter of the button
editMenuItem.setOnAction(event -> new SupporterAttributesDialog(supporter));

editMenuItem.setOnAction(event -> new SupporterAttributesDialog(supporter));

MenuItem connectMenuItem = new MenuItem("Call");
connectMenuItem.setOnAction(event -> {
/*TODO start connection*/

});

// Add MenuItem to ContextMenu
Expand Down

0 comments on commit c92cb57

Please sign in to comment.