Merged new workspace

FossilOrigin-Name: 322729110f48bfb8c007dd611d47e411b389044a
This commit is contained in:
kostas 2015-05-26 18:03:05 +00:00
commit fd78c68541
33 changed files with 4328 additions and 2313 deletions

189
fuel.pro
View File

@ -1,87 +1,102 @@
#-------------------------------------------------
# Fuel
#-------------------------------------------------
QT += core gui webkit
contains(QT_VERSION, ^5\\..*) {
QT += widgets webkitwidgets
}
TARGET = Fuel
TEMPLATE = app
win32 {
RC_FILE = rsrc/fuel.rc
LIBS += -luser32 -lshell32 -luuid
}
macx {
ICON = rsrc/icons/fuel.icns
}
unix:!macx {
TARGET = fuel
ICON = rsrc/icons/fuel.png
PREFIX = /usr
BINDIR = $$PREFIX/bin
DATADIR = $$PREFIX/share
target.path = $$BINDIR
desktop.path = $$DATADIR/applications
desktop.files += rsrc/fuel.desktop
icon.path = $$DATADIR/icons/hicolor/256x256/apps
icon.files += rsrc/icons/fuel.png
INSTALLS += target desktop icon
system(intl/convert.sh)
}
INCLUDEPATH += src
SOURCES += src/main.cpp\
src/MainWindow.cpp \
src/CommitDialog.cpp \
src/FileActionDialog.cpp \
src/SettingsDialog.cpp \
src/Utils.cpp \
src/FileTableView.cpp \
src/CloneDialog.cpp \
src/LoggedProcess.cpp \
src/BrowserWidget.cpp \
src/CustomWebView.cpp
HEADERS += src/MainWindow.h \
src/CommitDialog.h \
src/FileActionDialog.h \
src/SettingsDialog.h \
src/Utils.h \
src/FileTableView.h \
src/CloneDialog.h \
src/LoggedProcess.h \
src/BrowserWidget.h \
src/CustomWebView.h
FORMS += ui/MainWindow.ui \
ui/CommitDialog.ui \
ui/FileActionDialog.ui \
ui/SettingsDialog.ui \
ui/CloneDialog.ui \
ui/BrowserWidget.ui
RESOURCES += \
rsrc/resources.qrc
CODECFORTR = UTF-8
TRANSLATIONS += \
intl/en_US.ts \
intl/el_GR.ts \
intl/de_DE.ts \
intl/es_ES.ts \
intl/fr_FR.ts \
intl/ru_RU.ts \
intl/pt_PT.ts
#-------------------------------------------------
# Fuel
#-------------------------------------------------
QT = core gui webkit
contains(QT_VERSION, ^5\\..*) {
QT += widgets webkitwidgets
QT -= quick multimediawidgets opengl printsupport qml multimedia positioning sensors
}
TARGET = Fuel
TEMPLATE = app
win32 {
RC_FILE = rsrc/fuel.rc
LIBS += -luser32 -lshell32 -luuid
}
macx {
ICON = rsrc/icons/fuel.icns
}
unix:!macx {
TARGET = fuel
ICON = rsrc/icons/fuel.png
PREFIX = /usr
BINDIR = $$PREFIX/bin
DATADIR = $$PREFIX/share
target.path = $$BINDIR
desktop.path = $$DATADIR/applications
desktop.files += rsrc/fuel.desktop
icon.path = $$DATADIR/icons/hicolor/256x256/apps
icon.files += rsrc/icons/fuel.png
INSTALLS += target desktop icon
system(intl/convert.sh)
}
INCLUDEPATH += src
SOURCES += src/main.cpp\
src/MainWindow.cpp \
src/CommitDialog.cpp \
src/FileActionDialog.cpp \
src/SettingsDialog.cpp \
src/FslSettingsDialog.cpp \
src/CloneDialog.cpp \
src/RevisionDialog.cpp \
src/Utils.cpp \
src/FileTableView.cpp \
src/LoggedProcess.cpp \
src/BrowserWidget.cpp \
src/CustomWebView.cpp \
src/Fossil.cpp \
src/Workspace.cpp \
src/SearchBox.cpp \
src/Settings.cpp
HEADERS += src/MainWindow.h \
src/CommitDialog.h \
src/FileActionDialog.h \
src/SettingsDialog.h \
src/FslSettingsDialog.h \
src/CloneDialog.h \
src/RevisionDialog.h \
src/Utils.h \
src/FileTableView.h \
src/LoggedProcess.h \
src/BrowserWidget.h \
src/CustomWebView.h \
src/Fossil.h \
src/Workspace.h \
src/SearchBox.h \
src/Settings.h
FORMS += ui/MainWindow.ui \
ui/CommitDialog.ui \
ui/FileActionDialog.ui \
ui/SettingsDialog.ui \
ui/FslSettingsDialog.ui \
ui/CloneDialog.ui \
ui/BrowserWidget.ui \
ui/RevisionDialog.ui
RESOURCES += \
rsrc/resources.qrc
CODECFORTR = UTF-8
TRANSLATIONS += \
intl/en_US.ts \
intl/el_GR.ts \
intl/de_DE.ts \
intl/es_ES.ts \
intl/fr_FR.ts \
intl/ru_RU.ts \
intl/pt_PT.ts

View File

@ -1,5 +1,5 @@
C Set\sversion\sto\s1.0.1
D 2015-05-12T18:18:33.512
C Merged\snew\sworkspace
D 2015-05-26T18:03:05.443
F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35
F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
@ -15,7 +15,7 @@ F dist/win/fuel.iss ef3558dbba409eb194938b930377fc9ee27d319e
F doc/Building.txt 17b43fa23da764b5d1b828cc48c5a95e612bbd8f
F doc/Changes.txt b03302545e4a6c0b16a30d623a7627f8aef65ef6
F doc/License.txt 4cc77b90af91e615a64ae04893fdffa7939db84c
F fuel.pro 844a18c3faf5239e0d0025d8b7feac3900c28e71
F fuel.pro b010c4ee3093112003a9d27045927efce5985dab
F intl/convert.bat 4222ae403418381452b843929d15259ea9850ab1 x
F intl/convert.sh 2ca2179ff53e727f241925b75e19182607883c45 x
F intl/de_DE.ts e2faceab920ac60c97bbc6fba038e261d51fc741
@ -183,37 +183,52 @@ F rsrc/icons/Zoom-01.png 67ca532922e9166325c5c75fce1ca3fbb0d2b6a6
F rsrc/icons/fuel.icns 81e535004b62db801a02f3e15d0a33afc9d4070b
F rsrc/icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038
F rsrc/icons/fuel.png 40daf53b7f6bdcdd0d6aa5ef433d078ec5ea4342
F rsrc/resources.qrc 4098be128fd6c045db933d041fe8844b14643a6f
F rsrc/resources.qrc 388225a5b09c56c12d4cbde8b4d0b4466740fc97
F src/BrowserWidget.cpp 8b8f545cdff4a4188edc698a1b4777f5df46f056
F src/BrowserWidget.h 764d66aa9a93b890298bd0301097739cb4e16597
F src/CloneDialog.cpp 812ef7d361c16da21540b7047c9d4d5e74f18539
F src/CloneDialog.h e9f0fc8e5cc5ea2e7c43d6e77b5c4a9cc850b59e
F src/CommitDialog.cpp 5300522ac11bc1096a11a6ce22f8c1665d4afc05
F src/CommitDialog.h f1ee8db92103164e7db55a8407ccdcff24571b72
F src/CloneDialog.cpp 4fc5aa8146ac63ba6ba7341b1635b3025819d708
F src/CloneDialog.h 8813d91f893eb3eb86a4ea5e50f9a53a0ea07047
F src/CommitDialog.cpp bbf5fe1c66d28068cc3fd061f4f9f1faa9e89196
F src/CommitDialog.h 921bf27c0c538ab9e9d6bdc750064337d346270b
F src/CustomWebView.cpp b7dd0c41977c2cba005df07ed8967ba6f58d07d9
F src/CustomWebView.h fbc8ee55812d1acb3c3b2bc31be7533e8a112822
F src/FileActionDialog.cpp fcaebf9986f789b3440d5390b3458ad5f86fe0c8
F src/FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce
F src/FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2
F src/FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df
F src/Fossil.cpp 0d4c50327a61c48506d2d45e28cd6f71f1697ea2
F src/Fossil.h 31765ef57e20a860914372d56c024033b30aa765
F src/FslSettingsDialog.cpp f5a34a70ecb0560d2b6eea6bf27e42048548aedd
F src/FslSettingsDialog.h dfe2a61884a55a74cbb9206b6f6b482b979725e7
F src/LoggedProcess.cpp 2a1e5c94bc1e57c8984563e66c210e43a14dc60c
F src/LoggedProcess.h 85df7c635c807a5a0e8c4763f17a0752aaff7261
F src/MainWindow.cpp 6758e29796f411f920a0a59ece5002e4aeefd9f2
F src/MainWindow.h 77038e9c9fe8a64a1c2dfb8d4c2be7558ab5f372
F src/SettingsDialog.cpp a46cff5e5dd425e3dbdd15632abfd5829f5562b4
F src/SettingsDialog.h 4e2790f581e991c744ae9f86580f1972b8c7ff43
F src/Utils.cpp 9aff456712e4276b49083426301b3b96d3819c77
F src/Utils.h c546e478a1225a28c99cd4c30f70cf9be9804a2a
F src/main.cpp e1217b2331f1b0fd30756fc80a72f9676f09cf6b
F src/MainWindow.cpp 4cbfa1fdf3092b97649711388576230e4808d50e
F src/MainWindow.h a848462f21423b5c1e0c218cab1805c308299607
F src/RevisionDialog.cpp 51065c65a07c118dd1a7363da4a55a135d1c6c9c
F src/RevisionDialog.h b718c3009342eaabad39c8a11a253a4e4fef7a73
F src/SearchBox.cpp d4209c575baa9933e1ce5ed376e785b289a145ba
F src/SearchBox.h 0c78d3a68136dab3e0e71b83ae36f22bd2688ab2
F src/Settings.cpp 6ab826273b9693bfcd65f0f59b550ae2aa3577f1
F src/Settings.h 1ff8bb71e19949150e8caa4f5e5f13f8810e496b
F src/SettingsDialog.cpp 25be4c351dd21ea9132321944f42dc0bc22fb128
F src/SettingsDialog.h b324dfd77ca3ad24fd83588aaf79a7e4c291e716
F src/Utils.cpp c48e3316f3a0a5d735e8d4953710500358985e32
F src/Utils.h c2a28611bd77fb35ea3dcf65fb60ed585f68aa3c
F src/Workspace.cpp f68a4ca05d1b7c5c345fbd89527691813593c663
F src/Workspace.h d6649a3ae1cd0fbad55237030313e85530417271
F src/main.cpp d8c65ea5e54102e4989fef9fd8cfd4f13ef8a8f0
F tools/git-push.sh 62cc58434cae5b7bcd6bd9d4cce8b08739f31cd7 x
F tools/pack.sh d7f38a498c4e9327fecd6a6e5ac27be270d43008 x
F ui/BrowserWidget.ui 5ad98b13773afadb20a1a2c22148aaebe5dbd95d
F ui/BrowserWidget.ui 994ad9ea0e9f5815d6b1a27acc2f6f39164c507f
F ui/CloneDialog.ui 4886e7d4f258ea8b852b5eefc860396e35145712
F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f
F ui/CommitDialog.ui aea77347eef82b6b591f31fb058a1bb96193c728
F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d
F ui/MainWindow.ui 8677f5c8bca5bf7561d5f64bfdd0cef5157c6ac7
F ui/SettingsDialog.ui 2b7c2870e0054b0f4106f495d85d02c0b814df8b
P 964b28f34fae482959ce8a96cbc6106f8702fb33
R 52b73271a5ba6efcdf8cd8ac7e8910df
F ui/FslSettingsDialog.ui 042717833d8efea905b4fc380bad580be809717d
F ui/MainWindow.ui 2d36b1ba9886356802f2cddf12c4cabb5ee1acde
F ui/RevisionDialog.ui 27c3b98c665fec014a50cbf3352c0627f75e68cd
F ui/SettingsDialog.ui 4c480cd595a32664d01c85bf74845c4282fc0068
P e2ba8f0aba679a1c52d36daf3041cd139bd49579 7ebac37b3255e6721889c070b7327a96c63b6c97
R 8f806c4029c039de40ed9c8c7d5c5dca
T +closed 7ebac37b3255e6721889c070b7327a96c63b6c97
U kostas
Z e4adddbe2917b1cd621d67e57ca27d42
Z 0150f2a9d78e86830f0a9f5b26438204

View File

@ -1 +1 @@
e2ba8f0aba679a1c52d36daf3041cd139bd49579
322729110f48bfb8c007dd611d47e411b389044a

View File

