# # # patch "guitone/res/i18n/guitone_de.ts" # from [e2d0e1ece65602423d9df61828e8d0911b4579b3] # to [ece9c70819331cfccb4a350976db0d43cc1ae673] # # patch "guitone/src/view/MainWindow.cpp" # from [7c815e194238287d2253ae81d76627724e6fa733] # to [7a525ef5febb4f91fb562afefdc576a805bbc3e7] # # patch "guitone/src/view/dialogs/About.cpp" # from [de1a4055e5fe78f6a43c1f4672174a852811354f] # to [a4c3715c5b16b73a41f8d4b251e351efa83f7e5e] # # patch "guitone/src/view/dialogs/About.h" # from [1641fea6f1dd00635f0a6a4d3174e6b42da76dda] # to [c07a76d51189ad026cf5336fbfe91d223b21156d] # # patch "guitone/src/view/dialogs/Dialog.cpp" # from [aeb857f5148de1e893ce7f6cfcb49f5375d8f45f] # to [dafd6a6a4cde4a53164b001665d0bf1fe3b6c007] # # patch "guitone/src/view/dialogs/Dialog.h" # from [cb53b8604ec8c5b2268354d6c00fef8fafd830c8] # to [39a78dfcb52548eac3012ef78dab3de7cec9c3a3] # # patch "guitone/src/view/dialogs/Preferences.cpp" # from [aee8e3701cad4b88fcc8f8d32f0fe836d7083b00] # to [8b5eb4b83c884cace024a98bd403bb665d2a30d9] # ============================================================ --- guitone/res/i18n/guitone_de.ts e2d0e1ece65602423d9df61828e8d0911b4579b3 +++ guitone/res/i18n/guitone_de.ts ece9c70819331cfccb4a350976db0d43cc1ae673 @@ -1,14 +1,14 @@ About - + <small>Version %1.%2</small> <small>Version %1.%2</small> - + <br/><br/>Authors: <a href="mailto:address@hidden">Thomas Keller</a>, <a href="mailto:address@hidden">Ingo Maindorfer</a> and <a href="mailto:address@hidden">Jean-Louis Fuchs</a>.<br/><br/>This program is free software; you can redistribute it and/or modify<br/>it under the terms of the GNU General Public License as published by<br/>the Free Software Foundation; either version 2 of the License, or<br/>(at your option) any later version.<br/><br/>Bugs? Suggestions? Help? <a href="http://guitone.thomaskeller.biz">guitone Homepage</a><br/><br/>Many thanks go to the friendly guys at <a href="irc://irc.freenode.net/qt">#qt</a> for their helpful<br/>comments during endless coding sessions - you guys rock! <br/><br/>Autoren: <a href="mailto:address@hidden">Thomas Keller</a>, <a href="mailto:address@hidden">Ingo Maindorfer</a> und <a href="mailto:address@hidden">Jean-Louis Fuchs</a><br/><br/>Dieses Programm ist freie Software. Sie können es unter den<br/>Bedingungen der GNU General Public License, wie von der<br/>Free Software Foundation veröffentlicht, weitergeben und/oder<br/>modifizieren, entweder gemäß Version 2 der Lizenz oder <br/>(nach Ihrer Option) jeder späteren Version.<br/><br/>Fehler? Vorschläge? Hilfe? <a href="http://guitone.thomaskeller.biz">guitone Webseite</a><br/><br/>Vielen Dank an die freundlichen Seelen auf <a href="irc://irc.freenode.net/qt">#qt</a> für die Hilfe während der<br/>unendlich langen Programmierstunden - Ihr Jungs s eid Spitze! @@ -597,7 +597,7 @@ Strg+O - + No previous workspaces available. Keine vorherigen Arbeitsbereiche verfügbar. @@ -622,7 +622,7 @@ Strg+Q - + Hide ignored files Ignorierte Dateien verstecken @@ -722,7 +722,7 @@ I - + Expand tree Baum aufklappen @@ -772,67 +772,67 @@ guitone - ein Frontend für monotone - + Error Fehler - + Critical Monotone Error Kritischer monotone-Fehler - + Select your workspace... Wählen Sie Ihren Arbeitsbereich aus... - + Loading aborted Laden abgebrochen - + Invalid workspace Ungültiger Arbeitsbereich - + The chosen directory is no monotone workspace! Das gewählte Verzeichnis ist kein monotone-Arbeitsverzeichnis! - + Unable to execute command Konnte Kommando nicht ausführen - + Unable to execute '%1' - maybe another command is still running? Konnte '%1' nicht ausführen - eventuell läuft noch ein anderes Kommando? - + Loading workspace... Lade Arbeitsbereich... - + Show ignored files Zeige ignorierte Dateien - + Collapse tree Baum zuklappen - + &%1 %2 &%1 %2 - + The path to the monotone binary is either invalid or points to an older version of monotone. Guitone requires monotone version %1 or a monotone with interface version %2 or later. Der Pfad zur ausführbaren Datei von monotone ist entweder ungültig oder zeigt auf eine ältere Version von monotone. Guitone benötigt monotone Version %1 oder ein monotone mit einer Interface-Version %2 oder neuer. @@ -847,7 +847,7 @@ Datenbank öffnen - + No previous databases available. Keine vorherigen geöffneten Datenbanken verfügbar. @@ -862,22 +862,22 @@ Strg+Shift+O - + Loaded database: %1 Geladene Datenbank: %1 - + Select your database... Wählen Sie eine Datenbank aus... - + monotone Databases (*.mtn *.db) monotone-Datenbanken (*.mtn *.db) - + No database loaded Keine Datenbank geladen @@ -963,52 +963,52 @@ monotone gab zurück: Preferences - + Error Fehler - + Notice Hinweis - + You need to reload your current workspace or restart guitone to use the new monotone binary. Sie müssen Ihren derzeitigen Arbeitsbereich neu laden oder guitone neu starten, um die neuen Einstellungen zu verwenden. - + Choose the monotone executable Wählen Sie die ausführbare Datei von monotone - + Binaries (mtn mtn.exe) Ausführbare Dateien (mtn mtn.exe) - + The path to the monotone binary is either invalid or points to an older version of monotone. Guitone requires monotone version %1 or a monotone with interface version %2 or later. Der Pfad zur ausführbaren Datei von monotone ist entweder ungültig oder zeigt auf eine ältere Version von monotone. Guitone benötigt monotone Version %1 oder ein monotone mit einer Interface-Version %2 oder neuer. - + Low (fatal errors) Niedrig (fatale Fehler) - + Medium (critical errors) Mittel (kritische Fehler) - + High (warnings) Hoch (Warnungen) - + All (debug messages) Alle (Debug-Meldungen) @@ -1064,22 +1064,22 @@ monotone gab zurück: QShortcut - + Ctrl Strg - + Shift Umschalt - + Alt Alt - + Meta Meta ============================================================ --- guitone/src/view/MainWindow.cpp 7c815e194238287d2253ae81d76627724e6fa733 +++ guitone/src/view/MainWindow.cpp 7a525ef5febb4f91fb562afefdc576a805bbc3e7 @@ -45,6 +45,7 @@ MainWindow::MainWindow() { gotError = false; mode = None; + setAttribute(Qt::WA_MacMetalStyle); } bool MainWindow::init() @@ -463,7 +464,7 @@ void MainWindow::on_actionPreferences_tr void MainWindow::on_actionPreferences_triggered() { Preferences dialog(this); - dialog.exec(); + dialog.execDocumentModal(); } void MainWindow::on_actionKey_management_triggered() @@ -481,7 +482,7 @@ void MainWindow::on_actionAbout_guitone_ void MainWindow::on_actionAbout_guitone_triggered() { About dialog(this); - dialog.exec(); + dialog.execDocumentModal(); } void MainWindow::on_actionAbout_Qt_triggered() ============================================================ --- guitone/src/view/dialogs/About.cpp de1a4055e5fe78f6a43c1f4672174a852811354f +++ guitone/src/view/dialogs/About.cpp a4c3715c5b16b73a41f8d4b251e351efa83f7e5e @@ -23,9 +23,14 @@ const int About::VersionMinor = 5; const int About::VersionMajor = 0; const int About::VersionMinor = 5; -About::About(QWidget* parent) : QDialog(parent) +About::About(QWidget* parent) : Dialog(parent) { setupUi(this); + Dialog::init(); + + // OSX sheet-alike dialog + setWindowFlags(windowFlags() | Qt::Sheet); + aboutText->setText( tr("Version %1.%2").arg(VersionMajor).arg(VersionMinor) + tr("

