summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog3
-rw-r--r--muse2/config.h.in1
-rw-r--r--muse2/muse/conf.cpp46
-rw-r--r--muse2/muse/gconfig.cpp2
-rw-r--r--muse2/muse/gconfig.h1
-rw-r--r--muse2/muse/help.cpp38
-rw-r--r--muse2/muse/widgets/genset.cpp3
-rw-r--r--muse2/muse/widgets/gensetbase.ui316
8 files changed, 147 insertions, 263 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 47ac662c..8ffcb618 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,5 +1,8 @@
20.12.2010:
- Fixed arranger grid h-line drawing, track, and part drawing alignment, border issues. (Tim)
+ - To open help pages, use the default browser of the system via QDeskopServices. Removed
+ the configuration option to select the browser. (Orcan)
+ - Added some groupboxes and layouts to Global Settings to make it look more uniform. (Orcan)
19.12.2010:
- Fixed not saving part colours and part canvas background appearance settings. (Tim)
*Feature: Added 'global opaqueness' (transparency) appearance setting. (Tim)
diff --git a/muse2/config.h.in b/muse2/config.h.in
index 2fa3148c..f7b511ad 100644
--- a/muse2/config.h.in
+++ b/muse2/config.h.in
@@ -27,5 +27,6 @@
#define VERSION "${MusE_VERSION_FULL}"
#define SVNVERSION "${MusE_SVNVER}"
#define PACKAGE_NAME "MusE"
+#define DOCDIR "${MusE_DOC_DIR}"
#define SHAREDIR "${MusE_SHARE_DIR}"
#define LIBDIR "${MusE_LIB_DIR}"
diff --git a/muse2/muse/conf.cpp b/muse2/muse/conf.cpp
index 3f7c33e7..3ea829b0 100644
--- a/muse2/muse/conf.cpp
+++ b/muse2/muse/conf.cpp
@@ -836,12 +836,6 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
config.dummyAudioBufSize = xml.parseInt();
else if (tag == "guiRefresh")
config.guiRefresh = xml.parseInt();
- else if (tag == "helpBrowser")
- {
- QString tmp = xml.parse1();
- if (tmp.isNull()) {tmp = "";}
- config.helpBrowser = tmp;
- }
else if (tag == "midiTransform")
readMidiTransform(xml);
else if (tag == "midiInputTransform")
@@ -878,41 +872,6 @@ void readConfiguration(Xml& xml, bool readOnlySequencer)
}
//---------------------------------------------------------
-// probeMachineSpecificConfiguration
-//---------------------------------------------------------
-
-static void probeMachineSpecificConfiguration()
- {
- // set a default help browser (crude way to find out)
- if (!system("which konqueror > /dev/null"))
- {
- config.helpBrowser = QString("konqueror");
- }
- else if (!system("which opera > /dev/null"))
- {
- config.helpBrowser = QString("opera");
- }
- else if (!system("which mozilla-firefox > /dev/null"))
- {
- config.helpBrowser = QString("mozilla-firefox");
- }
- else if (!system("which firefox > /dev/null"))
- {
- config.helpBrowser = QString("firefox");
- }
- else if (!system("which mozilla > /dev/null"))
- {
- config.helpBrowser = QString("mozilla");
- }
- else
- {
- config.helpBrowser = QString("");
- // was not able to find a browser
- }
- // More preconfiguration
- }
-
-//---------------------------------------------------------
// readConfiguration
//---------------------------------------------------------
@@ -923,8 +882,6 @@ bool readConfiguration()
if (debugMsg || debugMode)
fprintf(stderr, "NO Config File <%s> found\n", configName.toLatin1().constData());
- // if the config file does not exist launch probeMachineSpecificConfiguration
- probeMachineSpecificConfiguration();
return true;
}
Xml xml(f);
@@ -1120,7 +1077,8 @@ void MusE::writeGlobalConfiguration(int level, Xml& xml) const
xml.intTag(level, "dummyAudioSampleRate", config.dummyAudioSampleRate);
xml.intTag(level, "guiRefresh", config.guiRefresh);
- xml.strTag(level, "helpBrowser", config.helpBrowser);
+ // Removed by Orcan. 20101220
+ //xml.strTag(level, "helpBrowser", config.helpBrowser);
xml.intTag(level, "extendedMidi", config.extendedMidi);
xml.intTag(level, "midiExportDivision", config.midiDivision);
xml.intTag(level, "guiDivision", config.guiDivision);
diff --git a/muse2/muse/gconfig.cpp b/muse2/muse/gconfig.cpp
index ec44ec3f..f4db3604 100644
--- a/muse2/muse/gconfig.cpp
+++ b/muse2/muse/gconfig.cpp
@@ -82,7 +82,7 @@ GlobalConfigValues config = {
-60.0, // double minSlider;
false, // use Jack freewheel
20, // int guiRefresh;
- QString(""), // helpBrowser
+ //QString(""), // helpBrowser; // Obsolete
true, // extendedMidi
384, // division for smf export
QString(""), // copyright string for smf export
diff --git a/muse2/muse/gconfig.h b/muse2/muse/gconfig.h
index 79c66d99..50d13d21 100644
--- a/muse2/muse/gconfig.h
+++ b/muse2/muse/gconfig.h
@@ -78,7 +78,6 @@ struct GlobalConfigValues {
double minSlider;
bool freewheelMode;
int guiRefresh;
- QString helpBrowser;
bool extendedMidi; // extended smf format
int midiDivision; // division for smf export
diff --git a/muse2/muse/help.cpp b/muse2/muse/help.cpp
index 268449e6..30803838 100644
--- a/muse2/muse/help.cpp
+++ b/muse2/muse/help.cpp
@@ -9,8 +9,9 @@
#include <unistd.h>
#include <stdlib.h>
+#include <QDesktopServices>
#include <QMessageBox>
-#include <QProcess>
+#include <QUrl>
#include "app.h"
#include "globals.h"
@@ -25,9 +26,9 @@
void MusE::startHelpBrowser()
{
QString lang(getenv("LANG"));
- QString museHelp = museGlobalShare + QString("/html/index_") + lang + QString(".html");
+ QString museHelp = DOCDIR + QString("/html/index_") + lang + QString(".html");
if (access(museHelp.toLatin1(), R_OK) != 0) {
- museHelp = museGlobalShare + QString("/html/index.html");
+ museHelp = DOCDIR + QString("/html/index.html");
if (access(museHelp.toLatin1(), R_OK) != 0) {
QString info(tr("no help found at: "));
info += museHelp;
@@ -82,33 +83,12 @@ void MusE::aboutQt()
void MusE::launchBrowser(QString &whereTo)
{
- char testStr[40];
- strcpy(testStr, "which ");
- strcat(testStr, config.helpBrowser.toLatin1());
- if (config.helpBrowser == "" || system(testStr))
- {
- QMessageBox::information( this, "Unable to launch help",
- "For some reason MusE has failed to detect or launch\n"
- "a browser on your machine. Please go to Settings->Global Settings->GUI\n"
- "and insert the program name of your favourite browser.",
- "Ok",
- 0 );
- return;
- }
-
- QString exe = QString("/bin/sh");
- if(QFile::exists(exe))
- {
- // Orcan: Shall we use this instead? Opens the default browser of the user:
- // QDesktopServices::openUrl(QUrl(whereTo));
- QStringList arguments;
- arguments << "-c" << config.helpBrowser << whereTo;
- QProcess helper;
- helper.start(exe, arguments);
- }
- else
+ if (! QDesktopServices::openUrl(QUrl(whereTo)))
{
+ QMessageBox::information(this, tr("Unable to launch help"),
+ tr("For some reason MusE has to launch the default\n"
+ "browser on your machine."),
+ QMessageBox::Ok, QMessageBox::Ok);
printf("Unable to launch help\n");
}
-
}
diff --git a/muse2/muse/widgets/genset.cpp b/muse2/muse/widgets/genset.cpp
index a05020d6..24e58855 100644
--- a/muse2/muse/widgets/genset.cpp
+++ b/muse2/muse/widgets/genset.cpp
@@ -78,7 +78,6 @@ GlobalSettingsConfig::GlobalSettingsConfig(QWidget* parent)
//dummyAudioRealRate->setText(dad ? QString().setNum(sampleRate) : "---");
dummyAudioRealRate->setText(QString().setNum(sampleRate));
- helpBrowser->setText(config.helpBrowser);
startSongEntry->setText(config.startSong);
startSongGroup->button(config.startMode)->setChecked(true);
@@ -183,7 +182,6 @@ void GlobalSettingsConfig::updateSettings()
//dummyAudioRealRate->setText(dad ? QString().setNum(sampleRate) : "---");
dummyAudioRealRate->setText(QString().setNum(sampleRate));
- helpBrowser->setText(config.helpBrowser);
startSongEntry->setText(config.startSong);
startSongGroup->button(config.startMode)->setChecked(true);
@@ -258,7 +256,6 @@ void GlobalSettingsConfig::apply()
config.useOutputLimiter = outputLimiterCheckBox->isChecked();
config.vstInPlace = vstInPlaceCheckBox->isChecked();
config.rtcTicks = rtcResolutions[rtcticks];
- config.helpBrowser = helpBrowser->text();
config.startSong = startSongEntry->text();
config.startMode = startSongGroup->checkedId();
int das = dummyAudioSize->currentIndex();
diff --git a/muse2/muse/widgets/gensetbase.ui b/muse2/muse/widgets/gensetbase.ui
index 9d63cbe5..6e5bfec8 100644
--- a/muse2/muse/widgets/gensetbase.ui
+++ b/muse2/muse/widgets/gensetbase.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>494</width>
+ <width>522</width>
<height>518</height>
</rect>
</property>
@@ -28,6 +28,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="currentIndex">
+ <number>3</number>
+ </property>
<widget class="QWidget" name="TabPage">
<attribute name="title">
<string>Application</string>
@@ -424,43 +427,6 @@
<layout class="QGridLayout">
<item row="0" column="0">
<layout class="QGridLayout">
- <item row="0" column="1">
- <layout class="QVBoxLayout">
- <property name="margin">
- <number>9</number>
- </property>
- <item>
- <widget class="QCheckBox" name="showSplash">
- <property name="text">
- <string>show splash screen</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="showDidYouKnow">
- <property name="text">
- <string>show &quot;Did you know?&quot; dialog</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="spacer4">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
<item row="1" column="0">
<spacer name="spacer7_2">
<property name="orientation">
@@ -536,6 +502,42 @@
</layout>
</widget>
</item>
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="startUpBox">
+ <property name="title">
+ <string>On Launch</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QCheckBox" name="showSplash">
+ <property name="text">
+ <string>show splash screen</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="showDidYouKnow">
+ <property name="text">
+ <string>show &quot;Did you know?&quot; dialog</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
</layout>
@@ -1092,156 +1094,100 @@ Shorter periods are desirable.</string>
<attribute name="title">
<string>GUI</string>
</attribute>
- <layout class="QGridLayout">
- <item row="1" column="0">
- <widget class="QLabel" name="textLabel1">
- <property name="text">
- <string>Help Browser:</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="0" colspan="3">
- <widget class="QLabel" name="TextLabel1">
- <property name="text">
- <string>GUI Refresh Rate</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="3" colspan="2">
- <widget class="QSpinBox" name="guiRefreshSelect">
- <property name="suffix">
- <string>/sec</string>
- </property>
- <property name="minimum">
- <number>2</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="value">
- <number>20</number>
- </property>
- </widget>
- </item>
- <item row="1" column="1" colspan="4">
- <widget class="QLineEdit" name="helpBrowser"/>
- </item>
- <item row="4" column="0">
- <spacer name="spacer2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>240</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="4" column="4">
- <spacer name="spacer3">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>240</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="5">
- <widget class="QCheckBox" name="oldStyleStopCheckBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="5">
- <widget class="QCheckBox" name="moveArmedCheckBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="2" colspan="3">
- <spacer name="spacer7">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>270</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="0" colspan="2">
- <widget class="QLabel" name="textLabel1_4">
- <property name="text">
- <string>Use old-style stop shortcut:</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="3" column="0" colspan="3">
- <widget class="QLabel" name="textLabel1_4_2">
- <property name="text">
- <string>Move single armed track with selection</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Behavior</string>
</property>
+ <layout class="QGridLayout" name="gridLayout_2" columnminimumwidth="280,0,0">
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TextLabel1">
+ <property name="text">
+ <string>GUI Refresh Rate</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="2">
+ <widget class="QSpinBox" name="guiRefreshSelect">
+ <property name="suffix">
+ <string>/sec</string>
+ </property>
+ <property name="minimum">
+ <number>2</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>20</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="textLabel1_4">
+ <property name="text">
+ <string>Use old-style stop shortcut:</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="textLabel1_4_2">
+ <property name="text">
+ <string>Move single armed track with selection</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QCheckBox" name="moveArmedCheckBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="oldStyleStopCheckBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
- <item row="3" column="3" colspan="2">
- <spacer name="spacer7_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>210</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
</widget>