mirror of https://github.com/xfarrow/guify.git
Comments
This commit is contained in:
parent
0ea57a374a
commit
36f42f62d0
|
@ -420,11 +420,14 @@ public class DesktopController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Checks if the specified path is readable by the current user
|
||||||
|
* @return true if readable, false otherwise
|
||||||
* @deprecated This method is deprecated. Catch SftpException and look for
|
* @deprecated This method is deprecated. Catch SftpException and look for
|
||||||
* "Permission denied" instead. This prevents unnecessary
|
* "Permission denied" instead. This prevents unnecessary
|
||||||
* overhead
|
* overhead
|
||||||
*/
|
*/
|
||||||
public boolean isReadable(String path) {
|
public boolean isReadable(String path) {
|
||||||
|
// Create the construct [ -r "/path" ] && echo 1 || echo 0
|
||||||
StringBuilder command = new StringBuilder();
|
StringBuilder command = new StringBuilder();
|
||||||
command.append("[ -r \"");
|
command.append("[ -r \"");
|
||||||
command.append(path.equals("~")
|
command.append(path.equals("~")
|
||||||
|
@ -435,10 +438,13 @@ public class DesktopController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Checks if the specified path is writable by the current user
|
||||||
|
* @return true if writable, false otherwise
|
||||||
* @deprecated This method is deprecated. Catch SftpException and look for
|
* @deprecated This method is deprecated. Catch SftpException and look for
|
||||||
* "Permission denied" instead
|
* "Permission denied" instead
|
||||||
*/
|
*/
|
||||||
public boolean isWriteable(String path) {
|
public boolean isWriteable(String path) {
|
||||||
|
// Create the construct [ -w "/path" ] && echo 1 || echo 0
|
||||||
StringBuilder command = new StringBuilder();
|
StringBuilder command = new StringBuilder();
|
||||||
command.append("[ -w \"");
|
command.append("[ -w \"");
|
||||||
command.append(path.equals("~")
|
command.append(path.equals("~")
|
||||||
|
|
|
@ -674,9 +674,7 @@ public class Desktop extends JFrame implements IDesktopFrame {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
drawComponentsForDirectory(
|
drawComponentsForDirectory(
|
||||||
controller.getCurrentWorkingDirectory()); // TODO
|
controller.getCurrentWorkingDirectory());
|
||||||
// optimize
|
|
||||||
// this
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hover on
|
// Hover on
|
||||||
|
@ -791,12 +789,7 @@ public class Desktop extends JFrame implements IDesktopFrame {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
drawComponentsForDirectory(
|
drawComponentsForDirectory(
|
||||||
controller.getCurrentWorkingDirectory()); // TODO:
|
controller.getCurrentWorkingDirectory());
|
||||||
// avoid
|
|
||||||
// a
|
|
||||||
// complete
|
|
||||||
// desktop
|
|
||||||
// reload
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -822,7 +815,7 @@ public class Desktop extends JFrame implements IDesktopFrame {
|
||||||
|
|
||||||
deleteBtn = new JButton();
|
deleteBtn = new JButton();
|
||||||
deleteBtn.setBorderPainted(false);
|
deleteBtn.setBorderPainted(false);
|
||||||
deleteBtn.setBorder(new EmptyBorder(0, 0, 0, 0)); // Set empty border);
|
deleteBtn.setBorder(new EmptyBorder(0, 0, 0, 0)); // Set empty border;
|
||||||
deleteBtn.setToolTipText("Delete");
|
deleteBtn.setToolTipText("Delete");
|
||||||
try {
|
try {
|
||||||
deleteBtn.setIcon(new ImageIcon(ImageIO
|
deleteBtn.setIcon(new ImageIcon(ImageIO
|
||||||
|
@ -973,7 +966,7 @@ public class Desktop extends JFrame implements IDesktopFrame {
|
||||||
|
|
||||||
JButton queueBtn = new JButton();
|
JButton queueBtn = new JButton();
|
||||||
queueBtn.setBorderPainted(false);
|
queueBtn.setBorderPainted(false);
|
||||||
queueBtn.setBorder(new EmptyBorder(0, 0, 0, 0)); // Set empty border);
|
queueBtn.setBorder(new EmptyBorder(0, 0, 0, 0)); // Set empty border;
|
||||||
queueBtn.setToolTipText("Queue");
|
queueBtn.setToolTipText("Queue");
|
||||||
try {
|
try {
|
||||||
queueBtn.setIcon(new ImageIcon(ImageIO
|
queueBtn.setIcon(new ImageIcon(ImageIO
|
||||||
|
@ -1032,7 +1025,7 @@ public class Desktop extends JFrame implements IDesktopFrame {
|
||||||
|
|
||||||
JButton goToBtn = new JButton();
|
JButton goToBtn = new JButton();
|
||||||
goToBtn.setBorderPainted(false);
|
goToBtn.setBorderPainted(false);
|
||||||
goToBtn.setBorder(new EmptyBorder(0, 0, 0, 0)); // Set empty border);
|
goToBtn.setBorder(new EmptyBorder(0, 0, 0, 0)); // Set empty border
|
||||||
goToBtn.setToolTipText("Go");
|
goToBtn.setToolTipText("Go");
|
||||||
try {
|
try {
|
||||||
goToBtn.setIcon(new ImageIcon(ImageIO
|
goToBtn.setIcon(new ImageIcon(ImageIO
|
||||||
|
|
Loading…
Reference in New Issue