@ -1,163 +1,167 @@
<RCC>
<qresource prefix="/icons">
<file>icons/Address Book-01.png</file>
<file>icons/Adobe Illustrator CS3 Document-01.png</file>
<file>icons/Adobe PDF Document-01.png</file>
<file>icons/Adobe Photoshop CS3 Document-01.png</file>
<file>icons/Battery-01.png</file>
<file>icons/Binoculars-01.png</file>
<file>icons/Book-01.png</file>
<file>icons/Briefcase-01.png</file>
<file>icons/Button Add-01.png</file>
<file>icons/Button Blank Blue-01.png</file>
<file>icons/Button Blank Gray-01.png</file>
<file>icons/Button Blank Green-01.png</file>
<file>icons/Button Blank Red-01.png</file>
<file>icons/Button Blank Yellow-01.png</file>
<file>icons/Button Cancel-01.png</file>
<file>icons/Button Close-01.png</file>
<file>icons/Button Delete-01.png</file>
<file>icons/Button Download-01.png</file>
<file>icons/Button Favorite-01.png</file>
<file>icons/Button Forward-01.png</file>
<file>icons/Button Help-01.png</file>
<file>icons/Button Info-01.png</file>
<file>icons/Button Log Off-01.png</file>
<file>icons/Button Next-01.png</file>
<file>icons/Button Pause-01.png</file>
<file>icons/Button Play-01.png</file>
<file>icons/Button Previous-01.png</file>
<file>icons/Button Refresh-01.png</file>
<file>icons/Button Reload-01.png</file>
<file>icons/Button Reminder-01.png</file>
<file>icons/Button Rewind-01.png</file>
<file>icons/Button Talk Balloon-01.png</file>
<file>icons/Button Turn Off-01.png</file>
<file>icons/Button Turn On-01.png</file>
<file>icons/Button Upload-01.png</file>
<file>icons/Button Warning-01.png</file>
<file>icons/Calculator-01.png</file>
<file>icons/Calendar Blue-01.png</file>
<file>icons/Calendar Green-01.png</file>
<file>icons/Calendar Red-01.png</file>
<file>icons/Clipboard-01.png</file>
<file>icons/Clipboard Paste-01.png</file>
<file>icons/Clock-01.png</file>
<file>icons/Coin-01.png</file>
<file>icons/Compressed File RAR-01.png</file>
<file>icons/Compressed File SIT-01.png</file>
<file>icons/Compressed File Zip-01.png</file>
<file>icons/Computer Monitor-01.png</file>
<file>icons/Computer Network-01.png</file>
<file>icons/Document-01.png</file>
<file>icons/Document Attach-01.png</file>
<file>icons/Document Blank-01.png</file>
<file>icons/Document Chart-01.png</file>
<file>icons/Document Copy-01.png</file>
<file>icons/Document Flow Chart-01.png</file>
<file>icons/Document Gant Chart-01.png</file>
<file>icons/Document Help-01.png</file>
<file>icons/Document Line Chart-01.png</file>
<file>icons/Document Microsoft Excel-01.png</file>
<file>icons/Document Microsoft PowerPoint-01.png</file>
<file>icons/Document Microsoft Word-01.png</file>
<file>icons/Document Organization Chart-01.png</file>
<file>icons/Document Preview-01.png</file>
<file>icons/Document-Revert-icon.png</file>
<file>icons/Document Text-01.png</file>
<file>icons/Edit Document-01.png</file>
<file>icons/Email-01.png</file>
<file>icons/Email Attachment-01.png</file>
<file>icons/Email Delete-01.png</file>
<file>icons/Email Download-01.png</file>
<file>icons/Email Forward-01.png</file>
<file>icons/Email Inbox-01.png</file>
<file>icons/Email Reply-01.png</file>
<file>icons/File Audio-01.png</file>
<file>icons/File Audio AIFF-01.png</file>
<file>icons/File Audio MP3-01.png</file>
<file>icons/File Audio WAV-01.png</file>
<file>icons/File Audio WMA-01.png</file>
<file>icons/File Delete-01.png</file>
<file>icons/File History-01.png</file>
<file>icons/File New-01.png</file>
<file>icons/File Open-01.png</file>
<file>icons/File Video 3GP-01.png</file>
<file>icons/File Video-01.png</file>
<file>icons/File Video AVI-01.png</file>
<file>icons/File Video MOV-01.png</file>
<file>icons/File Video MPEG-01.png</file>
<file>icons/File Video WMV-01.png</file>
<file>icons/Folder-01.png</file>
<file>icons/Folder Add-01.png</file>
<file>icons/Folder Compressed-01.png</file>
<file>icons/Folder Delete-01.png</file>
<file>icons/Folder Explorer-01.png</file>
<file>icons/Folder Generic Blue-01.png</file>
<file>icons/Folder Generic Green-01.png</file>
<file>icons/Folder Generic Red-01.png</file>
<file>icons/Folder Generic Silver-01.png</file>
<file>icons/Folder Open-01.png</file>
<file>icons/Folder RAR-01.png</file>
<file>icons/Games-01.png</file>
<file>icons/Gear-01.png</file>
<file>icons/Highlighter Blue-01.png</file>
<file>icons/Highlighter Green-01.png</file>
<file>icons/Highlighter Yellow-01.png</file>
<file>icons/Image BMP-01.png</file>
<file>icons/Image GIF-01.png</file>
<file>icons/Image JPEG-01.png</file>
<file>icons/Image PNG-01.png</file>
<file>icons/Image TIFF-01.png</file>
<file>icons/Lock Lock-01.png</file>
<file>icons/Lock Unlock-01.png</file>
<file>icons/My Documents-01.png</file>
<file>icons/My Ebooks-01.png</file>
<file>icons/My Music-01.png</file>
<file>icons/My Pictures.png</file>
<file>icons/My Videos-01.png</file>
<file>icons/My Websites-01.png</file>
<file>icons/Network Firewall-01.png</file>
<file>icons/Network MAC-01.png</file>
<file>icons/Network PC-01.png</file>
<file>icons/Network Refresh-01.png</file>
<file>icons/Pen Blue-01.png</file>
<file>icons/Pen Green-01.png</file>
<file>icons/Pen Red-01.png</file>
<file>icons/Save-01.png</file>
<file>icons/Text Edit.png</file>
<file>icons/USB-01.png</file>
<file>icons/User Administrator Blue-01.png</file>
<file>icons/User Administrator Green-01.png</file>
<file>icons/User Administrator Red-01.png</file>
<file>icons/User Chat-01.png</file>
<file>icons/User Clients-01.png</file>
<file>icons/User Coat Blue-01.png</file>
<file>icons/User Coat Green-01.png</file>
<file>icons/User Coat Red-01.png</file>
<file>icons/User Executive Blue-01.png</file>
<file>icons/User Executive Green-01.png</file>
<file>icons/User Executive Red-01.png</file>
<file>icons/User Group-01.png</file>
<file>icons/User Preppy Blue-01.png</file>
<file>icons/User Preppy Green-01.png</file>
<file>icons/User Preppy Red-01.png</file>
<file>icons/Web HTML-01.png</file>
<file>icons/Web XML-01.png</file>
<file>icons/Window-01.png</file>
<file>icons/Window Refresh-01.png</file>
<file>icons/Windows-01.png</file>
<file>icons/Windows Cascade-01.png</file>
<file>icons/Zoom-01.png</file>
<file>icons/Zoom In-01.png</file>
<file>icons/Zoom Out-01.png</file>
</qresource>
<qresource prefix="/intl">
<file>intl/el_GR.qm</file>
<file>intl/de_DE.qm</file>
<file>intl/es_ES.qm</file>
<file>intl/fr_FR.qm</file>
<file>intl/ru_RU.qm</file>
<file>intl/pt_PT.qm</file>
</qresource>
<qresource prefix="/icons">
<file>icons/Address Book-01.png</file>
<file>icons/Adobe Illustrator CS3 Document-01.png</file>
<file>icons/Adobe PDF Document-01.png</file>
<file>icons/Adobe Photoshop CS3 Document-01.png</file>
<file alias="icon-application">icons/Battery-01.png</file>
<file>icons/Binoculars-01.png</file>
<file alias="icon-item-tag">icons/Book-01.png</file>
<file>icons/Briefcase-01.png</file>
<file alias="icon-item-added">icons/Button Add-01.png</file>
<file>icons/Button Blank Blue-01.png</file>
<file alias="icon-item-unknown">icons/Button Blank Gray-01.png</file>
<file alias="icon-item-unchanged">icons/Button Blank Green-01.png</file>
<file alias="icon-item-conflicted">icons/Button Blank Red-01.png</file>
<file alias="icon-item-edited">icons/Button Blank Yellow-01.png</file>
<file>icons/Button Cancel-01.png</file>
<file alias="icon-item-deleted">icons/Button Close-01.png</file>
<file alias="icon-action-tag-delete">icons/Button Close-01.png</file>
<file alias="icon-action-stop">icons/Button Close-01.png</file>
<file>icons/Button Delete-01.png</file>
<file alias="icon-action-pull">icons/Button Download-01.png</file>
<file>icons/Button Favorite-01.png</file>
<file>icons/Button Forward-01.png</file>
<file alias="icon-item-missing">icons/Button Help-01.png</file>
<file>icons/Button Info-01.png</file>
<file>icons/Button Log Off-01.png</file>
<file alias="icon-action-next">icons/Button Next-01.png</file>
<file>icons/Button Pause-01.png</file>
<file alias="icon-action-update">icons/Button Play-01.png</file>
<file alias="icon-action-previous">icons/Button Previous-01.png</file>
<file alias="icon-action-refresh">icons/Button Refresh-01.png</file>
<file alias="icon-action-undo">icons/Button Reload-01.png</file>
<file alias="icon-item-renamed">icons/Button Reload-01.png</file>
<file>icons/Button Reminder-01.png</file>
<file alias="icon-action-revert">icons/Button Rewind-01.png</file>
<file>icons/Button Talk Balloon-01.png</file>
<file alias="icon-action-quit">icons/Button Turn Off-01.png</file>
<file>icons/Button Turn On-01.png</file>
<file alias="icon-action-push">icons/Button Upload-01.png</file>
<file>icons/Button Warning-01.png</file>
<file>icons/Calculator-01.png</file>
<file>icons/Calendar Blue-01.png</file>
<file>icons/Calendar Green-01.png</file>
<file>icons/Calendar Red-01.png</file>
<file>icons/Clipboard-01.png</file>
<file>icons/Clipboard Paste-01.png</file>
<file alias="icon-action-timeline">icons/Clock-01.png</file>
<file>icons/Coin-01.png</file>
<file>icons/Compressed File RAR-01.png</file>
<file>icons/Compressed File SIT-01.png</file>
<file>icons/Compressed File Zip-01.png</file>
<file>icons/Computer Monitor-01.png</file>
<file>icons/Computer Network-01.png</file>
<file alias="icon-item-file">icons/Document-01.png</file>
<file>icons/Document Attach-01.png</file>
<file alias="icon-action-repo-new">icons/Document Blank-01.png</file>
<file>icons/Document Chart-01.png</file>
<file alias="icon-item-diff">icons/Document Copy-01.png</file>
<file alias="icon-action-merge">icons/Document Flow Chart-01.png</file>
<file>icons/Document Gant Chart-01.png</file>
<file>icons/Document Help-01.png</file>
<file>icons/Document Line Chart-01.png</file>
<file>icons/Document Microsoft Excel-01.png</file>
<file>icons/Document Microsoft PowerPoint-01.png</file>
<file>icons/Document Microsoft Word-01.png</file>
<file alias="icon-item-branch">icons/Document Organization Chart-01.png</file>
<file>icons/Document Preview-01.png</file>
<file alias="icon-item-revert">icons/Document-Revert-icon.png</file>
<file>icons/Document Text-01.png</file>
<file>icons/Edit Document-01.png</file>
<file>icons/Email-01.png</file>
<file>icons/Email Attachment-01.png</file>
<file>icons/Email Delete-01.png</file>
<file>icons/Email Download-01.png</file>
<file>icons/Email Forward-01.png</file>
<file>icons/Email Inbox-01.png</file>
<file>icons/Email Reply-01.png</file>
<file>icons/File Audio-01.png</file>
<file>icons/File Audio AIFF-01.png</file>
<file>icons/File Audio MP3-01.png</file>
<file>icons/File Audio WAV-01.png</file>
<file>icons/File Audio WMA-01.png</file>
<file alias="icon-item-delete">icons/File Delete-01.png</file>
<file alias="icon-item-history">icons/File History-01.png</file>
<file alias="icon-item-add">icons/File New-01.png</file>
<file alias="icon-item-rename">icons/File Open-01.png</file>
<file>icons/File Video 3GP-01.png</file>
<file>icons/File Video-01.png</file>
<file>icons/File Video AVI-01.png</file>
<file>icons/File Video MOV-01.png</file>
<file>icons/File Video MPEG-01.png</file>
<file>icons/File Video WMV-01.png</file>
<file alias="icon-item-folder">icons/Folder-01.png</file>
<file alias="icon-action-stash-new">icons/Folder Add-01.png</file>
<file alias="icon-action-stash-apply">icons/Folder Compressed-01.png</file>
<file alias="icon-action-stash-delete">icons/Folder Delete-01.png</file>
<file alias="icon-action-stash-diff">icons/Folder Explorer-01.png</file>
<file alias="icon-action-folder-explore">icons/Folder Explorer-01.png</file>
<file>icons/Folder Generic Blue-01.png</file>
<file>icons/Folder Generic Green-01.png</file>
<file>icons/Folder Generic Red-01.png</file>
<file>icons/Folder Generic Silver-01.png</file>
<file alias="icon-action-folder-rename">icons/Folder Open-01.png</file>
<file>icons/Folder RAR-01.png</file>
<file>icons/Games-01.png</file>
<file alias="icon-action-settings">icons/Gear-01.png</file>
<file>icons/Highlighter Blue-01.png</file>
<file>icons/Highlighter Green-01.png</file>
<file alias="icon-action-tag-new">icons/Highlighter Yellow-01.png</file>
<file>icons/Image BMP-01.png</file>
<file>icons/Image GIF-01.png</file>
<file>icons/Image JPEG-01.png</file>
<file>icons/Image PNG-01.png</file>
<file>icons/Image TIFF-01.png</file>
<file>icons/Lock Lock-01.png</file>
<file>icons/Lock Unlock-01.png</file>
<file alias="icon-action-repo-open">icons/My Documents-01.png</file>
<file>icons/My Ebooks-01.png</file>
<file>icons/My Music-01.png</file>
<file>icons/My Pictures.png</file>
<file>icons/My Videos-01.png</file>
<file alias="icon-action-repo-clone">icons/My Websites-01.png</file>
<file>icons/Network Firewall-01.png</file>
<file alias="icon-webview">icons/Network MAC-01.png</file>
<file alias="icon-item-remote" >icons/Network PC-01.png</file>
<file>icons/Network Refresh-01.png</file>
<file>icons/Pen Blue-01.png</file>
<file>icons/Pen Green-01.png</file>
<file>icons/Pen Red-01.png</file>
<file alias="icon-action-commit">icons/Save-01.png</file>
<file alias="icon-clear-log">icons/Text Edit.png</file>
<file>icons/USB-01.png</file>
<file>icons/User Administrator Blue-01.png</file>
<file>icons/User Administrator Green-01.png</file>
<file>icons/User Administrator Red-01.png</file>
<file>icons/User Chat-01.png</file>
<file>icons/User Clients-01.png</file>
<file>icons/User Coat Blue-01.png</file>
<file>icons/User Coat Green-01.png</file>
<file>icons/User Coat Red-01.png</file>
<file>icons/User Executive Blue-01.png</file>
<file>icons/User Executive Green-01.png</file>
<file>icons/User Executive Red-01.png</file>
<file>icons/User Group-01.png</file>
<file>icons/User Preppy Blue-01.png</file>
<file>icons/User Preppy Green-01.png</file>
<file>icons/User Preppy Red-01.png</file>
<file>icons/Web HTML-01.png</file>
<file>icons/Web XML-01.png</file>
<file>icons/Window-01.png</file>
<file>icons/Window Refresh-01.png</file>
<file>icons/Windows-01.png</file>
<file>icons/Windows Cascade-01.png</file>
<file>icons/Zoom-01.png</file>
<file>icons/Zoom In-01.png</file>
<file>icons/Zoom Out-01.png</file>
</qresource>
<qresource prefix="/intl">
<file>intl/el_GR.qm</file>
<file>intl/de_DE.qm</file>
<file>intl/es_ES.qm</file>
<file>intl/fr_FR.qm</file>
<file>intl/ru_RU.qm</file>
<file>intl/pt_PT.qm</file>
</qresource>
</RCC>

