mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Honor GC_WANT_R in options/preferences
.. don't need to configure R_HOME if R support isn't baked in.
This commit is contained in:
@@ -208,6 +208,7 @@ GeneralPage::GeneralPage(Context *context) : context(context)
|
||||
connect(workoutBrowseButton, SIGNAL(clicked()), this, SLOT(browseWorkoutDir()));
|
||||
offset++;
|
||||
|
||||
#ifdef GC_WANT_R
|
||||
//
|
||||
// R Home directory
|
||||
//
|
||||
@@ -226,6 +227,7 @@ GeneralPage::GeneralPage(Context *context) : context(context)
|
||||
offset++;
|
||||
|
||||
connect(rBrowseButton, SIGNAL(clicked()), this, SLOT(browseRDir()));
|
||||
#endif
|
||||
|
||||
// save away initial values
|
||||
b4.unit = unitCombo->currentIndex();
|
||||
@@ -257,7 +259,9 @@ GeneralPage::saveClicked()
|
||||
// Directories
|
||||
appsettings->setValue(GC_WORKOUTDIR, workoutDirectory->text());
|
||||
appsettings->setValue(GC_HOMEDIR, athleteDirectory->text());
|
||||
#ifdef GC_WANT_R
|
||||
appsettings->setValue(GC_R_HOME, rDirectory->text());
|
||||
#endif
|
||||
|
||||
// Elevation
|
||||
appsettings->setValue(GC_ELEVATION_HYSTERESIS, hystedit->text());
|
||||
@@ -297,6 +301,7 @@ GeneralPage::saveClicked()
|
||||
return state;
|
||||
}
|
||||
|
||||
#ifdef GC_WANT_R
|
||||
void
|
||||
GeneralPage::browseRDir()
|
||||
{
|
||||
@@ -306,6 +311,7 @@ GeneralPage::browseRDir()
|
||||
currentDir, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
if (dir != "") rDirectory->setText(dir); //only overwrite current dir, if a new was selected
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
GeneralPage::browseWorkoutDir()
|
||||
|
||||
@@ -85,7 +85,9 @@ class GeneralPage : public QWidget
|
||||
public slots:
|
||||
void browseWorkoutDir();
|
||||
void browseAthleteDir();
|
||||
#ifdef GC_WANT_R
|
||||
void browseRDir();
|
||||
#endif
|
||||
|
||||
private:
|
||||
Context *context;
|
||||
@@ -101,15 +103,18 @@ class GeneralPage : public QWidget
|
||||
QLineEdit *hystedit;
|
||||
QLineEdit *athleteDirectory;
|
||||
QLineEdit *workoutDirectory;
|
||||
QLineEdit *rDirectory;
|
||||
QPushButton *workoutBrowseButton;
|
||||
QPushButton *athleteBrowseButton;
|
||||
|
||||
#ifdef GC_WANT_R
|
||||
QPushButton *rBrowseButton;
|
||||
QLineEdit *rDirectory;
|
||||
QLabel *rLabel;
|
||||
#endif
|
||||
|
||||
QLabel *langLabel;
|
||||
QLabel *warningLabel;
|
||||
QLabel *workoutLabel;
|
||||
QLabel *rLabel;
|
||||
QLabel *athleteLabel;
|
||||
|
||||
struct {
|
||||
|
||||
@@ -85,7 +85,7 @@ BT40Controller::find()
|
||||
}
|
||||
|
||||
bool
|
||||
BT40Controller::discover(QString name)
|
||||
BT40Controller::discover(QString)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user