Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use $HOME rather than /home/pi #6

Merged
merged 1 commit into from
Sep 24, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void MainWindow::onExitCleanup()

void MainWindow::loadWorkspaces()
{
loadFile("/home/pi/.sonic-pi/workspaces/" + groupName + "/one/1.spi", workspace1);
loadFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/one/1.spi", workspace1);
loadFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/two/1.spi", workspace2);
loadFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/three/1.spi", workspace3);
loadFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/four/1.spi", workspace4);
Expand All @@ -228,7 +228,7 @@ void MainWindow::loadWorkspaces()

void MainWindow::saveWorkspaces()
{
saveFile("/home/pi/.sonic-pi/workspaces/" + groupName + "/one/1.spi", workspace1);
saveFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/one/1.spi", workspace1);
saveFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/two/1.spi", workspace2);
saveFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/three/1.spi", workspace3);
saveFile(QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/four/1.spi", workspace4);
Expand Down Expand Up @@ -261,7 +261,7 @@ QString MainWindow::currentTabLabel()

bool MainWindow::saveAs()
{
QString fileName = QFileDialog::getSaveFileName(this, tr("Save Current Workspace"), "/home/pi/Desktop");
QString fileName = QFileDialog::getSaveFileName(this, tr("Save Current Workspace"), QDir::homePath() + "/Desktop");
saveFile(fileName, (QsciScintilla*)tabs->currentWidget());
}

Expand Down Expand Up @@ -583,7 +583,7 @@ QString MainWindow::workspaceFilename(QsciScintilla* text)
else if(text == workspace6) {return QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/six/1.spi";}
else if(text == workspace7) {return QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/seven/1.spi";}
else if(text == workspace8) {return QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/eight/1.spi";}
else {return "/home/pi/.sonic-pi/workspaces/" + groupName + "/one/1.spi";}
else {return QDir::homePath() + "/.sonic-pi/workspaces/" + groupName + "/one/1.spi";}
}

bool MainWindow::saveWorkspace(QsciScintilla* text)
Expand Down
12 changes: 6 additions & 6 deletions app/gui/qrc_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <QtCore/qglobal.h>

static const unsigned char qt_resource_data[] = {
// /home/pi/sonic-pi/app/gui/images/new.png
// $HOME/sonic-pi/app/gui/images/new.png
0x0,0x0,0xa,0xff,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
Expand Down Expand Up @@ -189,7 +189,7 @@ static const unsigned char qt_resource_data[] = {
0xd4,0xdf,0x20,0xc2,0x6b,0x81,0x64,0x3a,0xef,0x1a,0xfd,0x5e,0x20,0x76,0xf7,0x6b,
0x25,0x63,0xd7,0xaf,0xbe,0x9f,0xb3,0xe8,0xff,0x0,0xe6,0x42,0xfd,0x6b,0xad,0xee,
0x5b,0x6e,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/sonic-pi/app/gui/images/copy.png
// $HOME/sonic-pi/app/gui/images/copy.png
0x0,0x0,0x5,0x3b,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
Expand Down Expand Up @@ -276,7 +276,7 @@ static const unsigned char qt_resource_data[] = {
0xc,0x44,0x6a,0x6b,0x6b,0x9d,0xb9,0xb9,0xb9,0xb2,0x9a,0xee,0xea,0x97,0x11,0x93,
0xb0,0x5f,0xa6,0xdb,0xf5,0x37,0x43,0x39,0x56,0x18,0x68,0x8b,0xcd,0x60,0x0,0x0,
0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/sonic-pi/app/gui/images/cut.png
// $HOME/sonic-pi/app/gui/images/cut.png
0x0,0x0,0x5,0x2b,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
Expand Down Expand Up @@ -362,7 +362,7 @@ static const unsigned char qt_resource_data[] = {
0x91,0x38,0x9,0x39,0xf9,0xa9,0x96,0x21,0xfa,0x5c,0x1a,0xd,0xcf,0xb3,0xff,0xff,
0x37,0xfc,0x4f,0x13,0xf8,0x1d,0xe7,0x87,0x19,0xb9,0x44,0xc3,0x1,0xcf,0x0,0x0,
0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/sonic-pi/app/gui/images/save.png
// $HOME/sonic-pi/app/gui/images/save.png
0x0,0x0,0xc,0x27,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
Expand Down Expand Up @@ -560,7 +560,7 @@ static const unsigned char qt_resource_data[] = {
0x37,0xe,0x1a,0xd,0xca,0x19,0x48,0xde,0xb6,0x2e,0x3,0x79,0x77,0xff,0x1f,0x16,
0xff,0x7,0xb,0x75,0xc1,0xeb,0x70,0x30,0x8b,0xa5,0x0,0x0,0x0,0x0,0x49,0x45,
0x4e,0x44,0xae,0x42,0x60,0x82,
// /home/pi/sonic-pi/app/gui/images/paste.png
// $HOME/sonic-pi/app/gui/images/paste.png
0x0,0x0,0x6,0xd1,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
Expand Down Expand Up @@ -673,7 +673,7 @@ static const unsigned char qt_resource_data[] = {
0x64,0x9,0xc9,0x91,0x64,0x70,0x9a,0x99,0x78,0xb9,0xf6,0x3f,0xd3,0x41,0x2e,0xed,
0x55,0x74,0x72,0x95,0x0,0x0,0x0,0x0,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,

// /home/pi/sonic-pi/app/gui/images/open.png
// $HOME/pi/sonic-pi/app/gui/images/open.png
0x0,0x0,0x4,0xa3,
0x89,
0x50,0x4e,0x47,0xd,0xa,0x1a,0xa,0x0,0x0,0x0,0xd,0x49,0x48,0x44,0x52,0x0,
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/start-sc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ sleep 2
jack_connect SuperCollider:out_1 system:playback_1
jack_connect SuperCollider:out_2 system:playback_2

touch /home/pi/sonic-pi/tmp/running
touch ${HOME}/sonic-pi/tmp/running
2 changes: 1 addition & 1 deletion start-group-aphex
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

mkdir -p /tmp/sonic-pi
echo 'Aphex' > /tmp/sonic-pi/group-name
/home/pi/sonic-pi/app/gui/application
${HOME}/sonic-pi/app/gui/application
2 changes: 1 addition & 1 deletion start-group-kraft
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

mkdir -p /tmp/sonic-pi
echo 'Kraft' > /tmp/sonic-pi/group-name
/home/pi/sonic-pi/app/gui/application
${HOME}/sonic-pi/app/gui/application