View File

@ -5,6 +5,7 @@
#include <QMessageBox>
#include <QClipboard>
#include <QUrl>
#include "Utils.h"
//-----------------------------------------------------------------------------
CloneDialog::CloneDialog(QWidget *parent) :

View File

@ -3,10 +3,6 @@
#include <QDialog>
#define FOSSIL_CHECKOUT1 "_FOSSIL_"
#define FOSSIL_CHECKOUT2 ".fslckout"
#define FOSSIL_EXT "fossil"
namespace Ui {
class CloneDialog;
}

View File

@ -4,7 +4,7 @@
#include "ui_CommitDialog.h"
#include "MainWindow.h" // Ugly. I know.
CommitDialog::CommitDialog(QWidget *parent, QString title, QStringList &files, const QStringList *history, bool singleLineEntry, const QString *checkBoxText, bool *checkBoxValue) :
CommitDialog::CommitDialog(QWidget *parent, const QString &title, QStringList &files, const QStringList *history, bool stashMode) :
QDialog(parent, Qt::Sheet),
ui(new Ui::CommitDialog)
{
@ -15,16 +15,13 @@ CommitDialog::CommitDialog(QWidget *parent, QString title, QStringList &files, c
setWindowTitle(title);
// Activate the appropriate control based on mode
ui->plainTextEdit->setVisible(!singleLineEntry);
ui->lineEdit->setVisible(singleLineEntry);
ui->plainTextEdit->setVisible(!stashMode);
ui->lineEdit->setVisible(stashMode);
// Activate the checkbox if we have some text
ui->checkBox->setVisible(checkBoxText!=0);
if(checkBoxText && checkBoxValue)
{
ui->checkBox->setText(*checkBoxText);
ui->checkBox->setCheckState(*checkBoxValue ? Qt::Checked : Qt::Unchecked);
}
ui->chkRevertFiles->setVisible(stashMode);
ui->widgetBranchOptions->setVisible(!stashMode);
// Activate the combo if we have history
ui->comboBox->setVisible(history!=0);
@ -77,16 +74,12 @@ CommitDialog::~CommitDialog()
}
//------------------------------------------------------------------------------
bool CommitDialog::run(QWidget *parent, QString title, QStringList &files, QString &commitMsg, const QStringList *history, bool singleLineEntry, const QString *checkBoxText, bool *checkBoxValue)
bool CommitDialog::runCommit(QWidget* parent, QStringList& files, QString& commitMsg, const QStringList& commitMsgHistory, QString &branchName, bool &privateBranch)
{
CommitDialog dlg(parent, title, files, history, singleLineEntry, checkBoxText, checkBoxValue);
CommitDialog dlg(parent, tr("Commit Changes"), files, &commitMsgHistory, false);
int res = dlg.exec();
if(singleLineEntry)
commitMsg = dlg.ui->lineEdit->text();
else
commitMsg = dlg.ui->plainTextEdit->toPlainText();
commitMsg = dlg.ui->plainTextEdit->toPlainText();
if(res!=QDialog::Accepted)
return false;
@ -100,15 +93,40 @@ bool CommitDialog::run(QWidget *parent, QString title, QStringList &files, QStri
files.append(si->text());
}
if(checkBoxText)
branchName.clear();
if(dlg.ui->chkNewBranch->isChecked())
{
Q_ASSERT(checkBoxValue);
*checkBoxValue = dlg.ui->checkBox->checkState() == Qt::Checked;
branchName = dlg.ui->lineBranchName->text().trimmed();
privateBranch = dlg.ui->chkPrivateBranch->isChecked();
}
return true;
}
//------------------------------------------------------------------------------
bool CommitDialog::runStashNew(QWidget* parent, QStringList& stashedFiles, QString& stashName, bool& revertFiles)
{
CommitDialog dlg(parent, tr("Stash Changes"), stashedFiles, NULL, true);
int res = dlg.exec();
stashName = dlg.ui->lineEdit->text();
if(res!=QDialog::Accepted)
return false;
stashedFiles.clear();
for(int i=0; i<dlg.itemModel.rowCount(); ++i)
{
QStandardItem *si = dlg.itemModel.item(i);
if(si->checkState()!=Qt::Checked)
continue;
stashedFiles.append(si->text());
}
revertFiles = dlg.ui->chkRevertFiles->checkState() == Qt::Checked;
return true;
}
//------------------------------------------------------------------------------
void CommitDialog::on_comboBox_activated(int index)
{
@ -142,3 +160,10 @@ void CommitDialog::on_listView_clicked(const QModelIndex &)
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(num_selected>0);
}
//------------------------------------------------------------------------------
void CommitDialog::on_chkNewBranch_toggled(bool checked)
{
ui->chkPrivateBranch->setEnabled(checked);
ui->lineBranchName->setEnabled(checked);
}

View File

@ -5,26 +5,28 @@
#include <QStandardItemModel>
namespace Ui {
class CommitDialog;
class CommitDialog;
}
class CommitDialog : public QDialog
{
Q_OBJECT
Q_OBJECT
public:
explicit CommitDialog(QWidget *parent, QString title, QStringList &files, const QStringList *history=0, bool singleLineEntry=false, const QString *checkBoxText=0, bool *checkBoxValue=0);
~CommitDialog();
explicit CommitDialog(QWidget *parent, const QString &title, QStringList &files, const QStringList *history, bool stashMode);
~CommitDialog();
static bool run(QWidget *parent, QString title, QStringList &files, QString &commitMsg, const QStringList *history=0, bool singleLineEntry=false, const QString *checkBoxText=0, bool *checkBoxValue=0);
static bool runStashNew(QWidget* parent, QStringList& stashedFiles, QString& stashName, bool &revertFiles);
static bool runCommit(QWidget* parent, QStringList& files, QString& commitMsg, const QStringList &commitMsgHistory, QString& branchName, bool& privateBranch);
private slots:
void on_comboBox_activated(int index);
void on_listView_doubleClicked(const QModelIndex &index);
void on_listView_clicked(const QModelIndex &index);
void on_chkNewBranch_toggled(bool checked);
private:
Ui::CommitDialog *ui;
Ui::CommitDialog *ui;
QStandardItemModel itemModel;
QStringList commitMessages;
};

1087
src/Fossil.cpp Normal file

File diff suppressed because it is too large Load Diff

153
src/Fossil.h Normal file
View File

@ -0,0 +1,153 @@
#ifndef FOSSIL_H
#define FOSSIL_H
class QStringList;
#include <QString>
#include <QStringList>
#include <QObject>
#include "LoggedProcess.h"
#include "Utils.h"
typedef QMap<QString, QString> stashmap_t;
#define PATH_SEPARATOR "/"
enum RunFlags
{
RUNFLAGS_NONE = 0<<0,
RUNFLAGS_SILENT_INPUT = 1<<0,
RUNFLAGS_SILENT_OUTPUT = 1<<1,
RUNFLAGS_SILENT_ALL = RUNFLAGS_SILENT_INPUT | RUNFLAGS_SILENT_OUTPUT,
RUNFLAGS_DETACHED = 1<<2,
RUNFLAGS_DEBUG = 1<<3,
};
enum RepoStatus
{
REPO_OK,
REPO_NOT_FOUND,
REPO_OLD_SCHEMA
};
class Fossil
{
public:
Fossil()
: operationAborted(false)
, uiCallback(0)
{
}
void Init(UICallback *callback)
{
uiCallback = callback;
fossilPath.clear();
currentWorkspace.clear();
}
bool runFossil(const QStringList &args, QStringList *output=0, int runFlags=RUNFLAGS_NONE);
bool runFossilRaw(const QStringList &args, QStringList *output, int *exitCode, int runFlags);
static bool isWorkspace(const QString &path);
RepoStatus getRepoStatus();
void setCurrentWorkspace(const QString &workspace)
{
currentWorkspace = workspace;
}
const QString &getCurrentWorkspace() const
{
return currentWorkspace;
}
const QString &getProjectName() const
{
return projectName;
}
const QString &getRepositoryFile() const
{
return repositoryFile;
}
void setRepositoryFile(const QString &filename)
{
repositoryFile = filename;
}
bool openRepository(const QString &repositoryPath, const QString& workspacePath);
bool newRepository(const QString &repositoryPath);
bool closeRepository();
bool pushRepository();
bool pullRepository();
bool cloneRepository(const QString &repository, const QUrl &url, const QUrl &proxyUrl);
bool undoRepository(QStringList& result, bool explainOnly);
bool updateRepository(QStringList& result, const QString& revision, bool explainOnly);
bool getFossilVersion(QString &version);
bool uiRunning() const;
bool startUI(const QString &httpPort);
void stopUI();
bool listFiles(QStringList &files);
bool status(QStringList& result);
bool diffFile(const QString &repoFile);
bool commitFiles(const QStringList &fileList, const QString &comment, const QString& newBranchName, bool isPrivateBranch);
bool addFiles(const QStringList& fileList);
bool removeFiles(const QStringList& fileList, bool deleteLocal);
bool revertFiles(const QStringList& fileList);
bool renameFile(const QString& beforePath, const QString& afterPath, bool renameLocal);
bool getFossilSettings(QStringList& result);
bool setFossilSetting(const QString &name, const QString &value, bool global);
bool setRemoteUrl(const QString &url);
bool getRemoteUrl(QString &url);
bool stashNew(const QStringList& fileList, const QString& name, bool revert);
bool stashList(stashmap_t &stashes);
bool stashApply(const QString& name);
bool stashDrop(const QString& name);
bool stashDiff(const QString& name);
void abortOperation() { operationAborted = true; }
bool tagList(QStringMap& tags);
bool tagNew(const QString& name, const QString& revision);
bool tagDelete(const QString& name, const QString& revision);
bool branchList(QStringList& branches, QStringList& activeBranches);
bool branchNew(const QString& name, const QString& revisionBasis, bool isPrivate=false);
bool branchMerge(QStringList& res, const QString& revision, bool integrate, bool force, bool testOnly);
const QString &getCurrentRevision() const { return currentRevision; }
const QStringList &getCurrentTags() const { return currentTags; }
const QString &getUIHttpPort() const { return fossilUIPort; }
QString getUIHttpAddress() const;
private:
void log(const QString &text, bool isHTML=false)
{
if(uiCallback)
uiCallback->logText(text, isHTML);
}
QString getFossilPath();
bool operationAborted;
UICallback *uiCallback;
QString currentWorkspace;
QString fossilPath; // The value from the settings
QString repositoryFile;
QString projectName;
QString currentRevision;
QStringList currentTags;
LoggedProcess fossilUI;
QString fossilUIPort;
};
#endif // FOSSIL_H

72
src/FslSettingsDialog.cpp Normal file
View File

@ -0,0 +1,72 @@
#include "FslSettingsDialog.h"
#include "ui_FslSettingsDialog.h"
#include "Utils.h"
#include <QDir>
///////////////////////////////////////////////////////////////////////////////
FslSettingsDialog::FslSettingsDialog(QWidget *parent, Settings &_settings) :
QDialog(parent, Qt::Sheet),
ui(new Ui::FslSettingsDialog),
settings(&_settings)
{
ui->setupUi(this);
ui->lineUIPort->setText(settings->GetValue(FOSSIL_SETTING_HTTP_PORT).toString());
// Global Settings
ui->lineGDiffCommand->setText(settings->GetFossilValue(FOSSIL_SETTING_GDIFF_CMD).toString());
ui->lineGMergeCommand->setText(settings->GetFossilValue(FOSSIL_SETTING_GMERGE_CMD).toString());
ui->lineProxy->setText(settings->GetFossilValue(FOSSIL_SETTING_PROXY_URL).toString());
// Repository Settings
ui->lineRemoteURL->setText(settings->GetFossilValue(FOSSIL_SETTING_REMOTE_URL).toString());
ui->lineIgnore->setText(settings->GetFossilValue(FOSSIL_SETTING_IGNORE_GLOB).toString());
ui->lineIgnoreCRNL->setText(settings->GetFossilValue(FOSSIL_SETTING_CRNL_GLOB).toString());
}
//-----------------------------------------------------------------------------
FslSettingsDialog::~FslSettingsDialog()
{
delete ui;
}
//-----------------------------------------------------------------------------
bool FslSettingsDialog::run(QWidget *parent, Settings &settings)
{
FslSettingsDialog dlg(parent, settings);
return dlg.exec() == QDialog::Accepted;
}
//-----------------------------------------------------------------------------
void FslSettingsDialog::on_buttonBox_accepted()
{
settings->SetValue(FOSSIL_SETTING_HTTP_PORT, ui->lineUIPort->text());
settings->SetFossilValue(FOSSIL_SETTING_GDIFF_CMD, ui->lineGDiffCommand->text());
settings->SetFossilValue(FOSSIL_SETTING_GMERGE_CMD, ui->lineGMergeCommand->text());
settings->SetFossilValue(FOSSIL_SETTING_PROXY_URL, ui->lineProxy->text());
settings->SetFossilValue(FOSSIL_SETTING_REMOTE_URL, ui->lineRemoteURL->text());
settings->SetFossilValue(FOSSIL_SETTING_IGNORE_GLOB, ui->lineIgnore->text());
settings->SetFossilValue(FOSSIL_SETTING_CRNL_GLOB, ui->lineIgnoreCRNL->text());
settings->ApplyEnvironment();
}
//-----------------------------------------------------------------------------
void FslSettingsDialog::on_btnSelectFossilGDiff_clicked()
{
QString path = SelectExe(this, tr("Select Graphical Diff application"));
if(!path.isEmpty())
ui->lineGDiffCommand->setText(QDir::toNativeSeparators(path));
}
//-----------------------------------------------------------------------------
void FslSettingsDialog::on_btnSelectGMerge_clicked()
{
QString path = SelectExe(this, tr("Select Graphical Merge application"));
if(!path.isEmpty())
ui->lineGMergeCommand->setText(path);
}

33
src/FslSettingsDialog.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef FSLSETTINGSDIALOG_H
#define FSLSETTINGSDIALOG_H
#include <QDialog>
#include "Settings.h"
namespace Ui {
class FslSettingsDialog;
}
class FslSettingsDialog : public QDialog
{
Q_OBJECT
public:
explicit FslSettingsDialog(QWidget *parent, Settings &_settings);
~FslSettingsDialog();
static bool run(QWidget *parent, Settings &_settings);
private slots:
void on_buttonBox_accepted();
void on_btnSelectFossilGDiff_clicked();
void on_btnSelectGMerge_clicked();
private:
Ui::FslSettingsDialog *ui;
Settings *settings;
};
#endif // FSLSETTINGSDIALOG_H

File diff suppressed because it is too large Load Diff

View File

@ -2,114 +2,15 @@
#define MAINWINDOW_H
#include <QMainWindow>
#include <QStandardItemModel>
#include <QStringList>
#include <QMap>
#include <QFileInfo>
#include <QDir>
#include <QProcess>
#include <QFileIconProvider>
#include <QSet>
#include "SettingsDialog.h"
#include "Settings.h"
#include "Workspace.h"
namespace Ui {
class MainWindow;
}
class QStringList;
//////////////////////////////////////////////////////////////////////////
// RepoFile
//////////////////////////////////////////////////////////////////////////
struct RepoFile
{
enum EntryType
{
TYPE_UNKNOWN = 1<<0,
TYPE_UNCHANGED = 1<<1,
TYPE_EDITTED = 1<<2,
TYPE_ADDED = 1<<3,
TYPE_DELETED = 1<<4,
TYPE_MISSING = 1<<5,
TYPE_RENAMED = 1<<6,
TYPE_CONFLICTED = 1<<7,
TYPE_MODIFIED = TYPE_EDITTED|TYPE_ADDED|TYPE_DELETED|TYPE_MISSING|TYPE_RENAMED|TYPE_CONFLICTED,
TYPE_REPO = TYPE_UNCHANGED|TYPE_MODIFIED,
TYPE_ALL = TYPE_UNKNOWN|TYPE_REPO
};
RepoFile(QFileInfo &info, EntryType type, const QString &repoPath)
{
FileInfo = info;
Type = type;
FilePath = getRelativeFilename(repoPath);
Path = FileInfo.absolutePath();
// Strip the workspace path from the path
Q_ASSERT(Path.indexOf(repoPath)==0);
Path = Path.mid(repoPath.length()+1);
}
bool isType(EntryType t) const
{
return Type == t;
}
void setType(EntryType t)
{
Type = t;
}
EntryType getType() const
{
return Type;
}
QFileInfo getFileInfo() const
{
return FileInfo;
}
bool isRepo() const
{
return Type == TYPE_UNCHANGED || Type == TYPE_EDITTED;
}
const QString &getFilePath() const
{
return FilePath;
}
QString getFilename() const
{
return FileInfo.fileName();
}
const QString &getPath() const
{
return Path;
}
QString getRelativeFilename(const QString &path)
{
QString abs_base_dir = QDir(path).absolutePath();
QString relative = FileInfo.absoluteFilePath();
int index = relative.indexOf(abs_base_dir);
if(index<0)
return QString("");
return relative.right(relative.length() - abs_base_dir.length()-1);
}
private:
QFileInfo FileInfo;
EntryType Type;
QString FilePath;
QString Path;
};
//////////////////////////////////////////////////////////////////////////
// MainWindow
//////////////////////////////////////////////////////////////////////////
@ -120,38 +21,26 @@ class MainWindow : public QMainWindow
public:
explicit MainWindow(Settings &_settings, QWidget *parent = 0, QString *workspacePath = 0);
~MainWindow();
bool diffFile(QString repoFile);
bool diffFile(const QString& repoFile);
void fullRefresh();
private:
typedef QSet<QString> stringset_t;
enum RunFlags
{
RUNFLAGS_NONE = 0<<0,
RUNFLAGS_SILENT_INPUT = 1<<0,
RUNFLAGS_SILENT_OUTPUT = 1<<1,
RUNFLAGS_SILENT_ALL = RUNFLAGS_SILENT_INPUT | RUNFLAGS_SILENT_OUTPUT,
RUNFLAGS_DETACHED = 1<<2
};
private:
bool refresh();
void scanWorkspace();
bool runFossil(const QStringList &args, QStringList *output=0, int runFlags=RUNFLAGS_NONE);
bool runFossilRaw(const QStringList &args, QStringList *output=0, int *exitCode=0, int runFlags=RUNFLAGS_NONE);
void applySettings();
void updateSettings();
void updateRevision(const QString& revision);
const QString &getCurrentWorkspace();
void setCurrentWorkspace(const QString &workspace);
void log(const QString &text, bool isHTML=false);
void setStatus(const QString &text);
bool uiRunning() const { return fossilUI.state() == QProcess::Running; }
void getSelectionFilenames(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
void getFileViewSelection(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
void getDirViewSelection(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL, bool allIfEmpty=false);
void getStashViewSelection(QStringList &stashNames, bool allIfEmpty=false);
bool uiRunning() const;
void getSelectionFilenames(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false);
void getFileViewSelection(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false);
void getDirViewSelection(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL, bool allIfEmpty=false);
void getSelectionStashes(QStringList &stashNames);
void getSelectionPaths(stringset_t &paths);
void getAllFilenames(QStringList &filenames, int includeMask=RepoFile::TYPE_ALL);
void getAllFilenames(QStringList &filenames, int includeMask=WorkspaceFile::TYPE_ALL);
bool startUI();
void stopUI();
void enableActions(bool on);
@ -159,13 +48,11 @@ private:
void rebuildRecent();
bool openWorkspace(const QString &path);
void loadFossilSettings();
QString getFossilPath();
QString getFossilHttpAddress();
bool scanDirectory(QFileInfoList &entries, const QString& dirPath, const QString &baseDir, const QString ignoreSpec, const bool& abort);
void updateDirView();
void updateWorkspaceView();
void updateFileView();
void updateStashView();
void selectRootDir();
void MergeRevision(const QString& defaultRevision);
void fossilBrowse(const QString &fossilUrl);
void dragEnterEvent(class QDragEnterEvent *event);
void dropEvent(class QDropEvent *event);
@ -173,15 +60,6 @@ private:
virtual QMenu *createPopupMenu();
const QIcon& getInternalIcon(const char *name);
enum RepoStatus
{
REPO_OK,
REPO_NOT_FOUND,
REPO_OLD_SCHEMA
};
RepoStatus getRepoStatus();
enum ViewMode
{
VIEWMODE_LIST,
@ -192,9 +70,11 @@ private slots:
// Manual slots.
// Use a different naming scheme to prevent warnings from Qt's automatic signaling
void onOpenRecent();
void onTreeViewSelectionChanged(const class QItemSelection &selected, const class QItemSelection &deselected);
void onWorkspaceTreeViewSelectionChanged(const class QItemSelection &selected, const class QItemSelection &deselected);
void onFileViewDragOut();
void onAbort();
void onSearchBoxTextChanged(const QString &text);
void onSearch();
// Designer slots
void on_actionRefresh_triggered();
@ -204,8 +84,8 @@ private slots:
void on_actionTimeline_triggered();
void on_actionHistory_triggered();
void on_actionClearLog_triggered();
void on_tableView_doubleClicked(const QModelIndex &index);
void on_treeView_doubleClicked(const QModelIndex &index);
void on_fileTableView_doubleClicked(const QModelIndex &index);
void on_workspaceTreeView_doubleClicked(const QModelIndex &index);
void on_actionOpenFile_triggered();
void on_actionPush_triggered();
void on_actionPull_triggered();
@ -219,26 +99,57 @@ private slots:
void on_actionAbout_triggered();
void on_actionUpdate_triggered();
void on_actionSettings_triggered();
void on_actionFossilSettings_triggered();
void on_actionViewUnchanged_triggered();
void on_actionViewModified_triggered();
void on_actionViewUnknown_triggered();
void on_actionViewIgnored_triggered();
void on_actionViewAll_triggered();
void on_actionViewAsList_triggered();
void on_actionViewAsFolders_triggered();
void on_actionOpenFolder_triggered();
void on_actionRenameFolder_triggered();
void on_actionNewRepository_triggered();
void on_actionOpenRepository_triggered();
void on_actionCloseRepository_triggered();
void on_actionCloneRepository_triggered();
void on_actionViewStash_triggered();
void on_actionNewStash_triggered();
void on_actionCreateStash_triggered();
void on_actionApplyStash_triggered();
void on_actionDeleteStash_triggered();
void on_actionDiffStash_triggered();
void on_textBrowser_customContextMenuRequested(const QPoint &pos);
void on_tableView_customContextMenuRequested(const QPoint &pos);
void on_fileTableView_customContextMenuRequested(const QPoint &pos);
void on_workspaceTreeView_customContextMenuRequested(const QPoint &pos);
void on_actionCreateTag_triggered();
void on_actionDeleteTag_triggered();
void on_actionCreateBranch_triggered();
void on_actionMergeBranch_triggered();
private:
class MainWinUICallback : public UICallback
{
public:
MainWinUICallback() : mainWindow(0)
{}
void init(class MainWindow *mainWindow)
{
this->mainWindow = mainWindow;
}
virtual void logText(const QString& text, bool isHTML);
virtual void beginProcess(const QString& text);
virtual void updateProcess(const QString& text);
virtual void endProcess();
virtual QMessageBox::StandardButton Query(const QString &title, const QString &query, QMessageBox::StandardButtons buttons);
private:
class MainWindow *mainWindow;
};
friend class MainWinUICallback;
enum
{
MAX_RECENT=5
@ -249,30 +160,36 @@ private:
Ui::MainWindow *ui;
QFileIconProvider iconProvider;
icon_map_t iconCache;
QStandardItemModel repoFileModel;
QStandardItemModel repoDirModel;
QStandardItemModel repoStashModel;
QProcess fossilUI;
class QAction *recentWorkspaceActs[MAX_RECENT];
class QProgressBar *progressBar;
class QLabel *lblRevision;
class QLabel *lblTags;
class QShortcut *abortShortcut;
bool abortOperation;
class SearchBox *searchBox;
class QShortcut *searchShortcut;
QMenu *menuWorkspace;
QMenu *menuStashes;
QMenu *menuTags;
QMenu *menuBranches;
bool operationAborted;
stringset_t selectedDirs; // The directory selected in the tree
QStringList selectedTags;
QStringList selectedBranches;
QStringList versionList;
Workspace workspace;
Workspace & getWorkspace() { return workspace; }
Fossil & fossil() { return workspace.fossil(); }
const Fossil & fossil() const { return workspace.fossil(); }
Settings &settings;
QString projectName;
QString repositoryFile;
QStringList workspaceHistory;
QString currentWorkspace;
ViewMode viewMode;
stringset_t selectedDirs; // The directory selected in the tree
// Repository State
typedef QList<RepoFile*> filelist_t;
typedef QMap<QString, RepoFile*> filemap_t;
typedef QMap<QString, QString> stashmap_t;
filemap_t workspaceFiles;
stringset_t pathSet;
stashmap_t stashMap;
MainWinUICallback uiCallback;
ViewMode viewMode;
};
#endif // MAINWINDOW_H

92
src/RevisionDialog.cpp Normal file
View File

@ -0,0 +1,92 @@
#include "RevisionDialog.h"
#include "ui_RevisionDialog.h"
#include "Utils.h"
//-----------------------------------------------------------------------------
RevisionDialog::RevisionDialog(QWidget *parent, const QStringList &completions, const QString &defaultValue) :
QDialog(parent),
ui(new Ui::RevisionDialog),
completer(completions, parent)
{
ui->setupUi(this);
ui->cmbRevision->setCompleter(&completer);
ui->cmbRevision->addItems(completions);
if(!defaultValue.isEmpty())
ui->cmbRevision->setCurrentText(defaultValue);
}
//-----------------------------------------------------------------------------
RevisionDialog::~RevisionDialog()
{
delete ui;
}
//-----------------------------------------------------------------------------
QString RevisionDialog::runUpdate(QWidget *parent, const QString &title, const QStringList &completions, const QString &defaultValue)
{
RevisionDialog dlg(parent, completions, defaultValue);
dlg.setWindowTitle(title);
dlg.ui->lblName->setVisible(false);
dlg.ui->lineName->setVisible(false);
dlg.ui->lblIntegrate->setVisible(false);
dlg.ui->chkIntegrate->setVisible(false);
dlg.ui->lblForce->setVisible(false);
dlg.ui->chkForce->setVisible(false);
dlg.adjustSize();
if(dlg.exec() != QDialog::Accepted)
return QString("");
return dlg.ui->cmbRevision->currentText().trimmed();
}
//-----------------------------------------------------------------------------
QString RevisionDialog::runMerge(QWidget *parent, const QString &title, const QStringList &completions, const QString &defaultValue, bool &integrate, bool &force)
{
RevisionDialog dlg(parent, completions, defaultValue);
dlg.setWindowTitle(title);
dlg.ui->lblName->setVisible(false);
dlg.ui->lineName->setVisible(false);
dlg.ui->lblIntegrate->setVisible(true);
dlg.ui->chkIntegrate->setVisible(true);
dlg.ui->chkIntegrate->setChecked(integrate);
dlg.ui->lblForce->setVisible(true);
dlg.ui->chkForce->setVisible(true);
dlg.ui->chkForce->setChecked(force);
dlg.adjustSize();
if(dlg.exec() != QDialog::Accepted)
return QString("");
integrate = dlg.ui->chkIntegrate->checkState() == Qt::Checked;
force = dlg.ui->chkForce->checkState() == Qt::Checked;
return dlg.ui->cmbRevision->currentText().trimmed();
}
//-----------------------------------------------------------------------------
bool RevisionDialog::runNewTag(QWidget *parent, const QString &title, const QStringList &completions, const QString &defaultValue, QString &revision, QString &name)
{
RevisionDialog dlg(parent, completions, defaultValue);
dlg.setWindowTitle(title);
dlg.ui->lblName->setVisible(true);
dlg.ui->lineName->setVisible(true);
dlg.ui->lblIntegrate->setVisible(false);
dlg.ui->chkIntegrate->setVisible(false);
dlg.ui->lblForce->setVisible(false);
dlg.ui->chkForce->setVisible(false);
dlg.adjustSize();
if(dlg.exec() != QDialog::Accepted)
return false;
revision = dlg.ui->cmbRevision->currentText().trimmed();
name = dlg.ui->lineName->text().trimmed();
return true;
}

28
src/RevisionDialog.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef REVISIONDIALOG_H
#define REVISIONDIALOG_H
#include <QDialog>
#include <QCompleter>
namespace Ui {
class RevisionDialog;
}
class RevisionDialog : public QDialog
{
Q_OBJECT
public:
explicit RevisionDialog(QWidget *parent, const QStringList &completions, const QString &defaultValue);
~RevisionDialog();
static QString runUpdate(QWidget *parent, const QString &title, const QStringList &completions, const QString &defaultValue);
static QString runMerge(QWidget* parent, const QString& title, const QStringList& completions, const QString& defaultValue, bool& integrate, bool& force);
static bool runNewTag(QWidget *parent, const QString &title, const QStringList &completions, const QString &defaultValue, QString &revision, QString &name);
private:
Ui::RevisionDialog *ui;
QCompleter completer;
};
#endif // REVISIONDIALOG_H

24
src/SearchBox.cpp Normal file
View File

@ -0,0 +1,24 @@
#include "SearchBox.h"
#include <QKeyEvent>
SearchBox::SearchBox(QWidget *parent) : QLineEdit(parent)
{
}
SearchBox::~SearchBox()
{
}
void SearchBox::keyPressEvent(QKeyEvent *event)
{
// Clear text on escape
if(event->key() == Qt::Key_Escape)
{
setText("");
clearFocus();
}
else
QLineEdit::keyPressEvent(event);
}

23
src/SearchBox.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef SEARCHBOX_H
#define SEARCHBOX_H
#include <QLineEdit>
class SearchBox : public QLineEdit
{
Q_OBJECT
public:
explicit SearchBox(QWidget* parent=0);
~SearchBox();
signals:
public slots:
protected:
void keyPressEvent(QKeyEvent *event);
};
#endif // SEARCHBOX_H

124
src/Settings.cpp Normal file
View File

@ -0,0 +1,124 @@
#include "Settings.h"
#include <QSettings>
#include <QCoreApplication>
#include <QDir>
#include <QTranslator>
#include <QResource>
#include <QTextCodec>
///////////////////////////////////////////////////////////////////////////////
Settings::Settings(bool portableMode) : store(0)
{
Mappings.insert(FOSSIL_SETTING_GDIFF_CMD, Setting("", Setting::TYPE_FOSSIL_GLOBAL));
Mappings.insert(FOSSIL_SETTING_GMERGE_CMD, Setting("", Setting::TYPE_FOSSIL_GLOBAL));
Mappings.insert(FOSSIL_SETTING_PROXY_URL, Setting("", Setting::TYPE_FOSSIL_GLOBAL));
Mappings.insert(FOSSIL_SETTING_HTTP_PORT, Setting("", Setting::TYPE_FOSSIL_GLOBAL));
Mappings.insert(FOSSIL_SETTING_IGNORE_GLOB, Setting("", Setting::TYPE_FOSSIL_LOCAL));
Mappings.insert(FOSSIL_SETTING_CRNL_GLOB, Setting("", Setting::TYPE_FOSSIL_LOCAL));
Mappings.insert(FOSSIL_SETTING_REMOTE_URL, Setting("off", Setting::TYPE_FOSSIL_COMMAND));
// Go into portable mode when explicitly requested or if a config file exists next to the executable
QString ini_path = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + QDir::separator() + QCoreApplication::applicationName() + ".ini");
if( portableMode || QFile::exists(ini_path))
store = new QSettings(ini_path, QSettings::IniFormat);
else
{
// Linux: ~/.config/organizationName/applicationName.conf
// Windows: HKEY_CURRENT_USER\Software\organizationName\Fuel
store = new QSettings(QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());
}
Q_ASSERT(store);
if(!HasValue(FUEL_SETTING_FILE_DBLCLICK))
SetValue(FUEL_SETTING_FILE_DBLCLICK, 0);
if(!HasValue(FUEL_SETTING_LANGUAGE) && SupportsLang(QLocale::system().name()))
SetValue(FUEL_SETTING_LANGUAGE, QLocale::system().name());
if(!HasValue(FUEL_SETTING_WEB_BROWSER))
SetValue(FUEL_SETTING_WEB_BROWSER, 0);
ApplyEnvironment();
}
//-----------------------------------------------------------------------------
Settings::~Settings()
{
Q_ASSERT(store);
delete store;
}
//-----------------------------------------------------------------------------
void Settings::ApplyEnvironment()
{
QString lang_id = GetValue(FUEL_SETTING_LANGUAGE).toString();
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
#endif
if(!InstallLang(lang_id))
SetValue(FUEL_SETTING_LANGUAGE, "en_US");
}
//-----------------------------------------------------------------------------
bool Settings::InstallLang(const QString &langId)
{
if(langId == "en_US")
{
QCoreApplication::instance()->removeTranslator(&translator);
return true;
}
QString locale_path = QString(":intl/intl/%0.qm").arg(langId);
if(!translator.load(locale_path))
return false;
Q_ASSERT(!translator.isEmpty());
QCoreApplication::instance()->installTranslator(&translator);
return true;
}
//-----------------------------------------------------------------------------
bool Settings::HasValue(const QString &name) const
{
return store->contains(name);
}
//-----------------------------------------------------------------------------
const QVariant Settings::GetValue(const QString &name)
{
if(!HasValue(name))
return QVariant();
return store->value(name);
}
//-----------------------------------------------------------------------------
void Settings::SetValue(const QString &name, const QVariant &value)
{
store->setValue(name, value);
}
//-----------------------------------------------------------------------------
QVariant &Settings::GetFossilValue(const QString &name)
{
mappings_t::iterator it=Mappings.find(name);
Q_ASSERT(it!=Mappings.end());
return it.value().Value;
}
//-----------------------------------------------------------------------------
void Settings::SetFossilValue(const QString &name, const QVariant &value)
{
mappings_t::iterator it=Mappings.find(name);
Q_ASSERT(it!=Mappings.end());
it->Value = value;
}
//-----------------------------------------------------------------------------
bool Settings::SupportsLang(const QString &langId) const
{
QString locale_path = QString(":intl/intl/%0.qm").arg(langId);
QResource res(locale_path);
return res.isValid();
}

75
src/Settings.h Normal file
View File

@ -0,0 +1,75 @@
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QMap>
#include <QVariant>
#include <QTranslator>
#define FUEL_SETTING_FOSSIL_PATH "FossilPath"
#define FUEL_SETTING_COMMIT_MSG "CommitMsgHistory"
#define FUEL_SETTING_FILE_DBLCLICK "FileDblClickAction"
#define FUEL_SETTING_LANGUAGE "Language"
#define FUEL_SETTING_WEB_BROWSER "WebBrowser"
#define FOSSIL_SETTING_GDIFF_CMD "gdiff-command"
#define FOSSIL_SETTING_GMERGE_CMD "gmerge-command"
#define FOSSIL_SETTING_PROXY_URL "proxy"
#define FOSSIL_SETTING_IGNORE_GLOB "ignore-glob"
#define FOSSIL_SETTING_CRNL_GLOB "crnl-glob"
#define FOSSIL_SETTING_REMOTE_URL "remote-url"
#define FOSSIL_SETTING_HTTP_PORT "http-port"
enum FileDblClickAction
{
FILE_DLBCLICK_ACTION_DIFF,
FILE_DLBCLICK_ACTION_OPEN,
FILE_DLBCLICK_ACTION_OPENCONTAINING,
FILE_DLBCLICK_ACTION_MAX
};
struct Settings
{
struct Setting
{
enum SettingType
{
TYPE_FOSSIL_GLOBAL,
TYPE_FOSSIL_LOCAL,
TYPE_FOSSIL_COMMAND
};
Setting(QVariant value, SettingType type) : Value(value), Type(type)
{}
QVariant Value;
SettingType Type;
};
typedef QMap<QString, Setting> mappings_t;
Settings(bool portableMode = false);
~Settings();
void ApplyEnvironment();
// App configuration access
class QSettings * GetStore() { return store; }
bool HasValue(const QString &name) const; // store->contains(FUEL_SETTING_FOSSIL_PATH)
const QVariant GetValue(const QString &name); // settings.store->value
void SetValue(const QString &name, const QVariant &value); // settings.store->value
// Fossil configuration access
QVariant & GetFossilValue(const QString &name);
void SetFossilValue(const QString &name, const QVariant &value);
mappings_t & GetMappings() { return Mappings; }
bool SupportsLang(const QString &langId) const;
bool InstallLang(const QString &langId);
private:
mappings_t Mappings;
class QSettings *store;
QTranslator translator;
};
#endif // SETTINGS_H

View File

@ -1,37 +1,8 @@
#include "SettingsDialog.h"
#include "ui_SettingsDialog.h"
#include <QFileDialog>
#include "Utils.h"
#include <QSettings>
#include <QCoreApplication>
#include <QDir>
#include <QTranslator>
#include <QResource>
#include <QTextCodec>
///////////////////////////////////////////////////////////////////////////////
QString SettingsDialog::SelectExe(QWidget *parent, const QString &description)
{
QString filter(tr("Applications"));
#ifdef Q_OS_WIN
filter += " (*.exe)";
#else
filter += " (*)";
#endif
QString path = QFileDialog::getOpenFileName(
parent,
description,
QString(),
filter,
&filter);
if(!QFile::exists(path))
return QString();
return path;
}
///////////////////////////////////////////////////////////////////////////////
SettingsDialog::SettingsDialog(QWidget *parent, Settings &_settings) :
@ -54,7 +25,6 @@ SettingsDialog::SettingsDialog(QWidget *parent, Settings &_settings) :
ui->lineFossilPath->setText(QDir::toNativeSeparators(settings->GetValue(FUEL_SETTING_FOSSIL_PATH).toString()));
ui->cmbDoubleClickAction->setCurrentIndex(settings->GetValue(FUEL_SETTING_FILE_DBLCLICK).toInt());
ui->cmbFossilBrowser->setCurrentIndex(settings->GetValue(FUEL_SETTING_WEB_BROWSER).toInt());
ui->lineUIPort->setText(settings->GetValue(FUEL_SETTING_HTTP_PORT).toString());
// Initialize language combo
foreach(const LangMap &m, langMap)
@ -66,15 +36,6 @@ SettingsDialog::SettingsDialog(QWidget *parent, Settings &_settings) :
ui->cmbActiveLanguage->findText(
LangIdToName(lang)));
// Global Settings
ui->lineGDiffCommand->setText(settings->GetFossilValue(FOSSIL_SETTING_GDIFF_CMD).toString());
ui->lineGMergeCommand->setText(settings->GetFossilValue(FOSSIL_SETTING_GMERGE_CMD).toString());
ui->lineProxy->setText(settings->GetFossilValue(FOSSIL_SETTING_PROXY_URL).toString());
// Repository Settings
ui->lineRemoteURL->setText(settings->GetFossilValue(FOSSIL_SETTING_REMOTE_URL).toString());
ui->lineIgnore->setText(settings->GetFossilValue(FOSSIL_SETTING_IGNORE_GLOB).toString());
ui->lineIgnoreCRNL->setText(settings->GetFossilValue(FOSSIL_SETTING_CRNL_GLOB).toString());
}
//-----------------------------------------------------------------------------
@ -97,7 +58,6 @@ void SettingsDialog::on_buttonBox_accepted()
Q_ASSERT(ui->cmbDoubleClickAction->currentIndex()>=FILE_DLBCLICK_ACTION_DIFF && ui->cmbDoubleClickAction->currentIndex()<FILE_DLBCLICK_ACTION_MAX);
settings->SetValue(FUEL_SETTING_FILE_DBLCLICK, ui->cmbDoubleClickAction->currentIndex());
settings->SetValue(FUEL_SETTING_WEB_BROWSER, ui->cmbFossilBrowser->currentIndex());
settings->SetValue(FUEL_SETTING_HTTP_PORT, ui->lineUIPort->text());
Q_ASSERT(settings->HasValue(FUEL_SETTING_LANGUAGE));
QString curr_langid = settings->GetValue(FUEL_SETTING_LANGUAGE).toString();
@ -108,15 +68,6 @@ void SettingsDialog::on_buttonBox_accepted()
if(curr_langid != new_langid)
QMessageBox::information(this, tr("Restart required"), tr("The language change will take effect after restarting the application"), QMessageBox::Ok);
settings->SetFossilValue(FOSSIL_SETTING_GDIFF_CMD, ui->lineGDiffCommand->text());
settings->SetFossilValue(FOSSIL_SETTING_GMERGE_CMD, ui->lineGMergeCommand->text());
settings->SetFossilValue(FOSSIL_SETTING_PROXY_URL, ui->lineProxy->text());
settings->SetFossilValue(FOSSIL_SETTING_REMOTE_URL, ui->lineRemoteURL->text());
settings->SetFossilValue(FOSSIL_SETTING_IGNORE_GLOB, ui->lineIgnore->text());
settings->SetFossilValue(FOSSIL_SETTING_CRNL_GLOB, ui->lineIgnoreCRNL->text());
settings->ApplyEnvironment();
}
@ -128,22 +79,6 @@ void SettingsDialog::on_btnSelectFossil_clicked()
ui->lineFossilPath->setText(QDir::toNativeSeparators(path));
}
//-----------------------------------------------------------------------------
void SettingsDialog::on_btnSelectFossilGDiff_clicked()
{
QString path = SelectExe(this, tr("Select Graphical Diff application"));
if(!path.isEmpty())
ui->lineGDiffCommand->setText(QDir::toNativeSeparators(path));
}
//-----------------------------------------------------------------------------
void SettingsDialog::on_btnSelectGMerge_clicked()
{
QString path = SelectExe(this, tr("Select Graphical Merge application"));
if(!path.isEmpty())
ui->lineGMergeCommand->setText(path);
}
//-----------------------------------------------------------------------------
void SettingsDialog::on_btnClearMessageHistory_clicked()
{
@ -186,120 +121,3 @@ QString SettingsDialog::LangNameToId(const QString &name)
return "";
}
///////////////////////////////////////////////////////////////////////////////
Settings::Settings(bool portableMode) : store(0)
{
Mappings.insert(FOSSIL_SETTING_GDIFF_CMD, Setting("", Setting::TYPE_FOSSIL_GLOBAL));
Mappings.insert(FOSSIL_SETTING_GMERGE_CMD, Setting("", Setting::TYPE_FOSSIL_GLOBAL));
Mappings.insert(FOSSIL_SETTING_PROXY_URL, Setting("", Setting::TYPE_FOSSIL_GLOBAL));
Mappings.insert(FOSSIL_SETTING_IGNORE_GLOB, Setting("", Setting::TYPE_FOSSIL_LOCAL));
Mappings.insert(FOSSIL_SETTING_CRNL_GLOB, Setting("", Setting::TYPE_FOSSIL_LOCAL));
Mappings.insert(FOSSIL_SETTING_REMOTE_URL, Setting("off", Setting::TYPE_FOSSIL_COMMAND));
// Go into portable mode when explicitly requested or if a config file exists next to the executable
QString ini_path = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + QDir::separator() + QCoreApplication::applicationName() + ".ini");
if( portableMode || QFile::exists(ini_path))
store = new QSettings(ini_path, QSettings::IniFormat);
else
{
// Linux: ~/.config/organizationName/applicationName.conf
// Windows: HKEY_CURRENT_USER\Software\organizationName\Fuel
store = new QSettings(QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());
}
Q_ASSERT(store);
if(!HasValue(FUEL_SETTING_FILE_DBLCLICK))
SetValue(FUEL_SETTING_FILE_DBLCLICK, 0);
if(!HasValue(FUEL_SETTING_LANGUAGE) && SupportsLang(QLocale::system().name()))
SetValue(FUEL_SETTING_LANGUAGE, QLocale::system().name());
if(!HasValue(FUEL_SETTING_WEB_BROWSER))
SetValue(FUEL_SETTING_WEB_BROWSER, 0);
if(!HasValue(FUEL_SETTING_HTTP_PORT))
SetValue(FUEL_SETTING_HTTP_PORT, "8090");
ApplyEnvironment();
}
//-----------------------------------------------------------------------------
Settings::~Settings()
{
Q_ASSERT(store);
delete store;
}
//-----------------------------------------------------------------------------
void Settings::ApplyEnvironment()
{
QString lang_id = GetValue(FUEL_SETTING_LANGUAGE).toString();
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8"));
#endif
if(!InstallLang(lang_id))
SetValue(FUEL_SETTING_LANGUAGE, "en_US");
}
//-----------------------------------------------------------------------------
bool Settings::InstallLang(const QString &langId)
{
if(langId == "en_US")
{
QCoreApplication::instance()->removeTranslator(&translator);
return true;
}
QString locale_path = QString(":intl/intl/%0.qm").arg(langId);
if(!translator.load(locale_path))
return false;
Q_ASSERT(!translator.isEmpty());
QCoreApplication::instance()->installTranslator(&translator);
return true;
}
//-----------------------------------------------------------------------------
bool Settings::HasValue(const QString &name) const
{
return store->contains(name);
}
//-----------------------------------------------------------------------------
const QVariant Settings::GetValue(const QString &name)
{
if(!HasValue(name))
return QVariant();
return store->value(name);
}
//-----------------------------------------------------------------------------
void Settings::SetValue(const QString &name, const QVariant &value)
{
store->setValue(name, value);
}
//-----------------------------------------------------------------------------
QVariant &Settings::GetFossilValue(const QString &name)
{
mappings_t::iterator it=Mappings.find(name);
Q_ASSERT(it!=Mappings.end());
return it.value().Value;
}
//-----------------------------------------------------------------------------
void Settings::SetFossilValue(const QString &name, const QVariant &value)
{
mappings_t::iterator it=Mappings.find(name);
Q_ASSERT(it!=Mappings.end());
it->Value = value;
}
//-----------------------------------------------------------------------------
bool Settings::SupportsLang(const QString &langId) const
{
QString locale_path = QString(":intl/intl/%0.qm").arg(langId);
QResource res(locale_path);
return res.isValid();
}

