#
#
# patch "NEWS"
# from [2b604763258b6fe0c75597daa1df13433ce8f5e3]
# to [0bbddd34d44130988065a32819afb8725d79fbaa]
#
# patch "res/forms/open_prompt.ui"
# from [e0cd694653389c1878580b6ea527dd71fe41f92b]
# to [b1765ae7f084ee971f6dbb02708a19665c3311cb]
#
# patch "res/i18n/guitone_de.ts"
# from [009f9cb8c240cf936fbff247089a2949f7d05643]
# to [f180a00db1b9d7b4942dbc264d7eb98aa5edf848]
#
# patch "src/Guitone.cpp"
# from [b92124f06a493927d5989833e0350e346d2b94ee]
# to [b62776a0951ebab724cf59adb3130f80e291f0fc]
#
# patch "src/view/dialogs/OpenPrompt.cpp"
# from [d4dcd427de9fb69d4adec8fc568b854827998b24]
# to [0398da0a68a5c3302d91b6232189abedce01c8ee]
#
# patch "src/view/dialogs/OpenPrompt.h"
# from [a86213e4f773ea820f7789f887e3eea4df3e958d]
# to [09ca822351519c6c01d079b3aaaaf5a43f3963a3]
#
============================================================
--- NEWS 2b604763258b6fe0c75597daa1df13433ce8f5e3
+++ NEWS 0bbddd34d44130988065a32819afb8725d79fbaa
@@ -1,4 +1,7 @@
????-??-?? (0.7.1)
+ - improved: startup dialog slightly changed - now contains the possibility
+ to open recent databases and workspaces. Removed this functionality from
+ the initialization phase of the application which was rather unpredictable
- bugfix: if guitone is closed too fast (f.e. before the internal mtn thread
could be started), the application wasn't closed properly, but only removed
all open windows.
============================================================
--- res/forms/open_prompt.ui e0cd694653389c1878580b6ea527dd71fe41f92b
+++ res/forms/open_prompt.ui b1765ae7f084ee971f6dbb02708a19665c3311cb
@@ -7,16 +7,8 @@
true
-
-
- 0
- 0
- 563
- 329
-
-
-
+
0
0
@@ -27,185 +19,151 @@
../../../../.designer/backup
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- 200
- 0
-
-
-
-
- 200
- 16777215
-
-
-
- Open Database
-
-
- false
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 200
-
-
-
- Opens an existing monotone database to browse revisions, files and metadata.
-
+
+
+ Open Database
+
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Opens an existing monotone database to browse revisions, files and metadata.
If you like to checkout a new workspace, open a database first and then use "Checkout revision" in the "Database" menu.
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
-
- true
-
-
- 5
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+ 5
+
+
+
+ -
+
+
+ false
+
+
-
+
+ Recent databases...
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Browse...
+
+
+ false
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- 200
- 0
-
-
-
-
- 200
- 16777215
-
-
-
- Open Workspace
-
-
- false
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 200
-
-
-
- Opens an existing workspace directory.
-
-If you previously checked out a workspace, use this to manage it.
-
-
- Qt::AutoText
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
-
- true
-
-
- 5
-
-
-
-
-
- -
-
-
- Qt::Horizontal
+
+
+ Open Workspace
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Opens an existing workspace directory. If you previously checked out a workspace, use this to manage it.
+
+
+ Qt::AutoText
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+ 5
+
+
+
+ -
+
+
+ false
+
+
-
+
+ Recent workspaces...
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Browse...
+
+
+ false
+
+
+
+
+
+
-
@@ -215,9 +173,6 @@ If you previously checked out a workspac
Qt::Horizontal
-
- QSizePolicy::Expanding
-
40
============================================================
--- res/i18n/guitone_de.ts 009f9cb8c240cf936fbff247089a2949f7d05643
+++ res/i18n/guitone_de.ts f180a00db1b9d7b4942dbc264d7eb98aa5edf848
@@ -2100,7 +2100,7 @@ Letzte Fehlerausgabe war:
MonotoneThread
-
+
Das temporäre Verzeichnis '%1' enthält einen monotone-Arbeitsbereich, welcher zu ernsten Fehlfunktionen bei der Ausführung dieses Programmes führen kann. Bitte entfernen Sie diesen Arbeitsbereich, bevor Sie diese Aktion erneut versuchen!
============================================================
--- src/Guitone.cpp b92124f06a493927d5989833e0350e346d2b94ee
+++ src/Guitone.cpp b62776a0951ebab724cf59adb3130f80e291f0fc
@@ -128,8 +128,6 @@ void Guitone::loadSomething()
I(monotoneManager->monotoneBinaryPathSet());
- D("checking command line arguments and file open requests");
-
QStringList args = arguments();
for (int i=1, j=args.size(); i 0 && tryLoadSomething(workspaces.at(0));
-
- if (somethingLoaded) return;
-
- D("trying to load recent database");
- QStringList databases = Settings::getItemList("RecentDatabaseList");
- somethingLoaded = databases.size() > 0 && tryLoadSomething(databases.at(0));
-
- if (somethingLoaded) return;
-
- // if still nothing is loaded, prompt the user to load a workspace or database
+ // if nothing was requested, prompt the user to load a workspace or database
openPrompt = new OpenPrompt(NULL);
connect(
@@ -281,16 +264,15 @@ void Guitone::loadWorkspace(const QStrin
tr("The workspace could not be loaded:\n%1").arg(e),
QMessageBox::Ok
);
+
+ if (openPrompt)
+ openPrompt->raise();
+
return;
}
- // we don't need this anymore
if (openPrompt)
- {
openPrompt->hide();
- delete openPrompt;
- openPrompt = 0;
- }
}
void Guitone::loadDatabase(const QString & path)
@@ -307,16 +289,15 @@ void Guitone::loadDatabase(const QString
tr("The database could not be loaded:\n%1").arg(e),
QMessageBox::Ok
);
+
+ if (openPrompt)
+ openPrompt->raise();
+
return;
}
- // we don't need this anymore
if (openPrompt)
- {
openPrompt->hide();
- delete openPrompt;
- openPrompt = 0;
- }
}
void Guitone::windowClosed(MainWindow * wnd)
============================================================
--- src/view/dialogs/OpenPrompt.cpp d4dcd427de9fb69d4adec8fc568b854827998b24
+++ src/view/dialogs/OpenPrompt.cpp 0398da0a68a5c3302d91b6232189abedce01c8ee
@@ -19,6 +19,7 @@
***************************************************************************/
#include "OpenPrompt.h"
+#include "Settings.h"
#include
@@ -46,6 +47,32 @@ OpenPrompt::OpenPrompt(QWidget * parent)
this, SIGNAL(rejected()),
this, SIGNAL(quitApp())
);
+
+ QStringList workspaces = Settings::getItemList("RecentWorkspaceList");
+
+ if (workspaces.size() > 0)
+ {
+ recentWorkspaces->addItems(workspaces);
+ recentWorkspaces->setEnabled(true);
+
+ connect(
+ recentWorkspaces, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(recentWorkspaceChanged(int))
+ );
+ }
+ QStringList databases = Settings::getItemList("RecentDatabaseList");
+
+ if (databases.size() > 0)
+ {
+ recentDatabases->addItems(databases);
+ recentDatabases->setEnabled(true);
+
+ connect(
+ recentDatabases, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(recentDatabaseChanged(int))
+ );
+ }
+
}
OpenPrompt::~OpenPrompt() {};
@@ -76,3 +103,17 @@ void OpenPrompt::openWorkspace()
emit loadWorkspace(fn);
}
+void OpenPrompt::recentWorkspaceChanged(int idx)
+{
+ // skip the first dummy item
+ if (idx < 1) return;
+ emit loadWorkspace(recentWorkspaces->itemText(idx));
+}
+
+void OpenPrompt::recentDatabaseChanged(int idx)
+{
+ // skip the first dummy item
+ if (idx < 1) return;
+ emit loadDatabase(recentDatabases->itemText(idx));
+}
+
============================================================
--- src/view/dialogs/OpenPrompt.h a86213e4f773ea820f7789f887e3eea4df3e958d
+++ src/view/dialogs/OpenPrompt.h 09ca822351519c6c01d079b3aaaaf5a43f3963a3
@@ -39,6 +39,8 @@ private slots:
private slots:
void openDatabase();
void openWorkspace();
+ void recentDatabaseChanged(int);
+ void recentWorkspaceChanged(int);
};
#endif