diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-22 18:58:28 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-22 18:58:28 +0000 |
commit | 83b9bf0e3bfb1d842b10b80bbe749095b2c661a1 (patch) | |
tree | b05b1793361693ae88106648c2a953bed988f423 /krusader/mount.js | |
download | krusader-83b9bf0e3bfb1d842b10b80bbe749095b2c661a1.tar.gz krusader-83b9bf0e3bfb1d842b10b80bbe749095b2c661a1.zip |
Added old KDE3 version of Krusader
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/krusader@1094427 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krusader/mount.js')
-rw-r--r-- | krusader/mount.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/krusader/mount.js b/krusader/mount.js new file mode 100644 index 0000000..3aadcc8 --- /dev/null +++ b/krusader/mount.js @@ -0,0 +1,37 @@ +/* + This is an extension for the Krusader filemanager + http://krusader.sf.net/ + + Author: Jonas Bähr, http://www.jonas-baehr.de/ + + This script shows a dialog for mounting a device. The commandline which is + returned by this is executed by Krusader's UserAction-system + Krusader looks for the variable 'cmd'. + + scriptDir is a string-variable set by Krusader with the directory of the currently + executed script. This is usefull for relative path's inside scripts. +*/ + +var ui = Factory.loadui( scriptDir + 'mount.ui' ); + +ui.child('device').setFocus(); + +var m = ui.exec(); + +var cmd = "@CANCEL@"; //FIXME: replace this with UserAction.cancel + +if (m) { + var cmd = "mount"; + var device = ui.child('device').url; + var mountpoint = ui.child('mountpoint').url; + var filesystem = ui.child('filesystem').currentText; + var options = ui.child('options').text; + + if ( filesystem != '<auto>' && filesystem != '' ) + cmd += " -t " + filesystem; + if ( options != '' ) + cmd += " " + options; + + cmd += " " + device + " " + mountpoint; +} + |