# # # patch "guitone/res/i18n/guitone_de.ts" # from [f25f9ee9f160c0c33a808d6bde84a81a8f6531b6] # to [c265514c04cf437211cec5e225022865b75d27fe] # # patch "guitone/src/model/Select.cpp" # from [c385f3d183a9d4530d59eb290f9e235dcd66afdf] # to [44d0a66ba412de3af68d4e84eb87730cadab7d50] # # patch "guitone/src/model/Toposort.cpp" # from [7f548bfe49275afd3ffb52d16a1d2e5bb4f90615] # to [f059e8338ac1c5174137d0a8ba26fbb2e1db4133] # # patch "guitone/src/model/Toposort.h" # from [5b7f580568b3c8aa58a2ae4ea02105b8a22c3f35] # to [c71cfd90102481cc0ecc126dafa1b20bf5785e3e] # # patch "guitone/src/monotone/Monotone.cpp" # from [34e58702be2f72aadce3fb1bf40a4af6a4d595ba] # to [2cc72361abc02594ea4874e0ac3e1fdf91a40435] # # patch "guitone/src/view/dialogs/SwitchWorkspaceRevision.cpp" # from [916581c5b85ce84e225dc24554ec6b2bc421af28] # to [c7048551cefd35c3eb3d7cce60197d311bc59bdd] # ============================================================ --- guitone/res/i18n/guitone_de.ts f25f9ee9f160c0c33a808d6bde84a81a8f6531b6 +++ guitone/res/i18n/guitone_de.ts c265514c04cf437211cec5e225022865b75d27fe @@ -237,44 +237,44 @@ Passwort wiederholen - + Missing information Fehlende Angaben - + Please fill out all fields. Bitte füllen Sie alle Felder aus. - + Password mismatch Keine Passwortübereinstimmung - + The entered passwords did not match. Die eingegebenen Passwörter stimmen nicht überein. - + Error creating keypair Fehler beim Erzeugen des Schlüsselpaares - + There was an error creating the keypair: %1 Bei der Erzeugung des Schlüsselpaares ist ein Fehler aufgetreten: %1 - + 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? @@ -496,27 +496,27 @@ Schließen - + Unable to execute command Konnte Kommando nicht ausführen - + Copy key name to clipboard Kopiere Schlüsselnamen in die Zwischenablage - + Copy public key hash to clipboard Kopiere öffentliche Prüfsumme in die Zwischenablage - + Copy public key data to clipboard Kopiere öffentliche Schlüsseldaten in die Zwischenablage - + Unable to execute '%1' - maybe another command is still running? Konnte '%1' nicht ausführen - eventuell läuft noch ein anderes Kommando? @@ -562,207 +562,207 @@ MainWindow - + View Ansicht - + Help Hilfe - + Workspace Arbeitsbereich - + File Datei - + Recent Workspaces Vorherige Arbeitsbereiche - + Open Workspace Arbeitsbereich öffnen - + Ctrl+O Strg+O - + No previous workspaces available. Keine vorherigen Arbeitsbereiche verfügbar. - + Preferences.... Einstellungen... - + Ctrl+P Strg+P - + Quit Beenden - + Ctrl+Q Strg+Q - + Hide ignored files Ignorierte Dateien verstecken - + Ctrl+H Strg+H - + All files Alle Dateien - + A A - + All changed files Alle geänderten Dateien - + C G - + Patched files Inhaltlich geänderte Dateien - + P P - + Added files Hinzugefügte Dateien - + N H - + Removed files Entfernte Dateien - + D E - + Renamed files Umbenannte Dateien - + R U - + Missing files Fehlende Dateien - + M F - + Unknown files Unbekannte Dateien - + U K - + Ignored files Ignorierte Dateien - + I I - + Expand tree Baum aufklappen - + Ctrl+T Strg+T - + Switch revision Revision wechseln - + Ctrl+R Strg+R - + Key management Schlüsselverwaltung - + Ctrl+K Strg+K - + About Qt Über Qt - + About guitone Über guitone - + Show Zeige @@ -772,127 +772,127 @@ 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. - + Recent Databases Vorherige Datenbanken - + Open Database Datenbank öffnen - + No previous databases available. Keine vorherigen geöffneten Datenbanken verfügbar. - + Database Datenbank - + Ctrl+Shift+O 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 - + Ctrl+B Strg+B - + Changeset browser Änderungen-Browser - + guitone is in database mode. This means that only parts of the functionality are available. You can switch back to the workspace mode at any time by loading a workspace. guitone befindet sich im Datenbank-Modus. Das bedeutet, dass nur Teile der Funktionalität verfügbar sind. @@ -927,32 +927,32 @@ 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. @@ -988,12 +988,12 @@ monotone gab zurück: RevisionDiff - + base revision Basis-Revision - + workspace revision Arbeitsbereich-Revision @@ -1014,7 +1014,7 @@ monotone gab zurück: Select - + Revision ID Revisions-ID @@ -1042,27 +1042,27 @@ monotone gab zurück: Abbrechen - + Branch Zweig - + Tag Marke - + Author Autor - + Date Datum - + Custom Selbstdefiniert @@ -1072,32 +1072,32 @@ monotone gab zurück: beinhaltet - + Revision Revision - + Invalid selection Ungültige Auswahl - + The given selection could not be processed: %1 Die eingegebene Auswahl kann nicht ausgeführt werden: %1 - + Combined Kombiniert - + 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? @@ -1130,7 +1130,7 @@ monotone gab zurück: Revision ID - Revisions-ID + Revisions-ID ============================================================ --- guitone/src/model/Select.cpp c385f3d183a9d4530d59eb290f9e235dcd66afdf +++ guitone/src/model/Select.cpp 44d0a66ba412de3af68d4e84eb87730cadab7d50 @@ -74,7 +74,9 @@ void Select::parseOutput() { selRevisions->clear(); delete selRevisions; - selRevisions = new RevisionList(AutomateCommand::data.split('\n')); + selRevisions = new RevisionList( + AutomateCommand::data.split('\n', QString::SkipEmptyParts) + ); // reset the view reset(); } ============================================================ --- guitone/src/model/Toposort.cpp 7f548bfe49275afd3ffb52d16a1d2e5bb4f90615 +++ guitone/src/model/Toposort.cpp f059e8338ac1c5174137d0a8ba26fbb2e1db4133 @@ -29,11 +29,6 @@ Toposort::Toposort(QObject *parent) : QS ordRevisions = new RevisionMap(); mtnDelegate = new MonotoneDelegate(this); showRows = false; - - connect( - this, SIGNAL(modelReset()), - this, SLOT(sortModel()) - ); } Toposort::~Toposort() @@ -46,6 +41,21 @@ Toposort::~Toposort() delete mtnDelegate; } +void Toposort::setSourceModel(QAbstractItemModel * source) +{ + disconnect( + sourceModel(), SIGNAL(modelReset()), + this, SLOT(sortModel()) + ); + + QSortFilterProxyModel::setSourceModel(source); + + connect( + source, SIGNAL(modelReset()), + this, SLOT(sortModel()) + ); +} + bool Toposort::lessThan(const QModelIndex &left, const QModelIndex &right) { QString leftRev = sourceModel()->data(left).toString(); @@ -56,6 +66,7 @@ bool Toposort::lessThan(const QModelInde qDebug("Toposort::lessThan: one or both revisions not found,"); return false; } + qDebug("sorting %s and %s", qPrintable(leftRev), qPrintable(rightRev)); return ordRevisions->value(leftRev) < ordRevisions->value(rightRev); } @@ -113,7 +124,7 @@ void Toposort::parseOutput() } showRows = true; - reset(); + filterChanged(); qDebug("Toposort:parseOutput: revisions sorted"); ============================================================ --- guitone/src/model/Toposort.h 5b7f580568b3c8aa58a2ae4ea02105b8a22c3f35 +++ guitone/src/model/Toposort.h c71cfd90102481cc0ecc126dafa1b20bf5785e3e @@ -35,6 +35,7 @@ public: public: Toposort(QObject*); virtual ~Toposort(); + void setSourceModel(QAbstractItemModel *); signals: void sortingFinished(); ============================================================ --- guitone/src/monotone/Monotone.cpp 34e58702be2f72aadce3fb1bf40a4af6a4d595ba +++ guitone/src/monotone/Monotone.cpp 2cc72361abc02594ea4874e0ac3e1fdf91a40435 @@ -370,7 +370,7 @@ bool Monotone::triggerCommand(const QStr // read & parse mtn's output as soon as it gets available connect( - process, SIGNAL(readyReadStandardOutput()), + process, SIGNAL(readyRead()), this, SLOT(readAndProcessCommand()) ); @@ -420,6 +420,9 @@ void Monotone::readAndProcessCommand() void Monotone::readAndProcessCommand() { + // don't do anything if there is nothing to read + if (process->bytesAvailable() == 0) return; + int retCode = 0; // check if we already could parse the complete stdio output if (!readAndParseStdout(retCode)) ============================================================ --- guitone/src/view/dialogs/SwitchWorkspaceRevision.cpp 916581c5b85ce84e225dc24554ec6b2bc421af28 +++ guitone/src/view/dialogs/SwitchWorkspaceRevision.cpp c7048551cefd35c3eb3d7cce60197d311bc59bdd @@ -58,7 +58,11 @@ SwitchWorkspaceRevision::SwitchWorkspace revisionList->setModel(sortModel); certList->setModel(certsModel); - // some tweaks + // enable sorting of revisions + revisionList->setSortingEnabled(true); + revisionList->sortByColumn(0, Qt::AscendingOrder); + + // some tweak certList->header()->setResizeMode(QHeaderView::Interactive); // connect its item clicked signal with a local slot