View File

@ -2,82 +2,12 @@
#define SETTINGSDIALOG_H
#include <QDialog>
#include <QMap>
#include <QVariant>
#include <QTranslator>
#include "Settings.h"
namespace Ui {
class SettingsDialog;
}
#define FUEL_SETTING_FOSSIL_PATH "FossilPath"
#define FUEL_SETTING_COMMIT_MSG "CommitMsgHistory"
#define FUEL_SETTING_FILE_DBLCLICK "FileDblClickAction"
#define FUEL_SETTING_LANGUAGE "Language"
#define FUEL_SETTING_WEB_BROWSER "WebBrowser"
#define FUEL_SETTING_HTTP_PORT "HTTPPort"
#define FOSSIL_SETTING_GDIFF_CMD "gdiff-command"
#define FOSSIL_SETTING_GMERGE_CMD "gmerge-command"
#define FOSSIL_SETTING_PROXY_URL "proxy"
#define FOSSIL_SETTING_IGNORE_GLOB "ignore-glob"
#define FOSSIL_SETTING_CRNL_GLOB "crnl-glob"
#define FOSSIL_SETTING_REMOTE_URL "remote-url"
enum FileDblClickAction
{
FILE_DLBCLICK_ACTION_DIFF,
FILE_DLBCLICK_ACTION_OPEN,
FILE_DLBCLICK_ACTION_OPENCONTAINING,
FILE_DLBCLICK_ACTION_MAX
};
struct Settings
{
struct Setting
{
enum SettingType
{
TYPE_FOSSIL_GLOBAL,
TYPE_FOSSIL_LOCAL,
TYPE_FOSSIL_COMMAND
};
Setting(QVariant value, SettingType type) : Value(value), Type(type)
{}
QVariant Value;
SettingType Type;
};
typedef QMap<QString, Setting> mappings_t;
Settings(bool portableMode = false);
~Settings();
void ApplyEnvironment();
// App configuration access
class QSettings * GetStore() { return store; }
bool HasValue(const QString &name) const; // store->contains(FUEL_SETTING_FOSSIL_PATH)
const QVariant GetValue(const QString &name); // settings.store->value
void SetValue(const QString &name, const QVariant &value); // settings.store->value
// Fossil configuration access
QVariant & GetFossilValue(const QString &name);
void SetFossilValue(const QString &name, const QVariant &value);
mappings_t & GetMappings() { return Mappings; }
bool SupportsLang(const QString &langId) const;
bool InstallLang(const QString &langId);
private:
mappings_t Mappings;
class QSettings *store;
QTranslator translator;
};
class SettingsDialog : public QDialog
{
Q_OBJECT
@ -92,12 +22,9 @@ public:
private slots:
void on_btnSelectFossil_clicked();
void on_buttonBox_accepted();
void on_btnSelectFossilGDiff_clicked();
void on_btnSelectGMerge_clicked();
void on_btnClearMessageHistory_clicked();
private:
static QString SelectExe(QWidget *parent, const QString &description);
QString LangIdToName(const QString &id);
QString LangNameToId(const QString &name);
void CreateLangMap();

View File

@ -1,6 +1,7 @@
#include "Utils.h"
#include <QMessageBox>
#include <QDialogButtonBox>
#include <QFileDialog>
///////////////////////////////////////////////////////////////////////////////
QMessageBox::StandardButton DialogQuery(QWidget *parent, const QString &title, const QString &query, QMessageBox::StandardButtons buttons)
@ -14,6 +15,42 @@ QMessageBox::StandardButton DialogQuery(QWidget *parent, const QString &title, c
return res;
}
//-----------------------------------------------------------------------------
QString QuotePath(const QString &path)
{
return path;
}
//-----------------------------------------------------------------------------
QStringList QuotePaths(const QStringList &paths)
{
QStringList res;
for(int i=0; i<paths.size(); ++i)
res.append(QuotePath(paths[i]));
return res;
}
//-----------------------------------------------------------------------------
QString SelectExe(QWidget *parent, const QString &description)
{
QString filter(QObject::tr("Applications"));
#ifdef Q_OS_WIN
filter += " (*.exe)";
#else
filter += " (*)";
#endif
QString path = QFileDialog::getOpenFileName(
parent,
description,
QString(),
filter,
&filter);
if(!QFile::exists(path))
return QString();
return path;
}
//-----------------------------------------------------------------------------
#if 0 // Unused
#include <QInputDialog>
@ -158,7 +195,7 @@ bool ShowExplorerMenu(HWND hwnd, const QString &path, const QPoint &qpoint)
// IShellFolder interface.
//
bool bResult = false;
LPMALLOC pMalloc;
if (!SUCCEEDED (SHGetMalloc (&pMalloc)))
return bResult;
@ -291,3 +328,64 @@ bool ShowExplorerMenu(HWND hwnd, const QString &path, const QPoint &qpoint)
#endif
//-----------------------------------------------------------------------------
void ParseProperties(QStringMap &properties, const QStringList &lines, QChar separator)
{
properties.clear();
foreach(QString l, lines)
{
l = l.trimmed();
int index = l.indexOf(separator);
QString key;
QString value;
if(index!=-1)
{
key = l.left(index).trimmed();
value = l.mid(index+1).trimmed();
}
else
key = l;
properties.insert(key, value);
}
}
//------------------------------------------------------------------------------
void GetStandardItemTextRecursive(QString &name, const QStandardItem &item, const QChar &separator)
{
if(item.parent())
{
GetStandardItemTextRecursive(name, *item.parent());
name.append(separator);
}
name.append(item.data(Qt::DisplayRole).toString());
}
//------------------------------------------------------------------------------
void BuildNameToModelIndex(name_modelindex_map_t &map, const QStandardItem &item)
{
QString name;
GetStandardItemTextRecursive(name, item);
map.insert(name, item.index());
for(int i=0; i<item.rowCount(); ++i)
{
const QStandardItem *child = item.child(i);
Q_ASSERT(child);
BuildNameToModelIndex(map, *child);
}
}
//------------------------------------------------------------------------------
void BuildNameToModelIndex(name_modelindex_map_t &map, const QStandardItemModel &model)
{
for(int i=0; i<model.rowCount(); ++i)
{
const QStandardItem *item = model.item(i);
Q_ASSERT(item);
BuildNameToModelIndex(map, *item);
}
}

View File

@ -3,12 +3,60 @@
#include <QString>
#include <QMessageBox>
#include <QMap>
#include <QStandardItem>
#define COUNTOF(array) (sizeof(array)/sizeof(array[0]))
#define FOSSIL_CHECKOUT1 "_FOSSIL_"
#define FOSSIL_CHECKOUT2 ".fslckout"
#define FOSSIL_EXT "fossil"
QMessageBox::StandardButton DialogQuery(QWidget *parent, const QString &title, const QString &query, QMessageBox::StandardButtons buttons = QMessageBox::Yes|QMessageBox::No);
QString QuotePath(const QString &path);
QStringList QuotePaths(const QStringList &paths);
QString SelectExe(QWidget *parent, const QString &description);
typedef QMap<QString, QModelIndex> name_modelindex_map_t;
void GetStandardItemTextRecursive(QString &name, const QStandardItem &item, const QChar &separator='/');
void BuildNameToModelIndex(name_modelindex_map_t &map, const QStandardItem &item);
void BuildNameToModelIndex(name_modelindex_map_t &map, const QStandardItemModel &model);
typedef QMap<QString, QString> QStringMap;
void ParseProperties(QStringMap &properties, const QStringList &lines, QChar separator=' ');
#ifdef Q_OS_WIN
bool ShowExplorerMenu(HWND hwnd, const QString &path, const QPoint &qpoint);
#endif
class UICallback
{
public:
virtual void logText(const QString &text, bool isHTML)=0;
virtual void beginProcess(const QString &text)=0;
virtual void updateProcess(const QString &text)=0;
virtual void endProcess()=0;
virtual QMessageBox::StandardButton Query(const QString &title, const QString &query, QMessageBox::StandardButtons buttons)=0;
};
class ScopedStatus
{
public:
ScopedStatus(UICallback *callback, const QString &text) : uiCallback(callback)
{
uiCallback->beginProcess(text);
}
~ScopedStatus()
{
uiCallback->endProcess();
}
private:
UICallback *uiCallback;
};
#endif // UTILS_H

218
src/Workspace.cpp Normal file
View File

@ -0,0 +1,218 @@
#include "Workspace.h"
#include <QCoreApplication>
#include "Utils.h"
//-----------------------------------------------------------------------------
Workspace::~Workspace()
{
clearState();
}
//------------------------------------------------------------------------------
void Workspace::clearState()
{
// Dispose RepoFiles
foreach(WorkspaceFile *r, getFiles())
delete r;
getFiles().clear();
getPaths().clear();
stashMap.clear();
branchList.clear();
tags.clear();
isIntegrated = false;
}
//------------------------------------------------------------------------------
bool Workspace::scanDirectory(QFileInfoList &entries, const QString& dirPath, const QString &baseDir, const QString ignoreSpec, const bool &abort, UICallback &uiCallback)
{
QDir dir(dirPath);
uiCallback.updateProcess(dirPath);
QFileInfoList list = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot);
for (int i=0; i<list.count(); ++i)
{
if(abort)
return false;
QFileInfo info = list[i];
QString filepath = info.filePath();
QString rel_path = filepath;
rel_path.remove(baseDir+PATH_SEPARATOR);
// Skip ignored files
if(!ignoreSpec.isEmpty() && QDir::match(ignoreSpec, rel_path))
continue;
if (info.isDir())
{
if(!scanDirectory(entries, filepath, baseDir, ignoreSpec, abort, uiCallback))
return false;
}
else
entries.push_back(info);
}
return true;
}
//------------------------------------------------------------------------------
void Workspace::scanWorkspace(bool scanLocal, bool scanIgnored, bool scanModified, bool scanUnchanged, const QString &ignoreGlob, UICallback &uiCallback, bool &operationAborted)
{
// Scan all workspace files
QFileInfoList all_files;
QString wkdir = fossil().getCurrentWorkspace();
if(wkdir.isEmpty())
return;
// Retrieve the status of files tracked by fossil
QStringList res;
if(!fossil().listFiles(res))
return;
bool scan_files = scanLocal;
clearState();
operationAborted = false;
uiCallback.beginProcess("");
if(scan_files)
{
QCoreApplication::processEvents();
QString ignore;
// If we should not be showing ignored files, fill in the ignored spec
if(!scanIgnored)
{
// QDir expects multiple specs being separated by a semicolon
ignore = ignoreGlob;
ignore.replace(',',';');
}
if(!scanDirectory(all_files, wkdir, wkdir, ignore, operationAborted, uiCallback))
goto _done;
for(QFileInfoList::iterator it=all_files.begin(); it!=all_files.end(); ++it)
{
QString filename = it->fileName();
QString fullpath = it->absoluteFilePath();
// Skip fossil files
if(filename == FOSSIL_CHECKOUT1 || filename == FOSSIL_CHECKOUT2 || (!fossil().getRepositoryFile().isEmpty() && QFileInfo(fullpath) == QFileInfo(fossil().getRepositoryFile())))
continue;
WorkspaceFile *rf = new WorkspaceFile(*it, WorkspaceFile::TYPE_UNKNOWN, wkdir);
getFiles().insert(rf->getFilePath(), rf);
getPaths().insert(rf->getPath());
}
}
uiCallback.endProcess();
uiCallback.beginProcess(QObject::tr("Updating..."));
// Update Files and Directories
for(QStringList::iterator line_it=res.begin(); line_it!=res.end(); ++line_it)
{
QString line = (*line_it).trimmed();
if(line.length()==0)
continue;
int space_index = line.indexOf(' ');
if(space_index==-1)
continue;
QString status_text = line.left(space_index);
QString fname = line.right(line.length() - space_index).trimmed();
WorkspaceFile::Type type = WorkspaceFile::TYPE_UNKNOWN;
// Generate a RepoFile for all non-existant fossil files
// or for all files if we skipped scanning the workspace
bool add_missing = !scan_files;
if(status_text=="EDITED")
type = WorkspaceFile::TYPE_EDITTED;
else if(status_text=="ADDED")
type = WorkspaceFile::TYPE_ADDED;
else if(status_text=="DELETED")
{
type = WorkspaceFile::TYPE_DELETED;
add_missing = true;
}
else if(status_text=="MISSING")
{
type = WorkspaceFile::TYPE_MISSING;
add_missing = true;
}
else if(status_text=="RENAMED")
type = WorkspaceFile::TYPE_RENAMED;
else if(status_text=="UNCHANGED")
type = WorkspaceFile::TYPE_UNCHANGED;
else if(status_text=="CONFLICT")
type = WorkspaceFile::TYPE_CONFLICTED;
else if(status_text=="UPDATED_BY_MERGE" || status_text=="ADDED_BY_MERGE" || status_text=="ADDED_BY_INTEGRATE" || status_text=="UPDATED_BY_INTEGRATE")
type = WorkspaceFile::TYPE_MERGED;
// Filter unwanted file types
if( ((type & WorkspaceFile::TYPE_MODIFIED) && !scanModified) ||
((type & WorkspaceFile::TYPE_UNCHANGED) && !scanUnchanged))
{
getFiles().remove(fname);
continue;
}
else
add_missing = true;
Workspace::filemap_t::iterator it = getFiles().find(fname);
WorkspaceFile *rf = 0;
if(add_missing && it==getFiles().end())
{
QFileInfo info(wkdir+QDir::separator()+fname);
rf = new WorkspaceFile(info, type, wkdir);
getFiles().insert(rf->getFilePath(), rf);
}
if(!rf)
{
it = getFiles().find(fname);
Q_ASSERT(it!=getFiles().end());
rf = *it;
}
rf->setType(type);
QString path = rf->getPath();
getPaths().insert(path);
}
// Check if the repository needs integration
res.clear();
fossil().status(res);
isIntegrated = false;
foreach(const QString &l, res)
{
if(l.trimmed().indexOf("INTEGRATE")==0)
{
isIntegrated = true;
break;
}
}
// Load the stashes, branches and tags
fossil().stashList(getStashes());
fossil().branchList(branchList, branchList);
fossil().tagList(tags);
// Fossil includes the branches in the tag list
// So remove them
foreach(const QString &name, branchList)
tags.remove(name);
_done:
uiCallback.endProcess();
}

