diff --git a/resources/Labels.txt b/resources/Labels.txt
index 1d554a36..3ba19eb1 100755
--- a/resources/Labels.txt
+++ b/resources/Labels.txt
@@ -1,4 +1,4 @@
-icon=images/icon.gif
+icon=images/icon.png
encoding=ISO-8859-1
menu.file=&File
menu.file.saveAll=&Save...
@@ -91,10 +91,14 @@ button.OK=OK
button.cancel=Cancel
button.close=Close
button.next=Next ->
-button.start.img=images/buttons/start.gif
-button.stop.img=images/buttons/stop.gif
-button.kill.img=images/buttons/kill.gif
-button.ipUp.img=images/buttons/ipup.gif
+button.start=Start
+button.start.img=images/buttons/start.png
+button.stop=Stop
+button.stop.img=images/buttons/stop.png
+button.kill=Stop!
+button.kill.img=images/buttons/kill.png
+button.ipUp=IP
+button.ipUp.img=images/buttons/ipup.png
button.up=&Up
button.down=&Down
button.delete=De&lete
@@ -104,10 +108,10 @@ button.add=&Add
button.left=<
button.right=>
combobox.feeder.tooltip=IP Feeder selection. Change this if you need another source for IP addresses to scan
-list.unknown.img=images/list/unknown.gif
-list.dead.img=images/list/dead.gif
-list.alive.img=images/list/alive.gif
-list.addinfo.img=images/list/addinfo.gif
+list.unknown.img=images/list/unknown.png
+list.dead.img=images/list/dead.png
+list.alive.img=images/list/alive.png
+list.addinfo.img=images/list/addinfo.png
pinger.icmp=ICMP Echo
pinger.icmp2=ICMP Echo (Alternative)
pinger.udp=UDP packet
diff --git a/resources/images/buttons/ipup.gif b/resources/images/buttons/ipup.gif
deleted file mode 100755
index f50fe3c9..00000000
Binary files a/resources/images/buttons/ipup.gif and /dev/null differ
diff --git a/resources/images/buttons/ipup.png b/resources/images/buttons/ipup.png
new file mode 100755
index 00000000..a75d3f90
Binary files /dev/null and b/resources/images/buttons/ipup.png differ
diff --git a/resources/images/buttons/ipup.svg b/resources/images/buttons/ipup.svg
new file mode 100755
index 00000000..fbbea51e
--- /dev/null
+++ b/resources/images/buttons/ipup.svg
@@ -0,0 +1,217 @@
+
+
+
diff --git a/resources/images/buttons/kill.gif b/resources/images/buttons/kill.gif
deleted file mode 100755
index f015e163..00000000
Binary files a/resources/images/buttons/kill.gif and /dev/null differ
diff --git a/resources/images/buttons/kill.png b/resources/images/buttons/kill.png
new file mode 100755
index 00000000..d8781869
Binary files /dev/null and b/resources/images/buttons/kill.png differ
diff --git a/resources/images/buttons/kill.svg b/resources/images/buttons/kill.svg
new file mode 100755
index 00000000..1ede1df7
--- /dev/null
+++ b/resources/images/buttons/kill.svg
@@ -0,0 +1,243 @@
+
+
+
diff --git a/resources/images/buttons/start.gif b/resources/images/buttons/start.gif
deleted file mode 100755
index 4c542428..00000000
Binary files a/resources/images/buttons/start.gif and /dev/null differ
diff --git a/resources/images/buttons/start.png b/resources/images/buttons/start.png
new file mode 100755
index 00000000..b8aab9be
Binary files /dev/null and b/resources/images/buttons/start.png differ
diff --git a/resources/images/buttons/start.svg b/resources/images/buttons/start.svg
new file mode 100755
index 00000000..2c7a5522
--- /dev/null
+++ b/resources/images/buttons/start.svg
@@ -0,0 +1,217 @@
+
+
+
diff --git a/resources/images/buttons/stop.gif b/resources/images/buttons/stop.gif
deleted file mode 100755
index 0dd6a1f2..00000000
Binary files a/resources/images/buttons/stop.gif and /dev/null differ
diff --git a/resources/images/buttons/stop.png b/resources/images/buttons/stop.png
new file mode 100755
index 00000000..d65587b2
Binary files /dev/null and b/resources/images/buttons/stop.png differ
diff --git a/resources/images/buttons/stop.svg b/resources/images/buttons/stop.svg
new file mode 100755
index 00000000..4490f83a
--- /dev/null
+++ b/resources/images/buttons/stop.svg
@@ -0,0 +1,224 @@
+
+
+
diff --git a/resources/images/icon.gif b/resources/images/icon.gif
deleted file mode 100755
index a2f0ab65..00000000
Binary files a/resources/images/icon.gif and /dev/null differ
diff --git a/resources/images/icon.png b/resources/images/icon.png
new file mode 100755
index 00000000..3e0c47fc
Binary files /dev/null and b/resources/images/icon.png differ
diff --git a/resources/images/icon.svg b/resources/images/icon.svg
new file mode 100755
index 00000000..63ec29ad
--- /dev/null
+++ b/resources/images/icon.svg
@@ -0,0 +1,258 @@
+
+
+
diff --git a/resources/images/icon2.svg b/resources/images/icon2.svg
new file mode 100755
index 00000000..90a4747d
--- /dev/null
+++ b/resources/images/icon2.svg
@@ -0,0 +1,366 @@
+
+
+
diff --git a/resources/images/list/addinfo.gif b/resources/images/list/addinfo.gif
deleted file mode 100755
index c4e77cc9..00000000
Binary files a/resources/images/list/addinfo.gif and /dev/null differ
diff --git a/resources/images/list/addinfo.png b/resources/images/list/addinfo.png
new file mode 100755
index 00000000..8cc74aea
Binary files /dev/null and b/resources/images/list/addinfo.png differ
diff --git a/resources/images/list/addinfo.svg b/resources/images/list/addinfo.svg
new file mode 100755
index 00000000..81e1f2d8
--- /dev/null
+++ b/resources/images/list/addinfo.svg
@@ -0,0 +1,195 @@
+
+
+
diff --git a/resources/images/list/alive.gif b/resources/images/list/alive.gif
deleted file mode 100755
index aa82c7c7..00000000
Binary files a/resources/images/list/alive.gif and /dev/null differ
diff --git a/resources/images/list/alive.png b/resources/images/list/alive.png
new file mode 100755
index 00000000..b168860b
Binary files /dev/null and b/resources/images/list/alive.png differ
diff --git a/resources/images/list/alive.svg b/resources/images/list/alive.svg
new file mode 100755
index 00000000..c76660e1
--- /dev/null
+++ b/resources/images/list/alive.svg
@@ -0,0 +1,195 @@
+
+
+
diff --git a/resources/images/list/dead.gif b/resources/images/list/dead.gif
deleted file mode 100755
index 10c774b3..00000000
Binary files a/resources/images/list/dead.gif and /dev/null differ
diff --git a/resources/images/list/dead.png b/resources/images/list/dead.png
new file mode 100755
index 00000000..16c40a2f
Binary files /dev/null and b/resources/images/list/dead.png differ
diff --git a/resources/images/list/dead.svg b/resources/images/list/dead.svg
new file mode 100755
index 00000000..34412e9b
--- /dev/null
+++ b/resources/images/list/dead.svg
@@ -0,0 +1,192 @@
+
+
+
diff --git a/resources/images/list/unknown.gif b/resources/images/list/unknown.gif
deleted file mode 100755
index e09f1c5f..00000000
Binary files a/resources/images/list/unknown.gif and /dev/null differ
diff --git a/resources/images/list/unknown.png b/resources/images/list/unknown.png
new file mode 100755
index 00000000..d949a3ee
Binary files /dev/null and b/resources/images/list/unknown.png differ
diff --git a/resources/images/list/unknown.svg b/resources/images/list/unknown.svg
new file mode 100755
index 00000000..7e8e04f3
--- /dev/null
+++ b/resources/images/list/unknown.svg
@@ -0,0 +1,271 @@
+
+
+
diff --git a/src/net/azib/ipscan/gui/AboutDialog.java b/src/net/azib/ipscan/gui/AboutDialog.java
index 5591a879..0417dec3 100755
--- a/src/net/azib/ipscan/gui/AboutDialog.java
+++ b/src/net/azib/ipscan/gui/AboutDialog.java
@@ -4,6 +4,7 @@
package net.azib.ipscan.gui;
import net.azib.ipscan.config.Labels;
+import net.azib.ipscan.config.Platform;
import net.azib.ipscan.config.Version;
import net.azib.ipscan.gui.actions.HelpActions;
@@ -41,13 +42,13 @@ public class AboutDialog extends AbstractModalDialog {
shell.setSize(new Point(400, 363));
Label iconLabel = new Label(shell, SWT.ICON);
- iconLabel.setBounds(10, 10, 0, 0);
-
+ iconLabel.setLocation(10, 10);
if (parent != null) {
iconLabel.setImage(parent.getImage());
shell.setImage(parent.getImage());
}
iconLabel.pack();
+ int leftBound = iconLabel.getBounds().width + 20;
// TODO: make clicking on links work
Link textLabel = new Link(shell, SWT.NONE);
@@ -58,7 +59,7 @@ public class AboutDialog extends AbstractModalDialog {
text = text.replaceAll("%WEBSITE", Version.WEBSITE);
text = text.replaceAll("%MAILTO", Version.MAILTO);
textLabel.setText(text);
- textLabel.setBounds(60, 10, 0, 0);
+ textLabel.setLocation(leftBound, 10);
textLabel.addListener(SWT.Selection, new HelpActions.Website());
textLabel.pack();
@@ -67,7 +68,7 @@ public class AboutDialog extends AbstractModalDialog {
positionButtons(button, null);
Text licenseText = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL | SWT.WRAP);
- licenseText.setBounds(60, 140, shell.getClientArea().width - 70, button.getLocation().y - 150);
+ licenseText.setBounds(leftBound, 140, shell.getClientArea().width - leftBound - 10, button.getLocation().y - 150);
licenseText.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
licenseText.setText("Licensed under the GNU General Public License Version 2\n\n" +
Version.NAME + " is free software; you can redistribute it and/or " +
@@ -90,7 +91,15 @@ public class AboutDialog extends AbstractModalDialog {
}
});
- shell.setDefaultButton(button);
+ if (Platform.MAC_OS) {
+ // no button on Mac
+ Point size = shell.getSize();
+ shell.setSize(size.x, size.y - button.getSize().y);
+ button.setVisible(false);
+ }
+ else {
+ button.setFocus();
+ }
}
}
diff --git a/src/net/azib/ipscan/gui/MainWindow.java b/src/net/azib/ipscan/gui/MainWindow.java
index 42b23b9d..6254b6cc 100755
--- a/src/net/azib/ipscan/gui/MainWindow.java
+++ b/src/net/azib/ipscan/gui/MainWindow.java
@@ -144,12 +144,12 @@ public class MainWindow {
// start/stop button
shell.setDefaultButton(startStopButton);
- startStopButton.setLayoutData(new RowData());
+ startStopButton.setLayoutData(new RowData(SWT.DEFAULT, 23));
startStopButton.addSelectionListener(startStopScanningAction);
// feeder selection combobox
this.feederSelectionCombo = feederSelectionCombo;
- feederSelectionCombo.setLayoutData(new RowData());
+ feederSelectionCombo.setLayoutData(new RowData(SWT.DEFAULT, 23));
for (Iterator i = feederRegistry.iterator(); i.hasNext();) {
AbstractFeederGUI feederGUI = (AbstractFeederGUI) i.next();
feederSelectionCombo.add(feederGUI.getFeederName());
diff --git a/src/net/azib/ipscan/gui/actions/StartStopScanningAction.java b/src/net/azib/ipscan/gui/actions/StartStopScanningAction.java
index 3a67edb6..96487a75 100755
--- a/src/net/azib/ipscan/gui/actions/StartStopScanningAction.java
+++ b/src/net/azib/ipscan/gui/actions/StartStopScanningAction.java
@@ -35,7 +35,8 @@ public class StartStopScanningAction implements SelectionListener, ScanningState
private ResultTable resultTable;
private FeederGUIRegistry feederRegistry;
private Button button;
- private Image[] images = new Image[4];
+ private Image[] buttonImages = new Image[4];
+ private String[] buttonTexts = new String[4];
private Display display;
@@ -50,13 +51,20 @@ public class StartStopScanningAction implements SelectionListener, ScanningState
this.display = button.getDisplay();
// pre-load button images
- images[ScanningStateCallback.STATE_IDLE] = new Image(null, Labels.getInstance().getImageAsStream("button.start.img"));
- images[ScanningStateCallback.STATE_SCANNING] = new Image(null, Labels.getInstance().getImageAsStream("button.stop.img"));
- images[ScanningStateCallback.STATE_STOPPING] = new Image(null, Labels.getInstance().getImageAsStream("button.kill.img"));
- images[ScanningStateCallback.STATE_KILLING] = images[ScanningStateCallback.STATE_STOPPING];
+ buttonImages[ScanningStateCallback.STATE_IDLE] = new Image(null, Labels.getInstance().getImageAsStream("button.start.img"));
+ buttonImages[ScanningStateCallback.STATE_SCANNING] = new Image(null, Labels.getInstance().getImageAsStream("button.stop.img"));
+ buttonImages[ScanningStateCallback.STATE_STOPPING] = new Image(null, Labels.getInstance().getImageAsStream("button.kill.img"));
+ buttonImages[ScanningStateCallback.STATE_KILLING] = buttonImages[ScanningStateCallback.STATE_STOPPING];
+
+ // pre-load button texts
+ buttonTexts[ScanningStateCallback.STATE_IDLE] = Labels.getLabel("button.start");
+ buttonTexts[ScanningStateCallback.STATE_SCANNING] = Labels.getLabel("button.stop");
+ buttonTexts[ScanningStateCallback.STATE_STOPPING] = Labels.getLabel("button.kill");
+ buttonTexts[ScanningStateCallback.STATE_KILLING] = Labels.getLabel("button.kill");
// set the defaultimage
- button.setImage(images[state]);
+ button.setImage(buttonImages[state]);
+ button.setText(buttonTexts[state]);
}
public void widgetDefaultSelected(SelectionEvent e) {
@@ -108,7 +116,8 @@ public class StartStopScanningAction implements SelectionListener, ScanningState
break;
}
// change button image
- button.setImage(images[StartStopScanningAction.this.state]);
+ button.setImage(buttonImages[StartStopScanningAction.this.state]);
+ button.setText(buttonTexts[StartStopScanningAction.this.state]);
}
});
}
@@ -129,7 +138,7 @@ public class StartStopScanningAction implements SelectionListener, ScanningState
statusBar.setProgress(percentageComplete);
// change button image
- button.setImage(images[StartStopScanningAction.this.state]);
+ button.setImage(buttonImages[StartStopScanningAction.this.state]);
}
});
}
diff --git a/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java b/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java
index f25fc29d..299d7b3d 100755
--- a/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java
+++ b/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java
@@ -142,6 +142,7 @@ public class RangeFeederGUI extends AbstractFeederGUI {
hostnameLabel.setLayoutData(formData);
ipUpButton.setImage(new Image(getDisplay(), Labels.getInstance().getImageAsStream("button.ipUp.img")));
+ ipUpButton.setText(Labels.getLabel("button.ipUp"));
ipUpButton.addSelectionListener(hostnameListener);
formData = new FormData();
formData.top = new FormAttachment(endIPText);