File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ Use it if JCx ports are configured to work as PWM signal generators.
196196 <playMp3File command =" cvlc --quiet " %1" & " />
197197
198198 <!-- Device files and on/off values for LED on a brick. -->
199- <led green =" /sys/class/leds/led_green/brightness" red =" /sys/class/leds/led_red/brightness" on =" 0 " off =" 1 " />
199+ <led green =" /sys/class/leds/led_green/brightness" red =" /sys/class/leds/led_red/brightness" on =" 1 " off =" 0 " />
200200
201201 <!-- Device file for keys on a brick -->
202202 <keys deviceFile =" /dev/input/event0" />
Original file line number Diff line number Diff line change @@ -96,9 +96,21 @@ void FileManagerWidget::keyPressEvent(QKeyEvent *event)
9696 }
9797}
9898
99+ QString FileManagerWidget::showCurrentPath ()
100+ {
101+ QString result = QDir::currentPath ();
102+ result.remove (mRootDirPath );
103+
104+ if (result.isEmpty ()) {
105+ result = " /" ;
106+ }
107+
108+ return result;
109+ }
110+
99111void FileManagerWidget::showCurrentDir ()
100112{
101- mCurrentPathLabel .setText (QDir::currentPath ());
113+ mCurrentPathLabel .setText (showCurrentPath ());
102114
103115 QDir::Filters filters = mFileSystemModel .filter ();
104116 if (QDir::currentPath () == mRootDirPath ) {
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ private slots:
6262private:
6363 void showCurrentDir ();
6464 void open ();
65+ QString showCurrentPath ();
6566
6667 QVBoxLayout mLayout ;
6768 QLabel mCurrentPathLabel ;
You can’t perform that action at this time.
0 commit comments