145
src/Workspace.h Normal file
View File

@ -0,0 +1,145 @@
#ifndef WORKSPACE_H
#define WORKSPACE_H
#include <QStandardItemModel>
#include <QFileInfo>
#include <QDir>
#include <QSet>
#include <QMap>
#include "Utils.h"
#include "Fossil.h"
//////////////////////////////////////////////////////////////////////////
// WorkspaceFile
//////////////////////////////////////////////////////////////////////////
struct WorkspaceFile
{
enum Type
{
TYPE_UNKNOWN = 1<<0,
TYPE_UNCHANGED = 1<<1,
TYPE_EDITTED = 1<<2,
TYPE_ADDED = 1<<3,
TYPE_DELETED = 1<<4,
TYPE_MISSING = 1<<5,
TYPE_RENAMED = 1<<6,
TYPE_CONFLICTED = 1<<7,
TYPE_MERGED = 1<<8,
TYPE_MODIFIED = TYPE_EDITTED|TYPE_ADDED|TYPE_DELETED|TYPE_MISSING|TYPE_RENAMED|TYPE_CONFLICTED|TYPE_MERGED,
TYPE_REPO = TYPE_UNCHANGED|TYPE_MODIFIED,
TYPE_ALL = TYPE_UNKNOWN|TYPE_REPO
};
WorkspaceFile(const QFileInfo &info, Type type, const QString &repoPath)
{
FileInfo = info;
FileType = type;
FilePath = getRelativeFilename(repoPath);
Path = FileInfo.absolutePath();
// Strip the workspace path from the path
Q_ASSERT(Path.indexOf(repoPath)==0);
Path = Path.mid(repoPath.length()+1);
}
bool isType(Type t) const
{
return FileType == t;
}
void setType(Type t)
{
FileType = t;
}
Type getType() const
{
return FileType;
}
QFileInfo getFileInfo() const
{
return FileInfo;
}
const QString &getFilePath() const
{
return FilePath;
}
QString getFilename() const
{
return FileInfo.fileName();
}
const QString &getPath() const
{
return Path;
}
QString getRelativeFilename(const QString &path)
{
QString abs_base_dir = QDir(path).absolutePath();
QString relative = FileInfo.absoluteFilePath();
int index = relative.indexOf(abs_base_dir);
if(index<0)
return QString("");
return relative.right(relative.length() - abs_base_dir.length()-1);
}
private:
QFileInfo FileInfo;
Type FileType;
QString FilePath;
QString Path;
};
typedef QSet<QString> stringset_t;
//////////////////////////////////////////////////////////////////////////
// Workspace
//////////////////////////////////////////////////////////////////////////
class Workspace
{
public:
~Workspace();
typedef QList<WorkspaceFile*> filelist_t;
typedef QMap<QString, WorkspaceFile*> filemap_t;
void clearState();
Fossil & fossil() { return bridge; }
const Fossil & fossil() const { return bridge; }
static bool scanDirectory(QFileInfoList &entries, const QString& dirPath, const QString &baseDir, const QString ignoreSpec, const bool& abort, UICallback &uiCallback);
void scanWorkspace(bool scanLocal, bool scanIgnored, bool scanModified, bool scanUnchanged, const QString &ignoreGlob, UICallback &uiCallback, bool &operationAborted);
QStandardItemModel &getFileModel() { return repoFileModel; }
QStandardItemModel &getTreeModel() { return repoTreeModel; }
filemap_t &getFiles() { return workspaceFiles; }
stringset_t &getPaths() { return pathSet; }
stashmap_t &getStashes() { return stashMap; }
QStringMap &getTags() { return tags; }
QStringList &getBranches() { return branchList; }
bool otherChanges() const { return isIntegrated; }
private:
Fossil bridge;
filemap_t workspaceFiles;
stringset_t pathSet;
stashmap_t stashMap;
QStringList branchList;
QStringMap tags;
bool isIntegrated;
QStandardItemModel repoFileModel;
QStandardItemModel repoTreeModel;
};
#endif // WORKSPACE_H