Authors: " ============================================================ --- guitone/src/view/dialogs/About.h 1641fea6f1dd00635f0a6a4d3174e6b42da76dda +++ guitone/src/view/dialogs/About.h c07a76d51189ad026cf5336fbfe91d223b21156d @@ -22,8 +22,9 @@ #define ABOUT_H #include "ui_about.h" +#include "Dialog.h" -class About : public QDialog, private Ui::AboutDialog +class About : public Dialog, private Ui::AboutDialog { Q_OBJECT ============================================================ --- guitone/src/view/dialogs/Dialog.cpp aeb857f5148de1e893ce7f6cfcb49f5375d8f45f +++ guitone/src/view/dialogs/Dialog.cpp dafd6a6a4cde4a53164b001665d0bf1fe3b6c007 @@ -20,13 +20,18 @@ #include "Dialog.h" #include "Settings.h" +#include "SignalWaiter.h" -Dialog::Dialog(QWidget* parent) : QDialog(parent) {} +Dialog::Dialog(QWidget* parent) : QDialog(parent) +{ + setAttribute(Qt::WA_MacMetalStyle); +} Dialog::Dialog(QWidget* parent, QString objName) : QDialog(parent) { setObjectName(objName); + setAttribute(Qt::WA_MacMetalStyle); } Dialog::~Dialog() @@ -49,4 +54,17 @@ void Dialog::saveState(void) Settings::setWindowGeometry(saveGeometry(), objectName()); } +// On OSX this will allow the dialog to be display document modal, +// i.e. as a sheet coming out of the parent window. On other platforms +// this just emulates the behaviour of exec() by blocking until the +// finished() signal has been called +// For more info about document modal dialogs on OSX, go here: +// http://doc.trolltech.com/qq/qq18-macfeatures.html +int Dialog::execDocumentModal() +{ + show(); + SignalWaiter waiter(this, SIGNAL(finished(int))); + waiter.wait(); + return result(); +} ============================================================ --- guitone/src/view/dialogs/Dialog.h cb53b8604ec8c5b2268354d6c00fef8fafd830c8 +++ guitone/src/view/dialogs/Dialog.h 39a78dfcb52548eac3012ef78dab3de7cec9c3a3 @@ -32,6 +32,7 @@ public: Dialog(QWidget*, QString); ~Dialog(); void init(); + int execDocumentModal(); private: void restoreState(void); ============================================================ --- guitone/src/view/dialogs/Preferences.cpp aee8e3701cad4b88fcc8f8d32f0fe836d7083b00 +++ guitone/src/view/dialogs/Preferences.cpp 8b5eb4b83c884cace024a98bd403bb665d2a30d9 @@ -32,6 +32,9 @@ Preferences::Preferences(QWidget* parent setupUi(this); Dialog::init(); + // OSX sheet-alike dialog + setWindowFlags(windowFlags() | Qt::Sheet); + mtnExecutablePath->setText(Settings::getMtnBinaryPath()); enableConsoleLog->setCheckState(DebugLog::getConsoleLogEnabled() ?