diff options
author | Florian Jung <flo@windfisch.org> | 2011-09-14 17:00:09 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-09-14 17:00:09 +0000 |
commit | 187665d84e56b63f569731550c652a89cb650309 (patch) | |
tree | e6e346fe682e153c5542d1654ba62b35b9e1dd23 /muse2/muse | |
parent | a5555e41a4ba5ef5c2d38af29ed8a1d22831998f (diff) |
- provided sane configuration defaults
- updated templates
- windows->tile/arrange in rows/columns doesn't maximize a window if it's
the only one
- removed "bool initalizing stuff"
- small fixes for focusing and toolbar-sharing
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/app.cpp | 17 | ||||
-rw-r--r-- | muse2/muse/arranger/arrangerview.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/cliplist/cliplist.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/cobject.cpp | 10 | ||||
-rw-r--r-- | muse2/muse/liste/listedit.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/main.cpp | 23 | ||||
-rw-r--r-- | muse2/muse/marker/markerview.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/master/lmaster.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/master/masteredit.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/midiedit/drumedit.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/midiedit/pianoroll.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/midiedit/scoreedit.cpp | 8 | ||||
-rw-r--r-- | muse2/muse/waveedit/waveedit.cpp | 1 |
13 files changed, 37 insertions, 34 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index de35e5bc..773e550f 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -1329,7 +1329,10 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool loadAll } if (maximizeArranger) + { arrangerView->showMaximized(); + bringToFront(arrangerView); + } } } @@ -3282,6 +3285,8 @@ void MusE::bringToFront(QWidget* widget) win->activateWindow(); win->raise(); } + + activeTopWinChangedSlot(win); } void MusE::setFullscreen(bool val) @@ -3321,8 +3326,8 @@ void MusE::arrangeSubWindowsColumns() if (n==0) return; - else if (n==1) - (*wins.begin())->showMaximized(); + //else if (n==1) + // (*wins.begin())->showMaximized(); // commented out by flo. i like it better that way. else { int width = mdiArea->width(); @@ -3356,8 +3361,8 @@ void MusE::arrangeSubWindowsRows() if (n==0) return; - else if (n==1) - (*wins.begin())->showMaximized(); + //else if (n==1) + // (*wins.begin())->showMaximized(); // commented out by flo. i like it better that way. else { int width = mdiArea->width(); @@ -3391,8 +3396,8 @@ void MusE::tileSubWindows() if (n==0) return; - else if (n==1) - (*wins.begin())->showMaximized(); + //else if (n==1) + // (*wins.begin())->showMaximized(); // commented out by flo. i like it better that way. else { int nx,ny; diff --git a/muse2/muse/arranger/arrangerview.cpp b/muse2/muse/arranger/arrangerview.cpp index 0a57ce8b..0cc75db9 100644 --- a/muse2/muse/arranger/arrangerview.cpp +++ b/muse2/muse/arranger/arrangerview.cpp @@ -358,8 +358,6 @@ ArrangerView::ArrangerView(QWidget* parent) // bug: 2811156 Softsynth GUI unclosable with XFCE4 (and a few others) show(); hide(); - - initalizing=false; } ArrangerView::~ArrangerView() diff --git a/muse2/muse/cliplist/cliplist.cpp b/muse2/muse/cliplist/cliplist.cpp index 22bee1ff..95f58f80 100644 --- a/muse2/muse/cliplist/cliplist.cpp +++ b/muse2/muse/cliplist/cliplist.cpp @@ -166,8 +166,6 @@ ClipListEdit::ClipListEdit(QWidget* parent) connect(editor->len, SIGNAL(valueChanged(const Pos&)), SLOT(lenChanged(const Pos&))); updateList(); - - initalizing=false; } ClipListEdit::~ClipListEdit() diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp index a4fbd6c7..eff6d9af 100644 --- a/muse2/muse/cobject.cpp +++ b/muse2/muse/cobject.cpp @@ -51,12 +51,8 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag if (initInited==false) initConfiguration(); - initalizing=true; - _type=t; - - setObjectName(QString(name)); // Allow multiple rows. Tim. //setDockNestingEnabled(true); @@ -350,12 +346,6 @@ void TopWin::shareToolsAndMenu(bool val) void TopWin::storeInitialState() const { - if (initalizing) - { - printf("THIS SHOULD NEVER HAPPEN: STORE INIT STATE CALLED WHILE INITING! please IMMEDIATELY report that to flo!\n"); - exit(1); - } - _widthInit[_type] = width(); _heightInit[_type] = height(); if (sharesToolsAndMenu()) diff --git a/muse2/muse/liste/listedit.cpp b/muse2/muse/liste/listedit.cpp index 3da8346f..9766ba71 100644 --- a/muse2/muse/liste/listedit.cpp +++ b/muse2/muse/liste/listedit.cpp @@ -607,8 +607,6 @@ ListEdit::ListEdit(PartList* pl) initShortcuts(); setWindowTitle("MusE: List Editor"); - - initalizing=false; } //--------------------------------------------------------- diff --git a/muse2/muse/main.cpp b/muse2/muse/main.cpp index fe18214c..11644e2f 100644 --- a/muse2/muse/main.cpp +++ b/muse2/muse/main.cpp @@ -23,6 +23,7 @@ #include <QApplication> #include <QDir> +#include <QFile> #include <QKeyEvent> #include <QMessageBox> #include <QLocale> @@ -260,6 +261,28 @@ int main(int argc, char* argv[]) QDir cPath = QDir(MusEGlobal::configPath); if (! cPath.exists()) cPath.mkpath("."); + + QFile cConf (MusEGlobal::configName); + QFile cConfTempl (MusEGlobal::museGlobalShare + QString("/templates/MusE.cfg")); + if (! cConf.exists()) + { + printf ("creating new config...\n"); + if (cConfTempl.copy(MusEGlobal::configName)) + printf (" success.\n"); + else + printf (" FAILED!\n"); + } + + QFile cConfQt (MusEGlobal::configPath + QString("/MusE-qt.conf")); + QFile cConfTemplQt (MusEGlobal::museGlobalShare + QString("/templates/MusE-qt.conf")); + if (! cConfQt.exists()) + { + printf ("creating new qt config...\n"); + if (cConfTemplQt.copy(cConfQt.fileName())) + printf (" success.\n"); + else + printf (" FAILED!\n"); + } #ifdef HAVE_LASH lash_args_t * lash_args = 0; diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp index f6517ee1..3aa1908c 100644 --- a/muse2/muse/marker/markerview.cpp +++ b/muse2/muse/marker/markerview.cpp @@ -301,8 +301,6 @@ MarkerView::MarkerView(QWidget* parent) // bug: 2811156 Softsynth GUI unclosable with XFCE4 (and a few others) show(); hide(); - - initalizing=false; } //--------------------------------------------------------- diff --git a/muse2/muse/master/lmaster.cpp b/muse2/muse/master/lmaster.cpp index 5575b64e..a2cc8538 100644 --- a/muse2/muse/master/lmaster.cpp +++ b/muse2/muse/master/lmaster.cpp @@ -276,7 +276,6 @@ LMaster::LMaster() connect(keyButton, SIGNAL(clicked()), SLOT(insertKey())); initShortcuts(); - initalizing=false; } //--------------------------------------------------------- diff --git a/muse2/muse/master/masteredit.cpp b/muse2/muse/master/masteredit.cpp index 976d90b9..c3fde313 100644 --- a/muse2/muse/master/masteredit.cpp +++ b/muse2/muse/master/masteredit.cpp @@ -262,7 +262,6 @@ MasterEdit::MasterEdit() connect(canvas, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned))); initTopwinState(); - initalizing=false; } //--------------------------------------------------------- diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp index a617f3ab..8821d0d8 100644 --- a/muse2/muse/midiedit/drumedit.cpp +++ b/muse2/muse/midiedit/drumedit.cpp @@ -531,7 +531,6 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini initTopwinState(); - initalizing=false; } //--------------------------------------------------------- diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp index 1eff2504..178b5c46 100644 --- a/muse2/muse/midiedit/pianoroll.cpp +++ b/muse2/muse/midiedit/pianoroll.cpp @@ -530,7 +530,6 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i } initTopwinState(); - initalizing=false; } //--------------------------------------------------------- diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index 6e04e51e..8b5b52f7 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -501,7 +501,6 @@ ScoreEdit::ScoreEdit(QWidget* parent, const char* name, unsigned initPos) apply_velo=true; initTopwinState(); - initalizing=false; } void ScoreEdit::init_shortcuts() @@ -4541,18 +4540,17 @@ void ScoreCanvas::add_new_parts(const std::map< Part*, std::set<Part*> >& param) * CURRENT TODO * M o TEST pasting in editors! * + * ! o fix sigedit boxes (see also "important todo") * o ticks-to-quarter spinboxes - * - * ! o fix sigedit boxes - * M o remove that ugly "bool initalizing" stuff. it's probably unneeded (watch out for the FINDMICH message) + * o newly created windows have to be focussed! * o mirror most menus to an additional right-click context menu to avoid the long mouse pointer * journey to the menu bar. try to find a way which does not involve duplicate code! - * o sane defaults for toolbars * o implement borland-style maximize: free windows do not cover the main menu, even when maximized * o smart range selection: if range markers have been used recently (that is, a dialog with * "range" setting, or they've been modified), default to "in range" or "selected in range" * * IMPORTANT TODO + * ! o fix sigedit boxes (see also "current todo") * o add "dotted quarter" quantize option (for 6/8 beat) * * o rename stuff with F2 key diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp index 0d42ab6b..a2167a50 100644 --- a/muse2/muse/waveedit/waveedit.cpp +++ b/muse2/muse/waveedit/waveedit.cpp @@ -284,7 +284,6 @@ WaveEdit::WaveEdit(PartList* pl) } initTopwinState(); - initalizing=false; } void WaveEdit::initShortcuts() |