#
#
# add_file "guitone/res/forms/update_workspace.ui"
# content [1ab451b897d3cddd3b4cf6db68fba93b142d7be5]
#
# add_file "guitone/src/view/dialogs/UpdateWorkspace.cpp"
# content [25d5930928059b8c5db520cb75f02bbac4d2d5b6]
#
# add_file "guitone/src/view/dialogs/UpdateWorkspace.h"
# content [c72f6ca89fb849509f78100e1ec8fbc1a66b784d]
#
# patch "guitone/guitone.pro"
# from [9ebc42d07689cc1a688bb1b3b59fa027eb719c9f]
# to [a46fa7cdfef3740b8fceb5a2a3f5eac59022fad3]
#
# patch "guitone/res/forms/main_window.ui"
# from [b611a237125bf81911e87b6863d35f9c9c6785f5]
# to [87c7b9624d5313b903ee17c3ff2f705c2d87a10d]
#
# patch "guitone/src/view/MainWindow.cpp"
# from [53885e5bcb6e34f8f84e133ebbb776be81b5ac06]
# to [090b8fbed5df13a3ab5e68a2842af16a9c104dc9]
#
# patch "guitone/src/view/MainWindow.h"
# from [bf1f12efde46c96a0194070d00a9677c8f29e0cd]
# to [19ab975f98d2d7f1ff87767bc6ed01a8fec7008b]
#
============================================================
--- guitone/res/forms/update_workspace.ui 1ab451b897d3cddd3b4cf6db68fba93b142d7be5
+++ guitone/res/forms/update_workspace.ui 1ab451b897d3cddd3b4cf6db68fba93b142d7be5
@@ -0,0 +1,258 @@
+
+ UpdateWorkspace
+
+
+
+ 0
+ 0
+ 475
+ 265
+
+
+
+
+ 5
+ 0
+ 0
+ 0
+
+
+
+
+ 0
+ 265
+
+
+
+
+ 16777215
+ 265
+
+
+
+ Update workspace
+
+
+ :/icons/guitone.png
+
+
+
+ 9
+
+
+ 6
+
+ -
+
+
+ 0
+
+
+ 6
+
+
-
+
+
+ Update the current workspace to
+
+
+
+ 9
+
+
+ 6
+
+
-
+
+
+ 0
+
+
+ 6
+
+
-
+
+
+ the latest revision (branch: %1)
+
+
+ true
+
+
+
+ -
+
+
+ 0
+
+
+ 6
+
+
-
+
+
+ the head of branch
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ 0
+
+
+ 6
+
+
-
+
+
+ the tag
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ 0
+
+
+ 3
+
+
-
+
+
+ an individual revision (selectors allowed)
+
+
+
+ -
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
+ -
+
+
+ -
+
+
+ select revision
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ UpdateWorkspace
+ accept()
+
+
+ 237
+ 235
+
+
+ 237
+ 130
+
+
+
+
+ buttonBox
+ rejected()
+ UpdateWorkspace
+ reject()
+
+
+ 237
+ 235
+
+
+ 237
+ 130
+
+
+
+
+
============================================================
--- guitone/src/view/dialogs/UpdateWorkspace.cpp 25d5930928059b8c5db520cb75f02bbac4d2d5b6
+++ guitone/src/view/dialogs/UpdateWorkspace.cpp 25d5930928059b8c5db520cb75f02bbac4d2d5b6
@@ -0,0 +1,65 @@
+/***************************************************************************
+ * Copyright (C) 2007 by Thomas Keller *
+ * address@hidden *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#include "UpdateWorkspace.h"
+#include "SelectRevision.h"
+
+#include
+
+UpdateWorkspace::UpdateWorkspace(QWidget* parent)
+ : Dialog(parent)
+{
+ setupUi(this);
+ Dialog::init();
+
+ // OSX sheet-alike dialog
+ setWindowFlags(Qt::Sheet);
+
+ // create the models
+ selectorModel = new Select(this);
+ branchesModel = new Branches(false, this);
+ tagsModel = new Tags(this);
+
+ connect(
+ selectRevision, SIGNAL(clicked()),
+ this, SLOT(openSelectRevision())
+ );
+}
+
+UpdateWorkspace::~UpdateWorkspace()
+{
+ delete selectorModel;
+ delete branchesModel;
+ delete tagsModel;
+}
+
+void UpdateWorkspace::openSelectRevision()
+{
+ hide();
+
+ SelectRevision dlg(parentWidget());
+ if (dlg.execDocumentModal() == QDialog::Accepted)
+ {
+ selectedRevision->setText(dlg.getSelectedRevision());
+ }
+
+ show();
+}
+
============================================================
--- guitone/src/view/dialogs/UpdateWorkspace.h c72f6ca89fb849509f78100e1ec8fbc1a66b784d
+++ guitone/src/view/dialogs/UpdateWorkspace.h c72f6ca89fb849509f78100e1ec8fbc1a66b784d
@@ -0,0 +1,53 @@
+/***************************************************************************
+ * Copyright (C) 2007 by Thomas Keller *
+ * address@hidden *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifndef UPDATE_WORKSPACE_H
+#define UPDATE_WORKSPACE_H
+
+#include "Dialog.h"
+#include "ui_update_workspace.h"
+#include "Select.h"
+#include "Branches.h"
+#include "Tags.h"
+
+#include
+
+class UpdateWorkspace : public Dialog, private Ui::UpdateWorkspace
+{
+ Q_OBJECT
+
+public:
+ UpdateWorkspace(QWidget *);
+ ~UpdateWorkspace();
+ inline QString getSelectedRevision() const { return selectedRevisionId; }
+
+private:
+ Select * selectorModel;
+ Branches * branchesModel;
+ Tags * tagsModel;
+ QCompleter * selectorCompleter;
+
+ QString selectedRevisionId;
+
+private slots:
+ void openSelectRevision();
+};
+
+#endif
============================================================
--- guitone/guitone.pro 9ebc42d07689cc1a688bb1b3b59fa027eb719c9f
+++ guitone/guitone.pro a46fa7cdfef3740b8fceb5a2a3f5eac59022fad3
@@ -21,6 +21,7 @@ HEADERS += src/view/MainWindow.h \
src/view/DiffStatusView.h \
src/view/dialogs/Dialog.h \
src/view/dialogs/SelectRevision.h \
+ src/view/dialogs/UpdateWorkspace.h \
src/view/dialogs/Preferences.h \
src/view/dialogs/FileDiff.h \
src/view/dialogs/RevisionDiff.h \
@@ -67,6 +68,7 @@ SOURCES += src/view/MainWindow.cpp \
src/view/DiffStatusView.cpp \
src/view/dialogs/Dialog.cpp \
src/view/dialogs/SelectRevision.cpp \
+ src/view/dialogs/UpdateWorkspace.cpp \
src/view/dialogs/Preferences.cpp \
src/view/dialogs/FileDiff.cpp \
src/view/dialogs/RevisionDiff.cpp \
@@ -107,6 +109,7 @@ FORMS += res/forms/select_revision.ui
src/main.cpp
FORMS += res/forms/select_revision.ui \
+ res/forms/update_workspace.ui \
res/forms/preferences.ui \
res/forms/file_diff.ui \
res/forms/revision_diff.ui \
============================================================
--- guitone/res/forms/main_window.ui b611a237125bf81911e87b6863d35f9c9c6785f5
+++ guitone/res/forms/main_window.ui 87c7b9624d5313b903ee17c3ff2f705c2d87a10d
@@ -168,12 +168,6 @@ You can switch back to the workspace mod
-
+
@@ -355,10 +355,16 @@ You can switch back to the workspace mod
Ctrl+T
-
+
- Switch revision
+ Update workspace
+
+ Update workspace
+
+
+ Update workspace
+
Ctrl+R
@@ -433,14 +439,14 @@ You can switch back to the workspace mod
- InventoryView
+ AttributesView
QTreeView
-
+
- AttributesView
+ InventoryView
QTreeView
-
+
============================================================
--- guitone/src/view/MainWindow.cpp 53885e5bcb6e34f8f84e133ebbb776be81b5ac06
+++ guitone/src/view/MainWindow.cpp 090b8fbed5df13a3ab5e68a2842af16a9c104dc9
@@ -27,7 +27,7 @@
#include "Splitter.h"
#include "InventoryView.h"
#include "AttributesView.h"
-#include "SelectRevision.h"
+#include "UpdateWorkspace.h"
#include "Preferences.h"
#include "KeyManagement.h"
#include "About.h"
@@ -452,12 +452,10 @@ void MainWindow::updatePreviousDatabases
}
}
-void MainWindow::on_actionSwitch_revision_triggered()
+void MainWindow::on_actionUpdate_workspace_triggered()
{
- // TODO: connect Inventory with the accept() signal here somehow
- // before this works, we obviously need a separate update command
- // wrapper which signals us that we can re-read the inventory...
- SelectRevision dialog(this);
+ // TODO: of course the actual update...
+ UpdateWorkspace dialog(this);
dialog.execDocumentModal();
}
============================================================
--- guitone/src/view/MainWindow.h bf1f12efde46c96a0194070d00a9677c8f29e0cd
+++ guitone/src/view/MainWindow.h 19ab975f98d2d7f1ff87767bc6ed01a8fec7008b
@@ -51,7 +51,7 @@ private slots:
void on_actionHide_ignored_files_triggered();
void on_menuShow_triggered(QAction *);
void on_actionExpand_tree_triggered();
- void on_actionSwitch_revision_triggered();
+ void on_actionUpdate_workspace_triggered();
void on_actionKey_management_triggered();
void on_actionPreferences_triggered();
void on_actionAbout_guitone_triggered();