[developerteam getadooble] SF.net SVN: dooble:[1957] trunk/browser
Brought to you by:
textfield
|
From: <tex...@us...> - 2011-02-15 18:47:35
|
Revision: 1957
http://dooble.svn.sourceforge.net/dooble/?rev=1957&view=rev
Author: textfield
Date: 2011-02-15 18:47:29 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Allow user to control visibility of hidden files.
Sensitivity fixes.
Modified Paths:
--------------
trunk/browser/Doc/RELEASE-NOTES
trunk/browser/Include/dooble.h
trunk/browser/Source/dfilemanager.cc
trunk/browser/Source/dooble.cc
trunk/browser/Source/dview.cc
trunk/browser/UI/mainWindow.ui
Modified: trunk/browser/Doc/RELEASE-NOTES
===================================================================
--- trunk/browser/Doc/RELEASE-NOTES 2011-02-15 17:13:49 UTC (rev 1956)
+++ trunk/browser/Doc/RELEASE-NOTES 2011-02-15 18:47:29 UTC (rev 1957)
@@ -14,8 +14,8 @@
6. Check for "inline" content dispositions to determine if Dooble should
display a download dialog.
7. OS X look-and-feel improvements.
-8. Implemented a cookie browser.
-9. The History browser's headers are now movable.
+8. Implemented a cookie window.
+9. The History window's headers are now movable.
10. Replaced QApplication::allWidgets() with QApplication::topLevelWidgets()
where applicable.
11. Dooble will now download favicon files without the use of QWebView.
@@ -31,15 +31,17 @@
18. Added the History tab to the Settings window.
19. Now correctly removing the history.db file upon exit if history
records are not desired.
-20. A newly-created tab will be immediately visible if the tab is created
+20. A newly-created tab will be immediately visible if the tab was created
via a menu action.
21. Cookie information is now stored in the cookies.db database.
22. Replaced many instances of QSettings. This minor change should improve
performance as disk access will be minimized.
23. Extended the file manager's table view to include data accessed, owner,
and permissions information.
-24. Now displaying hidden files in the file manager's table view.
+24. Now displaying hidden files in the file manager's table view. The tree view
+ contains hidden directories.
25. Adjusted lengths of history menu items.
+26. Fixed incorrect sensitivity states with menu items.
1.17
@@ -96,7 +98,7 @@
8. Configuration settings will now be stored in
$HOME/.dooble/Dooble/Dooble.ini.
9. Fixed a font-distribution issue.
-10. The history window's sort indicator should now be shown correctly.
+10. The History window's sort indicator should now be shown correctly.
11. Implemented a popup blocker.
12. Updated OS X style settings.
13. Implemented advanced Web fonts.
@@ -112,9 +114,9 @@
1.15
-1. Populate the history browser's contents when show() is issued.
+1. Populate the History window's contents when show() is issued.
2. Windows systems will use Qt's Windows style.
-3. Fixed date sorting issue with the history browser.
+3. Fixed date sorting issue with the History window.
4. Added intelligence to the location widget.
5. Improved the shortcut for the zoom feature.
6. Removed the Google translate feature.
@@ -134,9 +136,9 @@
1.14
1. Fixed bugs associated with page saving.
-2. The history browser's Delete All function should only delete
+2. The History window's Delete All function should only delete
entries relative to the selected date.
-3. Improved the history browser with a search function.
+3. Improved the History window with a search function.
1.13
@@ -147,12 +149,12 @@
misplaced.
4. Implemented a function that allows closing of all tabs except for
the current one.
-5. Improved the history browser by adding a date filter.
+5. Improved the History window by adding a date filter.
1.12
1. Bug fixes!
-2. Implemented a history browser.
+2. Implemented a history window.
1.11
Modified: trunk/browser/Include/dooble.h
===================================================================
--- trunk/browser/Include/dooble.h 2011-02-15 17:13:49 UTC (rev 1956)
+++ trunk/browser/Include/dooble.h 2011-02-15 18:47:29 UTC (rev 1957)
@@ -99,6 +99,7 @@
void saveSettings(void);
void keyPressEvent(QKeyEvent *event);
void saveHistoryItem(const dwebhistoryitem &item);
+ void prepareWidgetsBasedOnView(dview *p);
void prepareNavigationButtonMenus(dview *p);
private slots:
@@ -164,6 +165,7 @@
void slotPrintRequested(QWebFrame *frame);
void slotShowDesktopTab(const bool state = true);
void slotShowPageSource(void);
+ void slotShowHiddenFiles(void);
void slotOpenLinkInNewTab(const QUrl &url);
void slotSelectAllContent(void);
void slotSelectionChanged(void);
Modified: trunk/browser/Source/dfilemanager.cc
===================================================================
--- trunk/browser/Source/dfilemanager.cc 2011-02-15 17:13:49 UTC (rev 1956)
+++ trunk/browser/Source/dfilemanager.cc 2011-02-15 18:47:29 UTC (rev 1957)
@@ -56,6 +56,7 @@
#include <QFileInfoList>
#include <QContextMenuEvent>
+#include "dooble.h"
#include "dfilemanager.h"
dfilesystemmodel *dfilemanager::tableModel = 0;
@@ -79,16 +80,10 @@
m_history = new dwebhistory();
ui.splitter->setStretchFactor(0, 0);
ui.splitter->setStretchFactor(1, 1);
- treeModel->setReadOnly(false);
- tableModel->setReadOnly(false);
connect(treeModel,
SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)),
this,
SLOT(slotDirectoryRemoved(const QModelIndex &, int, int)));
- treeModel->setFilter(QDir::Drives | QDir::AllDirs | QDir::NoDotAndDotDot);
- treeModel->setRootPath(QDir::rootPath());
- tableModel->setFilter(QDir::Hidden | QDir::AllEntries | QDir::NoDotAndDotDot);
- tableModel->setRootPath(QDir::rootPath());
ui.treeView->setModel(treeModel);
ui.treeView->setSortingEnabled(true);
ui.treeView->sortByColumn(0, Qt::AscendingOrder);
@@ -120,6 +115,9 @@
SIGNAL(closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint)),
this,
SLOT(slotCloseEditor(QWidget *, QAbstractItemDelegate::EndEditHint)));
+
+ for(int i = 0; i < ui.tableView->horizontalHeader()->count(); i++)
+ ui.tableView->resizeColumnToContents(i);
}
dfilemanager::~dfilemanager()
Modified: trunk/browser/Source/dooble.cc
===================================================================
--- trunk/browser/Source/dooble.cc 2011-02-15 17:13:49 UTC (rev 1956)
+++ trunk/browser/Source/dooble.cc 2011-02-15 18:47:29 UTC (rev 1957)
@@ -330,7 +330,23 @@
dfilemanager::treeModel = new QFileSystemModel();
dfilemanager::tableModel = new dfilesystemmodel();
+ dfilemanager::treeModel->setReadOnly(false);
+ dfilemanager::tableModel->setReadOnly(false);
+ dfilemanager::treeModel->setFilter(QDir::Drives | QDir::AllDirs | QDir::System |
+ QDir::NoDotAndDotDot);
+ dfilemanager::treeModel->setRootPath(QDir::rootPath());
+ dfilemanager::tableModel->setFilter(QDir::Hidden | QDir::AllEntries |
+ QDir::System | QDir::NoDotAndDotDot);
+ dfilemanager::tableModel->setRootPath(QDir::rootPath());
+ if(dooble::s_settings.value("mainWindow/showHiddenFiles", true).toBool())
+ {
+ dfilemanager::treeModel->setFilter
+ (dfilemanager::treeModel->filter() | QDir::Hidden);
+ dfilemanager::tableModel->setFilter
+ (dfilemanager::tableModel->filter() | QDir::Hidden);
+ }
+
/*
** Create singular instances.
*/
@@ -546,6 +562,8 @@
SLOT(slotShowDesktopTab(void)));
connect(ui.actionStatusbar, SIGNAL(triggered(void)), this,
SLOT(slotStatusBarDisplay(void)));
+ connect(ui.actionShow_Hidden_Files, SIGNAL(triggered(void)), this,
+ SLOT(slotShowHiddenFiles(void)));
connect(ui.actionOpen_Directory, SIGNAL(triggered(void)), this,
SLOT(slotOpenDirectory(void)));
connect(ui.actionZoom_In, SIGNAL(triggered(void)), this,
@@ -687,6 +705,7 @@
ui.actionPrint->setEnabled(false);
ui.actionPrint_Preview->setEnabled(false);
ui.actionOpen_URL->setEnabled(false);
+ ui.actionShow_Hidden_Files->setEnabled(false);
ui.actionSave_Page->setEnabled(false);
ui.actionCopy->setEnabled(false);
@@ -734,6 +753,8 @@
statusBar()->setVisible
(dooble::s_settings.value("mainWindow/statusbarDisplay", true).toBool());
ui.actionStatusbar->setChecked(!statusBar()->isHidden());
+ ui.actionShow_Hidden_Files->setChecked
+ (dooble::s_settings.value("mainWindow/showHiddenFiles", true).toBool());
slotSetIcons();
#ifdef Q_WS_MAC
foreach(QToolButton *toolButton, findChildren<QToolButton *> ())
@@ -1029,14 +1050,7 @@
ui.locationLineEdit->setText(url.toString());
ui.locationLineEdit->blockSignals(false);
p->load(url);
- ui.zoomMenu->setEnabled(!p->isDir() && !p->isFtp());
- ui.actionFind->setEnabled(!p->isDir() && !p->isFtp());
- ui.actionSelect_All_Content->setEnabled(!p->isDir() && !p->isFtp());
- ui.actionCopy->setEnabled(!p->isDir() && !p->isFtp() &&
- !p->page()->selectedText().isEmpty());
- ui.actionPaste->setEnabled(!p->isDir() && !p->isFtp() &&
- (QApplication::clipboard() &&
- !QApplication::clipboard()->text().isEmpty()));
+ prepareWidgetsBasedOnView(p);
QAction *action = new QAction(p->icon(), tr("(Untitled)"), this);
@@ -1045,12 +1059,6 @@
SLOT(slotLinkActionTriggered(void)));
ui.menu_Tabs->addAction(action);
p->setTabAction(action);
-
- if(p->isDir() || p->isFtp())
- ui.findFrame->setVisible(false);
- else
- ui.findFrame->setVisible(showFindFrame);
-
return p;
}
@@ -1319,21 +1327,7 @@
prepareNavigationButtonMenus(p);
statusBar()->setVisible(ui.actionStatusbar->isChecked() &&
!isFullScreen());
-
- if(p->isDir() || p->isFtp())
- ui.findFrame->setVisible(false);
- else
- ui.findFrame->setVisible(showFindFrame);
-
- ui.actionFind->setEnabled(!p->isDir() && !p->isFtp());
- ui.zoomMenu->setEnabled(!p->isDir() && !p->isFtp());
- ui.actionSelect_All_Content->setEnabled(!p->isDir() && !p->isFtp());
- ui.actionCopy->setEnabled(!p->isDir() && !p->isFtp() &&
- !p->page()->selectedText().isEmpty());
- ui.actionPaste->setEnabled
- (!p->isDir() && !p->isFtp() &&
- (QApplication::clipboard() &&
- !QApplication::clipboard()->text().isEmpty()));
+ prepareWidgetsBasedOnView(p);
p->setFocus();
}
else
@@ -1385,6 +1379,8 @@
dview *p = qobject_cast<dview *> (sender());
+ prepareWidgetsBasedOnView(p);
+
/*
** The URL widget's text should not be changed if the
** completer's popup is visible.
@@ -2577,6 +2573,30 @@
statusBar()->isVisible();
}
+void dooble::slotShowHiddenFiles(void)
+{
+ QSettings settings;
+
+ settings.setValue("mainWindow/showHiddenFiles", ui.actionShow_Hidden_Files->isChecked());
+ dooble::s_settings["mainWindow/showHiddenFiles"] =
+ ui.actionShow_Hidden_Files->isChecked();
+
+ if(dooble::s_settings.value("mainWindow/showHiddenFiles", true).toBool())
+ {
+ dfilemanager::treeModel->setFilter
+ (dfilemanager::treeModel->filter() | QDir::Hidden);
+ dfilemanager::tableModel->setFilter
+ (dfilemanager::tableModel->filter() | QDir::Hidden);
+ }
+ else
+ {
+ dfilemanager::treeModel->setFilter
+ (dfilemanager::treeModel->filter() & ~QDir::Hidden);
+ dfilemanager::tableModel->setFilter
+ (dfilemanager::tableModel->filter() & ~QDir::Hidden);
+ }
+}
+
void dooble::closeDesktop(void)
{
/*
@@ -3113,3 +3133,23 @@
dooble::s_cookieWindow->show(this);
}
+void dooble::prepareWidgetsBasedOnView(dview *p)
+{
+ if(!p)
+ return;
+
+ ui.zoomMenu->setEnabled(!p->isDir() && !p->isFtp());
+ ui.actionFind->setEnabled(!p->isDir() && !p->isFtp());
+ ui.actionSelect_All_Content->setEnabled(!p->isDir() && !p->isFtp());
+ ui.actionCopy->setEnabled(!p->isDir() && !p->isFtp() &&
+ !p->page()->selectedText().isEmpty());
+ ui.actionPaste->setEnabled(!p->isDir() && !p->isFtp() &&
+ (QApplication::clipboard() &&
+ !QApplication::clipboard()->text().isEmpty()));
+ ui.actionShow_Hidden_Files->setEnabled(p->isDir());
+
+ if(p->isDir() || p->isFtp())
+ ui.findFrame->setVisible(false);
+ else
+ ui.findFrame->setVisible(showFindFrame);
+}
Modified: trunk/browser/Source/dview.cc
===================================================================
--- trunk/browser/Source/dview.cc 2011-02-15 17:13:49 UTC (rev 1956)
+++ trunk/browser/Source/dview.cc 2011-02-15 18:47:29 UTC (rev 1957)
@@ -387,6 +387,7 @@
m_webViewIcon = QIcon();
webView->stop();
ftpBrowser->stop();
+ setCurrentIndex(index);
if(index == 0)
{
Modified: trunk/browser/UI/mainWindow.ui
===================================================================
--- trunk/browser/UI/mainWindow.ui 2011-02-15 17:13:49 UTC (rev 1956)
+++ trunk/browser/UI/mainWindow.ui 2011-02-15 18:47:29 UTC (rev 1957)
@@ -475,6 +475,8 @@
<addaction name="zoomMenu"/>
<addaction name="separator"/>
<addaction name="actionFull_Screen_Mode"/>
+ <addaction name="separator"/>
+ <addaction name="actionShow_Hidden_Files"/>
</widget>
<widget class="QMenu" name="menu_Tabs">
<property name="title">
@@ -726,6 +728,17 @@
<string>&Cookies</string>
</property>
</action>
+ <action name="actionShow_Hidden_Files">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>&Show Hidden Files</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|