View File

@ -5,7 +5,7 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setApplicationName("Fuel");
app.setApplicationVersion("1.0.1");
app.setApplicationVersion("2.0.0");
app.setOrganizationDomain("fuel-scm.org");
app.setOrganizationName("Fuel-SCM");

View File

@ -14,7 +14,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@ -44,7 +53,7 @@
<action name="actionBrowserBack">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Previous-01.png</normaloff>:/icons/icons/Button Previous-01.png</iconset>
<normaloff>:/icons/icon-action-previous</normaloff>:/icons/icon-action-previous</iconset>
</property>
<property name="text">
<string>Back</string>
@ -56,7 +65,7 @@
<action name="actionBrowserForward">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Next-01.png</normaloff>:/icons/icons/Button Next-01.png</iconset>
<normaloff>:/icons/icon-action-next</normaloff>:/icons/icon-action-next</iconset>
</property>
<property name="text">
<string>Forward</string>
@ -68,7 +77,7 @@
<action name="actionBrowserRefresh">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Refresh-01.png</normaloff>:/icons/icons/Button Refresh-01.png</iconset>
<normaloff>:/icons/icon-action-refresh</normaloff>:/icons/icon-action-refresh</iconset>
</property>
<property name="text">
<string>Refresh</string>
@ -80,7 +89,7 @@
<action name="actionBrowserStop">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Close-01.png</normaloff>:/icons/icons/Button Close-01.png</iconset>
<normaloff>:/icons/icon-action-stop</normaloff>:/icons/icon-action-stop</iconset>
</property>
<property name="text">
<string>Stop</string>

