#
#
# patch "guitone/res/i18n/guitone_de.ts"
# from [713e5d3afff9c38bd736069aa58814c989550c8d]
# to [04013dbbad7724af66c567c498af43814331a880]
#
# patch "guitone/src/model/InventoryItem.cpp"
# from [d68575e41ee46580ad5e6fcdb68863e721e5cb56]
# to [819aee2fa9a5649212d1ceef90be12760c5a2230]
#
# patch "guitone/src/model/InventoryItem.h"
# from [bde769fc52a089883ca9b0fff62677bf7c50a9ac]
# to [a8bbfeb525913eddc4a3c73b67cd79b6ab86db64]
#
# patch "guitone/src/model/InventoryProxyModel.cpp"
# from [67421f1ac2d16881480b71eddbd17d720475d792]
# to [85566d14f7d928a4d90c804654b476a4c1b66259]
#
# patch "guitone/src/model/InventoryProxyModel.h"
# from [f9d40fb378711f9f6fc389acba7e77ad4890ad37]
# to [afa4cda8a630600ceda0f4d1e02a18697882460e]
#
# patch "guitone/src/view/Guitone.cpp"
# from [968e7bd8aa73237f50f6a69be275c2be088021cb]
# to [45ed8c1db4ca0e3a6614c1a2241dfba3ff60c4e5]
#
# patch "guitone/src/view/Guitone.h"
# from [62ebb4dae534c33e63d59ff6000f3a71ff4b75ab]
# to [1a33007147710762f4429edd383c4e7db0660b2c]
#
# patch "guitone/src/view/InventoryView.cpp"
# from [69117ad6f3585049d1f46dde392d1535e5d3beb4]
# to [b9d5f505d528a2d7e30abc0b404b04c568dd74b1]
#
============================================================
--- guitone/res/i18n/guitone_de.ts 713e5d3afff9c38bd736069aa58814c989550c8d
+++ guitone/res/i18n/guitone_de.ts 04013dbbad7724af66c567c498af43814331a880
@@ -266,17 +266,17 @@
Bereit
-
+
Select your workspace...
Wählen Sie Ihren Arbeitsbereich aus...
-
+
Loading aborted
Laden abgebrochen
-
+
Invalid workspace
Ungültiger Arbeitsbereich
@@ -296,7 +296,7 @@
Das Inventar konnte nicht gelesen werden. Vielleicht läuft noch ein anderer Prozess?
-
+
Loading workspace...
Lade Arbeitsbereich...
@@ -313,7 +313,7 @@
STRG+Q
-
+
The chosen directory is no monotone workspace!
Das gewählte Verzeichnis ist kein monotone-Arbeitsverzeichnis!
@@ -323,7 +323,7 @@
&Importiere Arbeitsbereich
-
+
Critical Monotone Error
Kritischer monotone-Fehler
@@ -339,14 +339,14 @@
&Ansicht
-
+
&Hide ignored files
- Ignorierte Dateien &verstecken
+ Ignorierte Dateien &verstecken
-
+
&Show ignored files
- Ignorierte Dateien a&nzeigen
+ Ignorierte Dateien a&nzeigen
@@ -359,22 +359,22 @@
Arbeitsbereich &öffnen
-
+
&%1 %2
&%1 %2
-
+
No previous workspaces available.
Keine vorherigen Arbeitsbereiche verfügbar.
-
+
&Workspace
- &Arbeitsbereich
+ A&rbeitsbereich
-
+
&Switch revision
Auf andere &Revision aktualisieren
@@ -389,24 +389,24 @@
&Schlüsselverwaltung
-
+
About &Qt
Ãber &Qt
-
+
&Help
&Hilfe
-
+
&Database
- &Datenbank
+ Daten&bank
&Show ancestry graph
- &Historiengraph anzeigen
+ &Historiengraph anzeigen
@@ -414,17 +414,17 @@
&Einstellungen...
-
+
&Key Management
&Schlüsselverwaltung
-
+
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?
@@ -443,6 +443,26 @@
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.
+
+
+ Hide &ignored files
+ &Ignorierte Dateien verstecken
+
+
+
+ Show only &changed files
+ Zeige nur &geänderte Dateien
+
+
+
+ Show &ignored files
+ &Ignorierte Dateien anzeigen
+
+
+
+ Show &all files
+ A&lle Dateien anzeigen
+
Inventory
@@ -470,27 +490,27 @@
ein Verzeichnis höher
-
+
Rename Source
Quelle für Umbenennen
-
+
Rename Target
Ziel für Umbenennen
-
+
Added
hinzugefügt
-
+
Dropped
entfernt
-
+
Missing
fehlend
@@ -500,22 +520,22 @@
verändert
-
+
Unchanged
unverändert
-
+
Unknown
unbekannt
-
+
Ignored
ignoriert
-
+
Modified
Verändert
@@ -523,130 +543,130 @@
InventoryView
-
+
&Add
&Hinzufügen
-
+
Ctrl+A
Add
-
+
Add to workspace
Zum Arbeitsbereich hinzufügen
-
+
&Remove
En&tfernen
-
+
Ctrl+R
Remove
-
+
Remove from workspace
Vom Arbeitsbereich entfernen
-
+
&Commit
&Einpflegen
-
+
Ctrl+C
Commit
-
+
Commit
Einpflegen
-
+
I&gnore
Datei &ignorieren
-
+
Ctrl+G
Ignore
-
+
Ignore file
Datei ignorieren
-
+
&Unignore
Datei nicht ign&orieren
-
+
Ctrl+U
Unignore
-
+
Unignore file
Datei nicht mehr ignorieren
-
+
R&evert
&Zurücksetzen
-
+
Ctrl+E
Revert
-
+
Revert uncommitted changes
Nicht eingepflegte Ãnderungen verwerfen
-
+
Rena&me
Um&benennen
-
+
Ctrl+M
Rename
-
+
Rename file
Datei umbenennen
-
+
D&iff
U&nterschiede anzeigen
-
+
Ctrl+D
Diff
-
+
Diff against base revision
Unterschiede im Vergleich zur Basisrevision anzeigen
@@ -1098,7 +1118,7 @@ korrekt installiert?
Select
-
+
Revision ID
Revisions-ID
============================================================
--- guitone/src/model/InventoryItem.cpp d68575e41ee46580ad5e6fcdb68863e721e5cb56
+++ guitone/src/model/InventoryItem.cpp 819aee2fa9a5649212d1ceef90be12760c5a2230
@@ -253,16 +253,17 @@ int InventoryItem::getStatusRecursive()
return overallStatus;
}
-bool InventoryItem::hasStatusRecursive(int statusBits) const
+bool InventoryItem::hasChangedRecursive() const
{
- return (getStatusRecursive() & statusBits) == statusBits;
+ int state = getStatusRecursive();
+ return
+ (state & Added) == Added ||
+ (state & Dropped) == Dropped ||
+ (state & RenamedFrom) == RenamedFrom ||
+ (state & RenamedTo) == RenamedTo ||
+ (state & Patched) == Patched;
}
-bool InventoryItem::hasNotStatusRecursive(int statusBits) const
-{
- return (getStatusRecursive() & statusBits) == 0;
-}
-
QString InventoryItem::getStatusString() const
{
// do not return the status for
============================================================
--- guitone/src/model/InventoryItem.h bde769fc52a089883ca9b0fff62677bf7c50a9ac
+++ guitone/src/model/InventoryItem.h a8bbfeb525913eddc4a3c73b67cd79b6ab86db64
@@ -51,9 +51,8 @@ class InventoryItem : public QObject
bool hasStatus(int) const;
bool hasNotStatus(int) const;
- bool hasStatusRecursive(int) const;
- bool hasNotStatusRecursive(int) const;
int getStatusRecursive() const;
+ bool hasChangedRecursive() const;
QString getStatusString(void) const;
inline bool isDirectory(void) const { return dirFlag; };
inline bool isRootDirectory(void) const { return rootFlag; };
============================================================
--- guitone/src/model/InventoryProxyModel.cpp 67421f1ac2d16881480b71eddbd17d720475d792
+++ guitone/src/model/InventoryProxyModel.cpp 85566d14f7d928a4d90c804654b476a4c1b66259
@@ -39,7 +39,9 @@ bool InventoryProxyModel::filterAcceptsR
bool acceptRow = true;
// check if we should hide ignored files
- acceptRow &= !hideIgnored || !item->hasStatus(InventoryItem::Ignored);
+ acceptRow &= !hideIgnored || !item->hasStatus(InventoryItem::Ignored);
+ // check if we should only display changed files
+ acceptRow &= !showChanged || item->hasChangedRecursive();
// check if we should only display folders
acceptRow &= !folderTree || item->isDirectory();
// make sure we don't display pseudo "cdUp" items in the tree view
@@ -93,9 +95,9 @@ void InventoryProxyModel::sort(int colum
void InventoryProxyModel::sort(int column, Qt::SortOrder order)
{
- sortOrder = order;
+ sortOrder = order;
sortColumn = column;
- QSortFilterProxyModel::sort(column, order);
+ QSortFilterProxyModel::sort(column, order);
}
void InventoryProxyModel::setHideIgnoredFiles(bool hide)
@@ -109,3 +111,16 @@ bool InventoryProxyModel::hideIgnoredFil
{
return hideIgnored;
}
+
+void InventoryProxyModel::setShowChangedFiles(bool show)
+{
+ if (show == showChanged) return;
+ showChanged = show;
+ clear();
+}
+
+bool InventoryProxyModel::showChangedFiles() const
+{
+ return showChanged;
+}
+
============================================================
--- guitone/src/model/InventoryProxyModel.h f9d40fb378711f9f6fc389acba7e77ad4890ad37
+++ guitone/src/model/InventoryProxyModel.h afa4cda8a630600ceda0f4d1e02a18697882460e
@@ -34,11 +34,14 @@ public:
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
void setHideIgnoredFiles(bool hide);
bool hideIgnoredFiles() const;
+ void setShowChangedFiles(bool hide);
+ bool showChangedFiles() const;
private:
bool folderTree;
int sortColumn;
bool hideIgnored;
+ bool showChanged;
Qt::SortOrder sortOrder;
};
============================================================
--- guitone/src/view/Guitone.cpp 968e7bd8aa73237f50f6a69be275c2be088021cb
+++ guitone/src/view/Guitone.cpp 45ed8c1db4ca0e3a6614c1a2241dfba3ff60c4e5
@@ -135,11 +135,17 @@ void Guitone::buildMenu()
menu = menuBar()->addMenu(tr("&View"));
actShowHideIgnored = menu->addAction(
- tr("&Hide ignored files"),
+ tr("Hide &ignored files"),
this,
SLOT(showHideIgnoredFiles()),
Qt::CTRL + Qt::Key_H
);
+ actShowHideChanged = menu->addAction(
+ tr("Show only &changed files"),
+ this,
+ SLOT(showHideChangedFiles()),
+ Qt::CTRL + Qt::Key_L
+ );
menu = menuBar()->addMenu(tr("&Workspace"));
menu->addAction(
@@ -364,10 +370,21 @@ void Guitone::showHideIgnoredFiles()
proxyModelFileList->setHideIgnoredFiles(!hide);
actShowHideIgnored->setText(
- hide ? tr("&Hide ignored files") : tr("&Show ignored files")
+ hide ? tr("Hide &ignored files") : tr("Show &ignored files")
);
}
+void Guitone::showHideChangedFiles()
+{
+ bool show = proxyModelFolderTree->showChangedFiles();
+ proxyModelFolderTree->setShowChangedFiles(!show);
+ proxyModelFileList->setShowChangedFiles(!show);
+
+ actShowHideChanged->setText(
+ show ? tr("Show only &changed files") : tr("Show &all files")
+ );
+}
+
void Guitone::openRecentWorkspace()
{
QAction *action = qobject_cast(sender());
============================================================
--- guitone/src/view/Guitone.h 62ebb4dae534c33e63d59ff6000f3a71ff4b75ab
+++ guitone/src/view/Guitone.h 1a33007147710762f4429edd383c4e7db0660b2c
@@ -48,6 +48,7 @@ private slots:
void slotMapFolderTreeToFileList(const QModelIndex &);
void slotMapFileListToFolderTree(const QModelIndex &);
void showHideIgnoredFiles();
+ void showHideChangedFiles();
void openSwitchWorkspaceRevisionDialog();
void openPreferencesDialog();
void openAncestryGraphDialog();
@@ -64,6 +65,7 @@ private:
QMenu *menu;
QMenu *wsSubMenu;
QAction *actShowHideIgnored;
+ QAction *actShowHideChanged;
Inventory *invModel;
Attributes *attrModel;
InventoryProxyModel *proxyModelFolderTree;
============================================================
--- guitone/src/view/InventoryView.cpp 69117ad6f3585049d1f46dde392d1535e5d3beb4
+++ guitone/src/view/InventoryView.cpp b9d5f505d528a2d7e30abc0b404b04c568dd74b1
@@ -103,11 +103,7 @@ void InventoryView::contextMenuEvent(QCo
menu.addAction(actUnignore);
}
- if (item->hasStatusRecursive(InventoryItem::Added) ||
- item->hasStatusRecursive(InventoryItem::Dropped) ||
- item->hasStatusRecursive(InventoryItem::Patched) ||
- item->hasStatusRecursive(InventoryItem::RenamedFrom) ||
- item->hasStatusRecursive(InventoryItem::RenamedTo))
+ if (item->hasChangedRecursive())
{
menu.addAction(actCommit);
}