diff --git a/fuel.pro b/fuel.pro index 3552950..24f00c4 100644 --- a/fuel.pro +++ b/fuel.pro @@ -45,7 +45,8 @@ SOURCES += src/main.cpp\ src/Utils.cpp \ src/FileTableView.cpp \ src/CloneDialog.cpp \ - src/LoggedProcess.cpp + src/LoggedProcess.cpp \ + src/BrowserWidget.cpp HEADERS += src/MainWindow.h \ src/CommitDialog.h \ @@ -54,13 +55,15 @@ HEADERS += src/MainWindow.h \ src/Utils.h \ src/FileTableView.h \ src/CloneDialog.h \ - src/LoggedProcess.h + src/LoggedProcess.h \ + src/BrowserWidget.h FORMS += ui/MainWindow.ui \ ui/CommitDialog.ui \ ui/FileActionDialog.ui \ ui/SettingsDialog.ui \ - ui/CloneDialog.ui + ui/CloneDialog.ui \ + ui/BrowserWidget.ui RESOURCES += \ rsrc/resources.qrc diff --git a/manifest b/manifest index a4a2a61..06ca023 100644 --- a/manifest +++ b/manifest @@ -1,11 +1,11 @@ -C Added\sFrench\stranslation.\sThanks\sFringale\nFixed\sEnglish\stext -D 2012-12-22T04:03:17.922 +C Replaced\sWebView\swith\sa\scustom\sBrowserWidget\nAdded\sbrowser\snavigation\sbuttons\sand\surl\stextbox\n\n\n +D 2012-12-22T16:29:06.140 F dist/arch/PKGBUILD bf020b73b610f4c14e38feba027fe8f45b4fbc5c F dist/win/fuel.iss ef3558dbba409eb194938b930377fc9ee27d319e F doc/Building.txt 7c0f1060d4a08ed330058d4a3a68905c05228381 F doc/Changes.txt b4494e409960f22705c8624eaa935e3f195df10b F doc/License.txt 4cc77b90af91e615a64ae04893fdffa7939db84c -F fuel.pro 2241d17c100af7bfb338daca12af9ae2cc45204a +F fuel.pro 5ca9e8f6817cda42dbdd4f02079bb33e9044db5e F intl/convert.bat 7e878e302a8be2324fd51b9eed1aab272dbd8bbd x F intl/convert.sh 5694496585ff5f4363c90ff8b6f48e19e0b6b4aa x F intl/de_DE.ts 6230de8f647218960853b339909cf8c3d09f45ed @@ -172,6 +172,8 @@ F rsrc/icons/fuel.icns 81e535004b62db801a02f3e15d0a33afc9d4070b F rsrc/icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038 F rsrc/icons/fuel.png 40daf53b7f6bdcdd0d6aa5ef433d078ec5ea4342 F rsrc/resources.qrc cce04d202b0f833ee1057ab2aa33782c45370161 +F src/BrowserWidget.cpp 8b8f545cdff4a4188edc698a1b4777f5df46f056 +F src/BrowserWidget.h 764d66aa9a93b890298bd0301097739cb4e16597 F src/CloneDialog.cpp 8652480baa3f13f0f0e7df019751338c7cbeb1b5 F src/CloneDialog.h c97e8c266819292622ca3e84b68e04e81ec05ba3 F src/CommitDialog.cpp 5300522ac11bc1096a11a6ce22f8c1665d4afc05 @@ -190,12 +192,13 @@ F src/Utils.cpp caca5268e3194abe77211040bf9511a82909d2e6 F src/Utils.h 5af911147390879176e587fc60fb662490bb9e97 F src/main.cpp 8f8790822f82870a12169bcf204e571138adb065 F tools/pack.sh d7f38a498c4e9327fecd6a6e5ac27be270d43008 x +F ui/BrowserWidget.ui e0f4fa810d1989b77e503d37ccb6b01e1c9b4129 F ui/CloneDialog.ui 0fc820804df91f16506ee466a44519fdd44e468f F ui/CommitDialog.ui 6200f6cabdcf40a20812e811be28e0793f82516f F ui/FileActionDialog.ui 89bb4dc2d0b8adcd41adcb11ec65f2028a09a12d -F ui/MainWindow.ui c0d25619f571d67f8e1607ac010be88636dbf287 +F ui/MainWindow.ui 624844304042b74c462df27793a433183049f43f F ui/SettingsDialog.ui 55aefad7145c40d936c43759789d1b50e361b020 -P 5de753035ea0f6c277123f36d25a2d35fb5c63c9 -R 1185bb8d4def5093dc95a19e4291af34 +P 8bcd65e5fa2194a7edb5ddf56e5c9caddd7316cf +R 9ab6b655f11070587a547e7ffdee40a0 U kostas -Z 494b8b9aa442d41541a84207deb8dfef +Z 9493aba2c684dca13ce6b9bb52bb4ebd diff --git a/manifest.uuid b/manifest.uuid index c09a711..fd7a47f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -8bcd65e5fa2194a7edb5ddf56e5c9caddd7316cf \ No newline at end of file +4914092dd81da4678e5aa76e8c8a15bc7cb1e146 \ No newline at end of file diff --git a/src/BrowserWidget.cpp b/src/BrowserWidget.cpp new file mode 100644 index 0000000..6604a65 --- /dev/null +++ b/src/BrowserWidget.cpp @@ -0,0 +1,73 @@ +#include +#include "BrowserWidget.h" +#include "ui_BrowserWidget.h" + +BrowserWidget::BrowserWidget(QWidget *parent) : + QWidget(parent), + loading(false) +{ + ui = new Ui::BrowserWidget; + ui->setupUi(this); + ui->toolBar->addWidget(ui->txtUrl); + connect(ui->txtUrl, SIGNAL(returnPressed()), this, SLOT(on_txtUrl_returnPressed()) ); + ui->actionBrowserStop->setVisible(false); +} + +BrowserWidget::~BrowserWidget() +{ + delete ui; +} + +void BrowserWidget::load(const QUrl &url) +{ + ui->webView->load(url); +} + +void BrowserWidget::on_webView_urlChanged(const QUrl &url) +{ + ui->txtUrl->setText(url.toString()); +} + +void BrowserWidget::on_webView_loadStarted() +{ + loading=true; + ui->actionBrowserRefresh->setVisible(false); + ui->actionBrowserStop->setVisible(true); +} + +void BrowserWidget::on_webView_loadFinished(bool /*errorOccured*/) +{ + loading=false; + ui->actionBrowserRefresh->setVisible(true); + ui->actionBrowserStop->setVisible(false); +} + + +void BrowserWidget::on_txtUrl_returnPressed() +{ + QUrl url(ui->txtUrl->text()); + if(url.scheme().isEmpty()) + url.setScheme("http"); + ui->webView->load(url); +} + + +void BrowserWidget::on_actionBrowserBack_triggered() +{ + ui->webView->back(); +} + +void BrowserWidget::on_actionBrowserForward_triggered() +{ + ui->webView->forward(); +} + +void BrowserWidget::on_actionBrowserRefresh_triggered() +{ + ui->webView->reload(); +} + +void BrowserWidget::on_actionBrowserStop_triggered() +{ + ui->webView->stop(); +} diff --git a/src/BrowserWidget.h b/src/BrowserWidget.h new file mode 100644 index 0000000..263cab0 --- /dev/null +++ b/src/BrowserWidget.h @@ -0,0 +1,37 @@ +#ifndef BROWSERWIDGET_H +#define BROWSERWIDGET_H + +#include +#include + +namespace Ui { +class BrowserWidget; +} + +class BrowserWidget : public QWidget +{ + Q_OBJECT + +public: + explicit BrowserWidget(QWidget *parent = 0); + ~BrowserWidget(); + + void load(const QUrl &url); + +private slots: + void on_webView_urlChanged(const QUrl &url); + void on_webView_loadStarted(); + void on_webView_loadFinished(bool); + void on_actionBrowserBack_triggered(); + void on_actionBrowserForward_triggered(); + void on_actionBrowserRefresh_triggered(); + void on_txtUrl_returnPressed(); + + void on_actionBrowserStop_triggered(); + +private: + Ui::BrowserWidget *ui; + bool loading; +}; + +#endif // BROWSERWIDGET_H diff --git a/ui/BrowserWidget.ui b/ui/BrowserWidget.ui new file mode 100644 index 0000000..4155315 --- /dev/null +++ b/ui/BrowserWidget.ui @@ -0,0 +1,110 @@ + + + BrowserWidget + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 0 + + + 0 + + + + + + + + + 24 + 24 + + + + + + + + + + + + + + + + about:blank + + + + + + + + + :/icons/icons/Button Previous-01.png:/icons/icons/Button Previous-01.png + + + Back + + + Back + + + + + + :/icons/icons/Button Next-01.png:/icons/icons/Button Next-01.png + + + Forward + + + Forward + + + + + + :/icons/icons/Button Refresh-01.png:/icons/icons/Button Refresh-01.png + + + Refresh + + + Refresh + + + + + + :/icons/icons/Button Close-01.png:/icons/icons/Button Close-01.png + + + browserStop + + + + + + QWebView + QWidget +
QtWebKit/QWebView
+
+
+ + + + +
diff --git a/ui/MainWindow.ui b/ui/MainWindow.ui index be3220e..938e89b 100644 --- a/ui/MainWindow.ui +++ b/ui/MainWindow.ui @@ -4,10 +4,10 @@ - 0 - 0 - 865 - 640 + 0 + 0 + 865 + 640 @@ -18,257 +18,260 @@ - :/icons/icons/Battery-01.png:/icons/icons/Battery-01.png + :/icons/icons/Battery-01.png:/icons/icons/Battery-01.png true - - 4 - - - - - - 0 - 0 - - - - Qt::Vertical - - - - - 0 - 75 - - - - Qt::Horizontal - - - - - 20 - 0 - - - - Qt::ActionsContextMenu - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::ExtendedSelection - - - QAbstractItemView::SelectItems - - - true - - - true - - - false - - - - - - 80 - 0 - - - - Qt::CustomContextMenu - - - QAbstractItemView::NoEditTriggers - - - true - - - QAbstractItemView::SelectRows - - - QAbstractItemView::ScrollPerPixel - - - QAbstractItemView::ScrollPerPixel - - - false - - - true - - - false - - - false - - - 20 - - - true - - - true - - - false - - - 30 - - - - - - 20 - 0 - - - - Qt::ActionsContextMenu - - - QAbstractItemView::NoEditTriggers - - - true - - - QAbstractItemView::SelectRows - - - false - - - true - - - false - - - false - - - true - - - false - - - - - - - 0 - 8 - - - - QTabWidget::South - - - 1 - - - - Log - - - - 0 - - - - - - 0 - 0 - - - - Qt::CustomContextMenu - - - QFrame::NoFrame - - - - - - - - Browser - - - - 0 - - - - - - - - - + + 4 + + + + + + 0 + 0 + + + + Qt::Vertical + + + + + 0 + 75 + + + + Qt::Horizontal + + + + + 20 + 0 + + + + Qt::ActionsContextMenu + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::ExtendedSelection + + + QAbstractItemView::SelectItems + + + true + + + true + + + false + + + + + + 80 + 0 + + + + Qt::CustomContextMenu + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SelectRows + + + QAbstractItemView::ScrollPerPixel + + + QAbstractItemView::ScrollPerPixel + + + false + + + true + + + false + + + false + + + 20 + + + true + + + true + + + false + + + 30 + + + + + + 20 + 0 + + + + Qt::ActionsContextMenu + + + QAbstractItemView::NoEditTriggers + + + true + + + QAbstractItemView::SelectRows + + + false + + + true + + + false + + + false + + + true + + + false + + + + + + + 0 + 8 + + + + QTabWidget::South + + + 1 + + + + Log + + + + 0 + + + + + + 0 + 0 + + + + Qt::CustomContextMenu + + + QFrame::NoFrame + + + + + + + + Browser + + + + 0 + + + 0 + + + + + + + + + - - 0 - 0 - 865 - 23 - + + 0 + 0 + 865 + 23 + - - &File - - - - - - - - - - - + + &File + + + + + + + + + + + - - &Help - - + + &Help + + - - &View - - - - - - - - - + + &View + + + + + + + + + @@ -276,28 +279,28 @@ - Main Toolbar + Main Toolbar - false + false - - 32 - 32 - + + 32 + 32 + - Qt::ToolButtonIconOnly + Qt::ToolButtonIconOnly - false + false - TopToolBarArea + TopToolBarArea - false + false @@ -326,583 +329,584 @@ - - :/icons/icons/Button Refresh-01.png:/icons/icons/Button Refresh-01.png + + :/icons/icons/Button Refresh-01.png:/icons/icons/Button Refresh-01.png - Refresh + Refresh - Refresh the views + Refresh the views - Refresh the views + Refresh the views - F5 + F5 - - :/icons/icons/Save-01.png:/icons/icons/Save-01.png + + :/icons/icons/Save-01.png:/icons/icons/Save-01.png - Commit + Commit - Commit modifications + Commit modifications - Commit modifications + Commit modifications - Ctrl+M + Ctrl+M - - :/icons/icons/Document Copy-01.png:/icons/icons/Document Copy-01.png + + :/icons/icons/Document Copy-01.png:/icons/icons/Document Copy-01.png - Diff + Diff - Display the differences between the current and last committed version + Display the differences between the current and last committed version - Display the differences between the current and last committed version + Display the differences between the current and last committed version - Ctrl+D + Ctrl+D - - :/icons/icons/File New-01.png:/icons/icons/File New-01.png + + :/icons/icons/File New-01.png:/icons/icons/File New-01.png - Add + Add - Add files to the repository + Add files to the repository - Add files to the repository + Add files to the repository - Ctrl++ + Ctrl++ - - :/icons/icons/File Delete-01.png:/icons/icons/File Delete-01.png + + :/icons/icons/File Delete-01.png:/icons/icons/File Delete-01.png - Delete + Delete - Delete files from the repository + Delete files from the repository - Delete files from the repository + Delete files from the repository - Ctrl+- + Ctrl+- - - :/icons/icons/Document Blank-01.png:/icons/icons/Document Blank-01.png + + :/icons/icons/Document Blank-01.png:/icons/icons/Document Blank-01.png - &New... + &New... - Make a new Fossil repository + Make a new Fossil repository - Make a new Fossil repository + Make a new Fossil repository - Ctrl+N + Ctrl+N - - :/icons/icons/My Documents-01.png:/icons/icons/My Documents-01.png + + :/icons/icons/My Documents-01.png:/icons/icons/My Documents-01.png - &Open... + &Open... - Open a Fossil repository or workspace folder + Open a Fossil repository or workspace folder - Open a Fossil repository or workspace folder + Open a Fossil repository or workspace folder - Ctrl+O + Ctrl+O - true + true - &Close + &Close - Close the current workspace + Close the current workspace - Close the current workspace + Close the current workspace - - :/icons/icons/My Websites-01.png:/icons/icons/My Websites-01.png + + :/icons/icons/My Websites-01.png:/icons/icons/My Websites-01.png - Clone... + Clone... - Clone a remote repository + Clone a remote repository - - :/icons/icons/Button Upload-01.png:/icons/icons/Button Upload-01.png + + :/icons/icons/Button Upload-01.png:/icons/icons/Button Upload-01.png - Push + Push - Push changes to the remote repository + Push changes to the remote repository - Push changes to the remote repository + Push changes to the remote repository - Ctrl+P + Ctrl+P - - :/icons/icons/Button Download-01.png:/icons/icons/Button Download-01.png + + :/icons/icons/Button Download-01.png:/icons/icons/Button Download-01.png - Pull + Pull - Pull changes from the remote repository + Pull changes from the remote repository - Pull changes from the remote repository + Pull changes from the remote repository - Ctrl+L + Ctrl+L - - :/icons/icons/File Open-01.png:/icons/icons/File Open-01.png + + :/icons/icons/File Open-01.png:/icons/icons/File Open-01.png - Rename + Rename - Rename the selected file + Rename the selected file - Rename the selected file + Rename the selected file - Ctrl+R + Ctrl+R - - :/icons/icons/Button Turn Off-01.png:/icons/icons/Button Turn Off-01.png + + :/icons/icons/Button Turn Off-01.png:/icons/icons/Button Turn Off-01.png - &Quit + &Quit - Quit + Quit - Ctrl+Q + Ctrl+Q - true + true - - :/icons/icons/File History-01.png:/icons/icons/File History-01.png + + :/icons/icons/File History-01.png:/icons/icons/File History-01.png - History + History - Display the version history of a file via the Fossil UI + Display the version history of a file via the Fossil UI - Display the version history of a file via the Fossil UI + Display the version history of a file via the Fossil UI - Ctrl+H + Ctrl+H - true + true - - :/icons/icons/Network MAC-01.png:/icons/icons/Network MAC-01.png + + :/icons/icons/Network MAC-01.png:/icons/icons/Network MAC-01.png - Fossil UI + Fossil UI - Starts the Fosil UI in the Web Browser + Starts the Fosil UI in the Web Browser - Starts the Fosil UI in the Web Browser + Starts the Fosil UI in the Web Browser - - :/icons/icons/Document-Revert-icon.png:/icons/icons/Document-Revert-icon.png + + :/icons/icons/Document-Revert-icon.png:/icons/icons/Document-Revert-icon.png - Revert + Revert - Revert files to the last commited version + Revert files to the last commited version - Revert files to the last commited version + Revert files to the last commited version - - :/icons/icons/Text Edit.png:/icons/icons/Text Edit.png + + :/icons/icons/Text Edit.png:/icons/icons/Text Edit.png - Clear Log + Clear Log - Clears the log + Clears the log - Ctrl+K + Ctrl+K - - :/icons/icons/Clock-01.png:/icons/icons/Clock-01.png + + :/icons/icons/Clock-01.png:/icons/icons/Clock-01.png - Timeline + Timeline - Display the change history of the Fossil repository + Display the change history of the Fossil repository - Display the change history of the Fossil repository + Display the change history of the Fossil repository - - :/icons/icons/Document-01.png:/icons/icons/Document-01.png + + :/icons/icons/Document-01.png:/icons/icons/Document-01.png - Open File + Open File - Open the selected file + Open the selected file - Open the selected file + Open the selected file - Ctrl+Return + Ctrl+Return - - :/icons/icons/Folder-01.png:/icons/icons/Folder-01.png + + :/icons/icons/Folder-01.png:/icons/icons/Folder-01.png - Open Containing + Open Containing - Open the folder containing the selected file + Open the folder containing the selected file - Open the folder containing the selected file + Open the folder containing the selected file - Alt+Return + Alt+Return - - :/icons/icons/Button Reload-01.png:/icons/icons/Button Reload-01.png + + :/icons/icons/Button Reload-01.png:/icons/icons/Button Reload-01.png - Undo + Undo - Undo the last Fossil action + Undo the last Fossil action - Undo the last Fossil action + Undo the last Fossil action - Ctrl+Z + Ctrl+Z - - :/icons/icons/Battery-01.png:/icons/icons/Battery-01.png + + :/icons/icons/Battery-01.png:/icons/icons/Battery-01.png - &About... + &About... - About Fuel + About Fuel - - :/icons/icons/Button Play-01.png:/icons/icons/Button Play-01.png + + :/icons/icons/Button Play-01.png:/icons/icons/Button Play-01.png - Update + Update - Update the workspace to the latest version + Update the workspace to the latest version - Update the workspace to the latest version + Update the workspace to the latest version - Ctrl+U + Ctrl+U - - :/icons/icons/Gear-01.png:/icons/icons/Gear-01.png + + :/icons/icons/Gear-01.png:/icons/icons/Gear-01.png - &Preferences... + &Preferences... - Fuel Preferences + Fuel Preferences - Fuel Preferences + Fuel Preferences - true + true - true + true - &Modified + &Modified - Show modifed files + Show modifed files - true + true - true + true - &Unchanged + &Unchanged - Show unchanged files + Show unchanged files - true + true - true + true - Un&known + Un&known - Show unknown files + Show unknown files - true + true - &Ignored + &Ignored - Show ignored files + Show ignored files - true + true - File &List + File &List - View files as a list + View files as a list - View files as a list + View files as a list - View the workspace as a list of files + View the workspace as a list of files - - :/icons/icons/Folder-01.png:/icons/icons/Folder-01.png + + :/icons/icons/Folder-01.png:/icons/icons/Folder-01.png - Open Folder + Open Folder - Open the selected folder + Open the selected folder - Open the selected folder + Open the selected folder - - :/icons/icons/Folder Open-01.png:/icons/icons/Folder Open-01.png + + :/icons/icons/Folder Open-01.png:/icons/icons/Folder Open-01.png - Rename Folder + Rename Folder - Rename the selected folder + Rename the selected folder - Rename the selected folder + Rename the selected folder - - :/icons/icons/Folder Add-01.png:/icons/icons/Folder Add-01.png + + :/icons/icons/Folder Add-01.png:/icons/icons/Folder Add-01.png - Stash changes + Stash changes - Stash changes + Stash changes - - :/icons/icons/Folder Open-01.png:/icons/icons/Folder Open-01.png + + :/icons/icons/Folder Open-01.png:/icons/icons/Folder Open-01.png - Apply Stash + Apply Stash - Apply stashed changes + Apply stashed changes - Apply stashed changes + Apply stashed changes - true + true - &Stashed Changes + &Stashed Changes - View Stashed Changes + View Stashed Changes - View Stashed Changes + View Stashed Changes - Show the list of stashed changes + Show the list of stashed changes - - :/icons/icons/Folder Delete-01.png:/icons/icons/Folder Delete-01.png + + :/icons/icons/Folder Delete-01.png:/icons/icons/Folder Delete-01.png - Delete Stash + Delete Stash - - :/icons/icons/Folder Explorer-01.png:/icons/icons/Folder Explorer-01.png + + :/icons/icons/Folder Explorer-01.png:/icons/icons/Folder Explorer-01.png - Diff Stash + Diff Stash - - QWebView - QWidget -
QtWebKit/QWebView
-
FileTableView QTableView
FileTableView.h
+ + BrowserWidget + QWidget +
BrowserWidget.h
+ 1 +