# # # patch "guitone/guitone.pro" # from [075c82e8b7911108d455b781f3130ea73f0b1935] # to [3ce9bc2f593c8a7fd005a1a38c1dea7765f4de23] # # patch "guitone/res/forms/main_window.ui" # from [bc2f72a85b69de8d4a2cf8f4c56d476f100e094a] # to [f270fec74606db1d3c15648b106e7f1815f9440d] # # patch "guitone/res/i18n/guitone_de.ts" # from [629f55cd4e54fc2596e74c531708046869432003] # to [939d94f230ac2192de2808b243b3bdedb75e2d12] # # patch "guitone/src/view/MainWindow.cpp" # from [0435f875246bed0314bfd302474da8a54439af05] # to [b417e1f09b73f2fe7e20d21af5ad3bab56514604] # # patch "guitone/src/view/MainWindow.h" # from [0b2170c5443c725be8ef372eb01594d0060f34d6] # to [ef9b8ea99c77796eb4687b36e2bed3db284ea3ef] # ============================================================ --- guitone/guitone.pro 075c82e8b7911108d455b781f3130ea73f0b1935 +++ guitone/guitone.pro 3ce9bc2f593c8a7fd005a1a38c1dea7765f4de23 @@ -103,6 +103,8 @@ UI_DIR = tmp res/forms/databaseview.ui UI_DIR = tmp +OBJECTS_DIR = tmp +MOC_DIR = tmp DESTDIR = bin TRANSLATIONS = res/i18n/guitone_de.ts RESOURCES = res/guitone.qrc ============================================================ --- guitone/res/forms/main_window.ui bc2f72a85b69de8d4a2cf8f4c56d476f100e094a +++ guitone/res/forms/main_window.ui f270fec74606db1d3c15648b106e7f1815f9440d @@ -150,18 +150,6 @@ p, li { white-space: pre-wrap; } - - - Workspace - - - - - - Database - - - File @@ -188,6 +176,19 @@ p, li { white-space: pre-wrap; } + + + Workspace + + + + + + Database + + + + @@ -369,6 +370,20 @@ p, li { white-space: pre-wrap; } No previous databases available. + + + Changeset browser + + + Changeset browser + + + Changeset browser + + + Ctrl+B + + @@ -377,15 +392,15 @@ p, li { white-space: pre-wrap; }
../AttributesView.h
- Splitter - QSplitter -
../Splitter.h
-
- InventoryView QTreeView
../InventoryView.h
+ + Splitter + QSplitter +
../Splitter.h
+
============================================================ --- guitone/res/i18n/guitone_de.ts 629f55cd4e54fc2596e74c531708046869432003 +++ guitone/res/i18n/guitone_de.ts 939d94f230ac2192de2808b243b3bdedb75e2d12 @@ -1,6 +1,104 @@ + @default + + + 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... + + + + Select your database... + Wählen Sie eine Datenbank aus... + + + + monotone Databases (*.mtn *.db) + monotone-Datenbanken (*.mtn *.db) + + + + Loaded database: %1 + Geladene Datenbank: %1 + + + + No database loaded + Keine Datenbank geladen + + + + Hide ignored files + Ignorierte Dateien verstecken + + + + Show ignored files + Zeige ignorierte Dateien + + + + Expand tree + Baum aufklappen + + + + Collapse tree + Baum zuklappen + + + + No previous workspaces available. + Keine vorherigen Arbeitsbereiche verfügbar. + + + + &%1 %2 + &%1 %2 + + + + No previous databases available. + Keine vorherigen geöffneten Datenbanken verfügbar. + + + About @@ -21,7 +119,7 @@ Über guitone - + Close Schließen @@ -74,7 +172,7 @@ Branches - Zweige + Zweige @@ -156,27 +254,27 @@ DatabaseView - + Database Datenbank - + Update All Branches Alle Zweige aktualisieren - + All Changesets Alle Änderungen - + 50 More Changesets 50 weitere Änderungen - + Done Beenden @@ -185,6 +283,11 @@ Branches Zweige + + + ... + ... + FileDiffDialog @@ -194,27 +297,27 @@ Unterschiede in der Datei "%1" - + Show Version Zeige Version - + Left links - + Right rechts - + Both beide - + Close Schließen @@ -227,17 +330,17 @@ Neues Schlüsselpaar erzeugen - + Key ID (e.g. email) Schlüssel-ID (z.B. E-Mail) - + Password Passwort - + Repeat password Passwort wiederholen @@ -298,6 +401,14 @@ + Guitone + + + Show + Zeige + + + InventoryItem @@ -491,12 +602,12 @@ Schlüsselverwaltung - + Generate Keypair Schlüsselpaar erzeugen - + Close Schließen @@ -577,192 +688,192 @@ 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 @@ -777,67 +888,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. @@ -851,50 +962,60 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">guitone befindet sich im <span style=" font-weight:600;">Datenbank-Modus</span>. Das bedeutet, dass nur Teile der Funktionalität verfügbar sind. </p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sie können zum <span style=" font-weight:600;">Arbeitsbereich-Modus</span> jederzeit zurückkehren, indem Sie einen Arbeitsbereich laden.</p></body></ht ml> - + 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 + Monotone @@ -909,7 +1030,7 @@ p, li { white-space: pre-wrap; } Die Verbindung zum monotone-Prozess wurde beendet (Code %1). Prüfen Sie Ihre Konfiguration und laden Sie ggf. den Arbeitsbereich danach neu. - + The monotone process exited unexpectedly (process error %1). Please reconfigure the path to the monotone binary in the Preferences dialog or check if the version of the database you try to load matches the monotone version you are using. monotone returned: @@ -920,7 +1041,7 @@ monotone gab zurück: %2 - + The monotone process exited unexpectedly (return code %1). Please reconfigure the path to the monotone binary in the Preferences dialog or check if the version of the database you try to load matches the monotone version you are using. monotone returned: @@ -972,22 +1093,22 @@ monotone gab zurück: Einstellungen - + Path to monotone executable Pfad zur ausführbaren Datei von monotone - + Browse Durchsuchen - + OK OK - + Cancel Abbrechen @@ -995,12 +1116,12 @@ monotone gab zurück: RevisionDiff - + base revision Basis-Revision - + workspace revision Arbeitsbereich-Revision @@ -1013,7 +1134,7 @@ monotone gab zurück: Unterschiede in %1 zwischen %2 und %3 - + Close Schließen @@ -1029,7 +1150,7 @@ monotone gab zurück: SwitchWorkspaceRevision - + Switch Workspace Revision Arbeitsbereich auf andere Revision aktualisieren @@ -1084,7 +1205,7 @@ monotone gab zurück: Revision - + Invalid selection Ungültige Auswahl ============================================================ --- guitone/src/view/MainWindow.cpp 0435f875246bed0314bfd302474da8a54439af05 +++ guitone/src/view/MainWindow.cpp b417e1f09b73f2fe7e20d21af5ad3bab56514604 @@ -83,168 +83,11 @@ bool MainWindow::init() return false; } } - - // build the UI and all dependent objects - buildMenu(); - buildModelView(); - buildConnections(); - resize(Settings::getStartupSize("GuitoneStartupSize")); - setWindowState(Settings::getWindowState("GuitoneWindowState")); - - // load the most recent previous workspace, if there is any - QStringList list = Settings::getItemList("RecentWorkspaceList"); - if (list.size() > 0) - { - loadWorkspace(list[0]); - } - - return true; -} - -void Guitone::quit() -{ - delete this; - Settings::sync(); -} - -Guitone::~Guitone() {} - -void Guitone::buildMenu() -{ - QAction * act; - - menu = menuBar()->addMenu(tr("&File")); - menu->addAction( - tr("&Open Workspace"), - this, - SLOT(chooseWorkspace()), - Qt::CTRL + Qt::Key_O - ); - - - // load recent workspace list - wsSubMenu = menu->addMenu(tr("&Recent Workspaces")); - updatePreviousWorkspacesMenu(); - - menu->addAction("")->setSeparator(true); - - act = menu->addAction( - tr("&Preferences..."), - this, - SLOT(openPreferencesDialog()), - Qt::CTRL + Qt::Key_P - ); - act->setMenuRole(QAction::PreferencesRole); - - menu->addAction("")->setSeparator(true); - - menu->addAction( - tr("&Quit"), - this, - SLOT(close()), - Qt::CTRL + Qt::Key_Q - ); - - menu = menuBar()->addMenu(tr("&View")); - actShowHideIgnored = menu->addAction( - tr("Hide &ignored files"), - this, - SLOT(showHideIgnoredFiles()), - Qt::CTRL + Qt::Key_H - ); - - actGroupViewOptions = new QActionGroup(this); - actGroupViewOptions->setExclusive(true); - actGroupViewOptions->addAction(tr("Show"))->setSeparator(true); - act = actGroupViewOptions->addAction(tr("&All files")); - act->setChecked(true); - act->setShortcut(Qt::Key_A); - act->setData(QVariant(InventoryProxyModel::All)); - act = actGroupViewOptions->addAction(tr("All &changed files")); - act->setShortcut(Qt::Key_C); - act->setData(QVariant(InventoryProxyModel::Changed)); - act = actGroupViewOptions->addAction(tr("&Patched files")); - act->setShortcut(Qt::Key_P); - act->setData(QVariant(InventoryProxyModel::Patched)); - act = actGroupViewOptions->addAction(tr("A&dded files")); - act->setShortcut(Qt::Key_N); - act->setData(QVariant(InventoryProxyModel::Added)); - act = actGroupViewOptions->addAction(tr("R&emoved files")); - act->setShortcut(Qt::Key_D); - act->setData(QVariant(InventoryProxyModel::Dropped)); - act = actGroupViewOptions->addAction(tr("&Renamed files")); - act->setShortcut(Qt::Key_R); - act->setData(QVariant(InventoryProxyModel::Renamed)); - act = actGroupViewOptions->addAction(tr("&Missing files")); - act->setShortcut(Qt::Key_M); - act->setData(QVariant(InventoryProxyModel::Missing)); - act = actGroupViewOptions->addAction(tr("&Unknown files")); - act->setShortcut(Qt::Key_U); - act->setData(QVariant(InventoryProxyModel::Unknown)); - act = actGroupViewOptions->addAction(tr("I&gnored files")); - act->setShortcut(Qt::Key_I); - act->setData(QVariant(InventoryProxyModel::Ignored)); - menu->addActions(actGroupViewOptions->actions()); - - menu->addAction("")->setSeparator(true); - - actExpandCollapseTree = menu->addAction( - tr("E&xpand tree"), - this, - SLOT(expandCollapseTree()), - Qt::CTRL + Qt::Key_T - ); - actExpandCollapseTree->setData(QVariant(false)); - - menu = menuBar()->addMenu(tr("&Workspace")); - menu->addAction( - tr("&Switch revision"), - this, - SLOT(openSwitchWorkspaceRevisionDialog()), - Qt::CTRL + Qt::Key_R - ); - - menu->addAction( - tr("&Key Management"), - this, - SLOT(openKeyManagementDialog()), - Qt::CTRL + Qt::Key_K - ); - - actDatabase = menu->addAction( - tr("&Database"), - this, - SLOT(openDatabaseDialog()), - Qt::CTRL + Qt::Key_D - ); - actDatabase->setEnabled(false); - - menu = menuBar()->addMenu(tr("&Help")); - act = menu->addAction( - tr("About &guitone"), - this, - SLOT(aboutGuitone()) - ); - act->setMenuRole(QAction::AboutRole); - - act = menu->addAction( - tr("About &Qt"), - qApp, - SLOT(aboutQt()) - ); - act->setMenuRole(QAction::AboutQtRole); -} - -void Guitone::buildModelView() -{ // create the main models invModel = new Inventory(this); attrModel = new Attributes(this); - // Main view - mainSplitter = new Splitter(this, "mainSplitter"); - // ProxyModels proxyModelFolderTree = new InventoryProxyModel(this, true); proxyModelFileList = new InventoryProxyModel(this, false); @@ -254,27 +97,31 @@ void Guitone::buildModelView() // tree and list views treeView->setType(InventoryView::FolderTree); treeView->setModel(proxyModelFolderTree); - - - listView = new InventoryView( - listSplitter, - InventoryView::FileList, - "inventoryListView" - ); - listView->setModel(proxyModelFileList); + listView->setType(InventoryView::FileList); + listView->setModel(proxyModelFileList); attrView->setModel(attrModel); - listView->setType(InventoryView::FileList); + // query attributes on click connect( treeView, SIGNAL(clicked(const QModelIndex &)), attrModel, SLOT(readAttributes(const QModelIndex &)) + ); + connect( + listView, SIGNAL(clicked(const QModelIndex &)), + attrModel, SLOT(readAttributes(const QModelIndex &)) + ); + + // filelist/tree synchronization + connect( + treeView, SIGNAL(directoryChanged(const QModelIndex &)), listView, SLOT(changeDirectory(const QModelIndex &)) ); - connect( + connect( listView, SIGNAL(directoryChanged(const QModelIndex &)), treeView, SLOT(changeDirectory(const QModelIndex &)) ); - + + // load recent workspace and database lists updatePreviousWorkspacesMenu(); updatePreviousDatabasesMenu(); @@ -296,8 +143,8 @@ void Guitone::buildModelView() mainSplitter->init(); listSplitter->init(); - // FIXME: doesn't really work... - resize(Settings::getStartupSize()); + resize(Settings::getStartupSize("MainWindow")); + setWindowState(Settings::getWindowState("MainWindow")); // load the most recent previous workspace, if there is any QStringList list = Settings::getItemList("RecentWorkspaceList"); @@ -311,7 +158,7 @@ MainWindow::~MainWindow() {} MainWindow::~MainWindow() {} -void Guitone::quit() +void MainWindow::quit() { delete this; Settings::sync(); @@ -385,13 +232,21 @@ void MainWindow::loadWorkspace(QString f statusBar()->showMessage(tr("Loading workspace..."), 2000 ); } -void Guitone::resizeEvent ( QResizeEvent * event ) +void MainWindow::resizeEvent(QResizeEvent * event) { - if(windowState() == Qt::WindowNoState) + if (windowState() == Qt::WindowNoState) curSize = size(); event->accept(); } +void MainWindow::closeEvent(QCloseEvent *event) +{ + // Do some cleanup before closing down the application + Settings::setStartupSize("MainWindow", size()); + Settings::setWindowState("MainWindow", windowState()); + event->accept(); +} + void MainWindow::on_actionOpen_Database_triggered() { QString fn = QFileDialog::getOpenFileName( @@ -460,7 +315,6 @@ void MainWindow::switchMode(Mode m) } emit modeChanged(mode); - event->accept(); } void MainWindow::on_actionHide_ignored_files_triggered() @@ -592,10 +446,15 @@ void MainWindow::on_actionKey_management dialog.exec(); } -void Guitone:: openDatabaseDialog() +void MainWindow:: on_actionChangeset_browser_triggered() { DatabaseView dialog(this); dialog.exec(); } void MainWindow::on_actionAbout_guitone_triggered() +{ + About dialog(this); + dialog.exec(); +} + ============================================================ --- guitone/src/view/MainWindow.h 0b2170c5443c725be8ef372eb01594d0060f34d6 +++ guitone/src/view/MainWindow.h ef9b8ea99c77796eb4687b36e2bed3db284ea3ef @@ -55,6 +55,7 @@ private slots: void on_actionKey_management_triggered(); void on_actionPreferences_triggered(); void on_actionAbout_guitone_triggered(); + void on_actionChangeset_browser_triggered(); void openRecentWorkspace(); void openRecentDatabase(); @@ -63,7 +64,7 @@ private: private: void closeEvent(QCloseEvent *); - void resizeEvent ( QResizeEvent * event ); + void resizeEvent(QResizeEvent * event); void loadWorkspace(QString); void loadDatabase(QString); void updatePreviousWorkspacesMenu();