View File

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<height>394</height>
</rect>
</property>
<property name="windowTitle">
@ -62,9 +62,72 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox">
<widget class="QWidget" name="widgetBranchOptions" native="true">
<layout class="QFormLayout" name="formLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>New branch</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chkNewBranch">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="chkPrivateBranch">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineBranchName">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Branch name</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Private branch</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkRevertFiles">
<property name="text">
<string/>
<string>Revert stashed files</string>
</property>
</widget>
</item>

300
ui/FslSettingsDialog.ui Normal file
View File

@ -0,0 +1,300 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FslSettingsDialog</class>
<widget class="QDialog" name="FslSettingsDialog">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>457</width>
<height>266</height>
</rect>
</property>
<property name="windowTitle">
<string>Fossil Settings</string>
</property>
<property name="windowIcon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icon-application</normaloff>:/icons/icon-application</iconset>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QFormLayout" name="formLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Graphical Diff </string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLineEdit" name="lineGDiffCommand">
<property name="toolTip">
<string>Path to graphical diff tool</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnSelectFossilGDiff">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Graphical Merge</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLineEdit" name="lineGMergeCommand">
<property name="toolTip">
<string>Path to the graphical merge tool</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnSelectGMerge">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_44">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>HTTP Proxy</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineProxy">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>The URL of the HTTP proxy</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="uILanguageLabel_3">
<property name="text">
<string>HTTP Port</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineUIPort">
<property name="toolTip">
<string>HTTP port to use for the Fossil web interface</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineIgnoreCRNL">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>A comma separated list of glob-style file patterns to exclude from Fossil's CR/NL consistency checking</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Ignore CR/NL</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLineEdit" name="lineIgnore">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>A comma separated list of glob-style file/path patterns ignored in Fossil file operations</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Ignore List</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="lineRemoteURL">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>The remote url used to push/pull changes.
URL style user names and passwords are also supported.
For example http://username:password@server.com/fossil</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Remote Url</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../rsrc/resources.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>FslSettingsDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>FslSettingsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -18,7 +18,7 @@
</property>
<property name="windowIcon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Battery-01.png</normaloff>:/icons/icons/Battery-01.png</iconset>
<normaloff>:/icons/icon-application</normaloff>:/icons/icon-application</iconset>
</property>
<property name="unifiedTitleAndToolBarOnMac">
<bool>true</bool>
@ -58,7 +58,7 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeView" name="treeView">
<widget class="QTreeView" name="workspaceTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>20</horstretch>
@ -66,7 +66,7 @@
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
@ -78,16 +78,13 @@
<enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
<bool>false</bool>
</property>
<attribute name="headerVisible">
<bool>true</bool>
</attribute>
<attribute name="headerShowSortIndicator" stdset="0">
<bool>false</bool>
</attribute>
</widget>
<widget class="FileTableView" name="tableView">
<widget class="FileTableView" name="fileTableView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>80</horstretch>
@ -140,44 +137,6 @@
<number>30</number>
</attribute>
</widget>
<widget class="QTableView" name="tableViewStash">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>20</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::ActionsContextMenu</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</widget>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
@ -190,7 +149,7 @@
<enum>QTabWidget::South</enum>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabLog">
<attribute name="title">
@ -263,7 +222,7 @@
<x>0</x>
<y>0</y>
<width>865</width>
<height>22</height>
<height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@ -295,13 +254,34 @@
<addaction name="actionViewUnchanged"/>
<addaction name="actionViewUnknown"/>
<addaction name="actionViewIgnored"/>
<addaction name="separator"/>
<addaction name="actionViewStash"/>
<addaction name="actionViewAll"/>
<addaction name="separator"/>
<addaction name="actionViewAsList"/>
<addaction name="actionViewAsFolders"/>
</widget>
<widget class="QMenu" name="menuWorkspace">
<property name="title">
<string>&amp;Workspace</string>
</property>
<addaction name="actionRefresh"/>
<addaction name="separator"/>
<addaction name="actionCommit"/>
<addaction name="actionUpdate"/>
<addaction name="separator"/>
<addaction name="actionPush"/>
<addaction name="actionPull"/>
<addaction name="separator"/>
<addaction name="actionUndo"/>
<addaction name="separator"/>
<addaction name="actionCreateBranch"/>
<addaction name="actionCreateTag"/>
<addaction name="actionCreateStash"/>
<addaction name="separator"/>
<addaction name="actionFossilSettings"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuView"/>
<addaction name="menuWorkspace"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QToolBar" name="mainToolBar">
@ -343,8 +323,6 @@
<addaction name="actionRevert"/>
<addaction name="actionDelete"/>
<addaction name="separator"/>
<addaction name="actionNewStash"/>
<addaction name="separator"/>
<addaction name="actionDiff"/>
<addaction name="actionHistory"/>
<addaction name="separator"/>
@ -357,10 +335,10 @@
<action name="actionRefresh">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Refresh-01.png</normaloff>:/icons/icons/Button Refresh-01.png</iconset>
<normaloff>:/icons/icon-action-refresh</normaloff>:/icons/icon-action-refresh</iconset>
</property>
<property name="text">
<string>Refresh</string>
<string>&amp;Refresh</string>
</property>
<property name="toolTip">
<string>Refresh the views</string>
@ -375,10 +353,10 @@
<action name="actionCommit">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Save-01.png</normaloff>:/icons/icons/Save-01.png</iconset>
<normaloff>:/icons/icon-action-commit</normaloff>:/icons/icon-action-commit</iconset>
</property>
<property name="text">
<string>Commit</string>
<string>&amp;Commit</string>
</property>
<property name="toolTip">
<string>Commit modifications</string>
@ -393,7 +371,7 @@
<action name="actionDiff">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Document Copy-01.png</normaloff>:/icons/icons/Document Copy-01.png</iconset>
<normaloff>:/icons/icon-item-diff</normaloff>:/icons/icon-item-diff</iconset>
</property>
<property name="text">
<string>Diff</string>
@ -411,7 +389,7 @@
<action name="actionAdd">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/File New-01.png</normaloff>:/icons/icons/File New-01.png</iconset>
<normaloff>:/icons/icon-item-add</normaloff>:/icons/icon-item-add</iconset>
</property>
<property name="text">
<string>Add</string>
@ -429,7 +407,7 @@
<action name="actionDelete">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/File Delete-01.png</normaloff>:/icons/icons/File Delete-01.png</iconset>
<normaloff>:/icons/icon-item-delete</normaloff>:/icons/icon-item-delete</iconset>
</property>
<property name="text">
<string>Delete</string>
@ -447,7 +425,7 @@
<action name="actionNewRepository">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Document Blank-01.png</normaloff>:/icons/icons/Document Blank-01.png</iconset>
<normaloff>:/icons/icon-action-repo-new</normaloff>:/icons/icon-action-repo-new</iconset>
</property>
<property name="text">
<string>&amp;New...</string>
@ -465,7 +443,7 @@
<action name="actionOpenRepository">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/My Documents-01.png</normaloff>:/icons/icons/My Documents-01.png</iconset>
<normaloff>:/icons/icon-action-repo-open</normaloff>:/icons/icon-action-repo-open</iconset>
</property>
<property name="text">
<string>&amp;Open...</string>
@ -497,10 +475,10 @@
<action name="actionCloneRepository">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/My Websites-01.png</normaloff>:/icons/icons/My Websites-01.png</iconset>
<normaloff>:/icons/icon-action-repo-clone</normaloff>:/icons/icon-action-repo-clone</iconset>
</property>
<property name="text">
<string>Clone...</string>
<string>C&amp;lone...</string>
</property>
<property name="statusTip">
<string>Clone a remote repository</string>
@ -509,10 +487,10 @@
<action name="actionPush">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Upload-01.png</normaloff>:/icons/icons/Button Upload-01.png</iconset>
<normaloff>:/icons/icon-action-push</normaloff>:/icons/icon-action-push</iconset>
</property>
<property name="text">
<string>Push</string>
<string>&amp;Push</string>
</property>
<property name="toolTip">
<string>Push changes to the remote repository</string>
@ -527,10 +505,10 @@
<action name="actionPull">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Download-01.png</normaloff>:/icons/icons/Button Download-01.png</iconset>
<normaloff>:/icons/icon-action-pull</normaloff>:/icons/icon-action-pull</iconset>
</property>
<property name="text">
<string>Pull</string>
<string>Pu&amp;ll</string>
</property>
<property name="toolTip">
<string>Pull changes from the remote repository</string>
@ -545,7 +523,7 @@
<action name="actionRename">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/File Open-01.png</normaloff>:/icons/icons/File Open-01.png</iconset>
<normaloff>:/icons/icon-item-rename</normaloff>:/icons/icon-item-rename</iconset>
</property>
<property name="text">
<string>Rename</string>
@ -563,7 +541,7 @@
<action name="actionQuit">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Turn Off-01.png</normaloff>:/icons/icons/Button Turn Off-01.png</iconset>
<normaloff>:/icons/icon-action-quit</normaloff>:/icons/icon-action-quit</iconset>
</property>
<property name="text">
<string>&amp;Quit</string>
@ -584,7 +562,7 @@
<action name="actionHistory">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/File History-01.png</normaloff>:/icons/icons/File History-01.png</iconset>
<normaloff>:/icons/icon-item-history</normaloff>:/icons/icon-item-history</iconset>
</property>
<property name="text">
<string>History</string>
@ -605,7 +583,7 @@
</property>
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Network MAC-01.png</normaloff>:/icons/icons/Network MAC-01.png</iconset>
<normaloff>:/icons/icon-webview</normaloff>:/icons/icon-webview</iconset>
</property>
<property name="text">
<string>Fossil UI</string>
@ -620,7 +598,7 @@
<action name="actionRevert">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Document-Revert-icon.png</normaloff>:/icons/icons/Document-Revert-icon.png</iconset>
<normaloff>:/icons/icon-item-revert</normaloff>:/icons/icon-item-revert</iconset>
</property>
<property name="text">
<string>Revert</string>
@ -635,7 +613,7 @@
<action name="actionClearLog">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Text Edit.png</normaloff>:/icons/icons/Text Edit.png</iconset>
<normaloff>:/icons/icon-clear-log</normaloff>:/icons/icon-clear-log</iconset>
</property>
<property name="text">
<string>Clear Log</string>
@ -650,7 +628,7 @@
<action name="actionTimeline">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Clock-01.png</normaloff>:/icons/icons/Clock-01.png</iconset>
<normaloff>:/icons/icon-action-timeline</normaloff>:/icons/icon-action-timeline</iconset>
</property>
<property name="text">
<string>Timeline</string>
@ -665,7 +643,7 @@
<action name="actionOpenFile">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Document-01.png</normaloff>:/icons/icons/Document-01.png</iconset>
<normaloff>:/icons/icon-item-file</normaloff>:/icons/icon-item-file</iconset>
</property>
<property name="text">
<string>Open File</string>
@ -683,7 +661,7 @@
<action name="actionOpenContaining">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Folder-01.png</normaloff>:/icons/icons/Folder-01.png</iconset>
<normaloff>:/icons/icon-action-folder-explore</normaloff>:/icons/icon-action-folder-explore</iconset>
</property>
<property name="text">
<string>Open Containing</string>
@ -701,10 +679,10 @@
<action name="actionUndo">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Reload-01.png</normaloff>:/icons/icons/Button Reload-01.png</iconset>
<normaloff>:/icons/icon-action-undo</normaloff>:/icons/icon-action-undo</iconset>
</property>
<property name="text">
<string>Undo</string>
<string>U&amp;ndo</string>
</property>
<property name="toolTip">
<string>Undo the last Fossil action</string>
@ -719,7 +697,7 @@
<action name="actionAbout">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Battery-01.png</normaloff>:/icons/icons/Battery-01.png</iconset>
<normaloff>:/icons/icon-application</normaloff>:/icons/icon-application</iconset>
</property>
<property name="text">
<string>&amp;About...</string>
@ -734,13 +712,13 @@
<action name="actionUpdate">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Button Play-01.png</normaloff>:/icons/icons/Button Play-01.png</iconset>
<normaloff>:/icons/icon-action-update</normaloff>:/icons/icon-action-update</iconset>
</property>
<property name="text">
<string>Update</string>
<string>&amp;Update</string>
</property>
<property name="toolTip">
<string>Update the workspace to the latest version</string>
<string>Update the workspace to a revision</string>
</property>
<property name="statusTip">
<string>Update the workspace to the latest version</string>
@ -752,7 +730,7 @@
<action name="actionSettings">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Gear-01.png</normaloff>:/icons/icons/Gear-01.png</iconset>
<normaloff>:/icons/icon-action-settings</normaloff>:/icons/icon-action-settings</iconset>
</property>
<property name="text">
<string>&amp;Preferences...</string>
@ -840,7 +818,7 @@
<action name="actionOpenFolder">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Folder-01.png</normaloff>:/icons/icons/Folder-01.png</iconset>
<normaloff>:/icons/icon-item-folder</normaloff>:/icons/icon-item-folder</iconset>
</property>
<property name="text">
<string>Open Folder</string>
@ -855,7 +833,7 @@
<action name="actionRenameFolder">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Folder Open-01.png</normaloff>:/icons/icons/Folder Open-01.png</iconset>
<normaloff>:/icons/icon-action-folder-rename</normaloff>:/icons/icon-action-folder-rename</iconset>
</property>
<property name="text">
<string>Rename Folder</string>
@ -867,13 +845,13 @@
<string>Rename the selected folder</string>
</property>
</action>
<action name="actionNewStash">
<action name="actionCreateStash">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Folder Add-01.png</normaloff>:/icons/icons/Folder Add-01.png</iconset>
<normaloff>:/icons/icon-action-stash-new</normaloff>:/icons/icon-action-stash-new</iconset>
</property>
<property name="text">
<string>Stash changes</string>
<string>&amp;Stash Changes</string>
</property>
<property name="statusTip">
<string>Stash changes</string>
@ -882,7 +860,7 @@
<action name="actionApplyStash">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Folder Open-01.png</normaloff>:/icons/icons/Folder Open-01.png</iconset>
<normaloff>:/icons/icon-action-stash-apply</normaloff>:/icons/icon-action-stash-apply</iconset>
</property>
<property name="text">
<string>Apply Stash</string>
@ -894,27 +872,10 @@
<string>Apply stashed changes</string>
</property>
</action>
<action name="actionViewStash">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>&amp;Stashed Changes</string>
</property>
<property name="iconText">
<string>View Stashed Changes</string>
</property>
<property name="toolTip">
<string>View Stashed Changes</string>
</property>
<property name="statusTip">
<string>Show the list of stashed changes</string>
</property>
</action>
<action name="actionDeleteStash">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Folder Delete-01.png</normaloff>:/icons/icons/Folder Delete-01.png</iconset>
<normaloff>:/icons/icon-action-stash-delete</normaloff>:/icons/icon-action-stash-delete</iconset>
</property>
<property name="text">
<string>Delete Stash</string>
@ -923,12 +884,100 @@
<action name="actionDiffStash">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Folder Explorer-01.png</normaloff>:/icons/icons/Folder Explorer-01.png</iconset>
<normaloff>:/icons/icon-action-stash-diff</normaloff>:/icons/icon-action-stash-diff</iconset>
</property>
<property name="text">
<string>Diff Stash</string>
</property>
</action>
<action name="actionCreateTag">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icon-action-tag-new</normaloff>:/icons/icon-action-tag-new</iconset>
</property>
<property name="text">
<string>Create &amp;Tag</string>
</property>
<property name="toolTip">
<string>Create a tag for a revision</string>
</property>
<property name="statusTip">
<string>Create a tag for a revision</string>
</property>
</action>
<action name="actionDeleteTag">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icon-action-tag-delete</normaloff>:/icons/icon-action-tag-delete</iconset>
</property>
<property name="text">
<string>Delete Tag</string>
</property>
<property name="toolTip">
<string>Delete Tag</string>
</property>
</action>
<action name="actionCreateBranch">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icon-item-branch</normaloff>:/icons/icon-item-branch</iconset>
</property>
<property name="text">
<string>Create &amp;Branch</string>
</property>
<property name="toolTip">
<string>Create a branch from a revision</string>
</property>
<property name="statusTip">
<string>Create a branch from a revision</string>
</property>
</action>
<action name="actionMergeBranch">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icon-action-merge</normaloff>:/icons/icon-action-merge</iconset>
</property>
<property name="text">
<string>Merge Branch</string>
</property>
<property name="toolTip">
<string>Merge with a branch</string>
</property>
<property name="statusTip">
<string>Merge with a branch</string>
</property>
</action>
<action name="actionViewAsFolders">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Files and F&amp;olders</string>
</property>
<property name="toolTip">
<string>View files and folders</string>
</property>
<property name="statusTip">
<string>View the workspace as files and folders</string>
</property>
</action>
<action name="actionViewAll">
<property name="text">
<string>&amp;All</string>
</property>
<property name="statusTip">
<string>Show all files</string>
</property>
</action>
<action name="actionFossilSettings">
<property name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icon-action-settings</normaloff>:/icons/icon-action-settings</iconset>
</property>
<property name="text">
<string>F&amp;ossil Settings</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>

