mirror of https://github.com/xfarrow/guify.git
Function renaming
This commit is contained in:
parent
4325c59a40
commit
8dcde7c309
|
@ -166,7 +166,7 @@ public class DesktopController {
|
|||
// The parameter is the remote path in which the file(s) are uploaded
|
||||
// into
|
||||
Consumer<String> uploadCompletedEvent = s -> this
|
||||
.uploadCompletedEvent(s);
|
||||
.operationCompletedEvent(s);
|
||||
|
||||
for (File file : selectedFiles) {
|
||||
SshEngine.uploadFile(file, this.getCurrentWorkingDirectory(),
|
||||
|
@ -460,9 +460,10 @@ public class DesktopController {
|
|||
}
|
||||
|
||||
/**
|
||||
* Event that gets fired once
|
||||
* Event that gets fired once an operation on the file
|
||||
* system has been completed (such as an upload)
|
||||
*/
|
||||
public void uploadCompletedEvent(String path) {
|
||||
public void operationCompletedEvent(String path) {
|
||||
|
||||
if (!path.equals(getCurrentWorkingDirectory())) {
|
||||
// Redraw the desktop only if necessary
|
||||
|
@ -477,7 +478,7 @@ public class DesktopController {
|
|||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
uploadCompletedEvent(path);
|
||||
operationCompletedEvent(path);
|
||||
}
|
||||
});
|
||||
return;
|
||||
|
|
|
@ -198,7 +198,7 @@ public class Desktop extends JFrame implements IDesktopFrame {
|
|||
controller.setCurrentWorkingDirectory(directory);
|
||||
|
||||
try {
|
||||
// Load the desktop content
|
||||
// Load the desktop's content
|
||||
loadDesktop();
|
||||
} catch (Exception ex) {
|
||||
// Handle lack of permissions or other errors
|
||||
|
@ -267,9 +267,7 @@ public class Desktop extends JFrame implements IDesktopFrame {
|
|||
element.add(iconLabel);
|
||||
element.setBackground(new Color(255, 255, 255));
|
||||
element.setToolTipText(node.getFilename());
|
||||
int buttonWidth = 75;
|
||||
int buttonHeight = element.getPreferredSize().height;
|
||||
Dimension buttonSize = new Dimension(buttonWidth, buttonHeight);
|
||||
Dimension buttonSize = new Dimension(75, element.getPreferredSize().height);
|
||||
element.setPreferredSize(buttonSize);
|
||||
element.setMaximumSize(buttonSize);
|
||||
element.setMinimumSize(buttonSize);
|
||||
|
|
Loading…
Reference in New Issue