129
ui/RevisionDialog.ui Normal file
View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RevisionDialog</class>
<widget class="QDialog" name="RevisionDialog">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>478</width>
<height>177</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="lblRevision">
<property name="text">
<string>Revision</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbRevision">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblName">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineName"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblIntegrate">
<property name="text">
<string>Integrate</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblForce">
<property name="text">
<string>Force</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkIntegrate">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkForce">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>RevisionDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>RevisionDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -10,396 +10,177 @@
<x>0</x>
<y>0</y>
<width>457</width>
<height>352</height>
<height>204</height>
</rect>
</property>
<property name="windowTitle">
<string>Settings</string>
</property>
<property name="windowIcon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icon-application</normaloff>:/icons/icon-application</iconset>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabApp">
<attribute name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Battery-01.png</normaloff>:/icons/icons/Battery-01.png</iconset>
</attribute>
<attribute name="title">
<string>Application</string>
</attribute>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Fossil Path</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLineEdit" name="lineFossilPath">
<property name="toolTip">
<string>Path to the Fossil executable. Leave blank to use the default Fossil</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnSelectFossil">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Graphical Diff </string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLineEdit" name="lineGDiffCommand">
<property name="toolTip">
<string>Path to graphical diff tool</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnSelectFossilGDiff">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Graphical Merge</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLineEdit" name="lineGMergeCommand">
<property name="toolTip">
<string>Path to the graphical merge tool</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnSelectGMerge">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_44">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>HTTP Proxy</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineProxy">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>The URL of the HTTP proxy</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="uILanguageLabel_3">
<property name="text">
<string>HTTP Port</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineUIPort">
<property name="toolTip">
<string>HTTP port to use for the Fossil web interface</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Commit Messages</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="btnClearMessageHistory">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Clear the commit message history</string>
</property>
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="uILanguageLabel_2">
<property name="text">
<string>Web Browser</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="cmbFossilBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Web browser to use for the Fossil web interface</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Double-click Action</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QComboBox" name="cmbDoubleClickAction">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Action to perfom when double-clicking a file</string>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="uILanguageLabel">
<property name="text">
<string>Language</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="cmbActiveLanguage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Language for the user interface</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabRepo">
<attribute name="icon">
<iconset resource="../rsrc/resources.qrc">
<normaloff>:/icons/icons/Book-01.png</normaloff>:/icons/icons/Book-01.png</iconset>
</attribute>
<attribute name="title">
<string>Repository</string>
</attribute>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Remote Url</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineRemoteURL">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>The remote url used to push/pull changes.
URL style user names and passwords are also supported.
For example http://username:password@server.com/fossil</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Ignore List</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineIgnore">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>A comma separated list of glob-style file/path patterns ignored in Fossil file operations</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Ignore CR/NL</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineIgnoreCRNL">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>A comma separated list of glob-style file patterns to exclude from Fossil's CR/NL consistency checking</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="widget" native="true">
<layout class="QFormLayout" name="formLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Fossil Path</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLineEdit" name="lineFossilPath">
<property name="toolTip">
<string>Path to the Fossil executable. Leave blank to use the default Fossil</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnSelectFossil">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_6">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Commit Messages</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="btnClearMessageHistory">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Clear the commit message history</string>
</property>
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="uILanguageLabel_2">
<property name="text">
<string>Web Browser</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="cmbFossilBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Web browser to use for the Fossil web interface</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_8">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Double-click Action</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="cmbDoubleClickAction">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Action to perfom when double-clicking a file</string>
</property>
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="uILanguageLabel">
<property name="text">
<string>Language</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="cmbActiveLanguage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Language for the user interface</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>