[developerteam getadooble] SF.net SVN: dooble:[1276] trunk/browser
Brought to you by:
textfield
From: <tex...@us...> - 2010-04-26 23:55:58
|
Revision: 1276 http://dooble.svn.sourceforge.net/dooble/?rev=1276&view=rev Author: textfield Date: 2010-04-26 23:55:52 +0000 (Mon, 26 Apr 2010) Log Message: ----------- Added missing "icons changed" signals. Prepare for fonts. Modified Paths: -------------- trunk/browser/Include/ddownloadwindow.h trunk/browser/Include/ddownloadwindowitem.h trunk/browser/Include/dooble.h trunk/browser/Include/dsettings.h trunk/browser/Source/ddownloadwindow.cc trunk/browser/Source/ddownloadwindowitem.cc trunk/browser/Source/dooble.cc trunk/browser/Source/dsettings.cc Modified: trunk/browser/Include/ddownloadwindow.h =================================================================== --- trunk/browser/Include/ddownloadwindow.h 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Include/ddownloadwindow.h 2010-04-26 23:55:52 UTC (rev 1276) @@ -87,6 +87,7 @@ signals: void saveUrl(const QUrl &); + void iconsChanged(void); }; #endif Modified: trunk/browser/Include/ddownloadwindowitem.h =================================================================== --- trunk/browser/Include/ddownloadwindowitem.h 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Include/ddownloadwindowitem.h 2010-04-26 23:55:52 UTC (rev 1276) @@ -84,6 +84,9 @@ void downloadFinished(const int fileSize); QString formattedSize(const int fileSize) const; + public slots: + void slotSetIcons(void); + private slots: void slotAbortDownload(void); void slotPauseDownload(void); Modified: trunk/browser/Include/dooble.h =================================================================== --- trunk/browser/Include/dooble.h 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Include/dooble.h 2010-04-26 23:55:52 UTC (rev 1276) @@ -125,8 +125,9 @@ void slotNewWindow(void); void slotUrlChanged(const QUrl &url); void slotViewZoomIn(void); + void slotFontChanged(void); + void slotIconChanged(void); void slotViewZoomOut(void); - void slotIconChanged(void); void slotLinkHovered(const QString &link, const QString &title, const QString &textContent); void slotLoadStarted(void); Modified: trunk/browser/Include/dsettings.h =================================================================== --- trunk/browser/Include/dsettings.h 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Include/dsettings.h 2010-04-26 23:55:52 UTC (rev 1276) @@ -1,7 +1,7 @@ /**************************************************************************** ** Dooble - The Secure Internet Web Browser ** -** Copyright (c) 2008, 2009 Alexis Megas, +** Copyright (c) 2008, 2009, 2010 Alexis Megas, ** Gunther van Dooble, and the Dooble Team. ** All rights reserved. ** @@ -75,6 +75,7 @@ void slotChooseMyRetrievedFilesDirectory(void); signals: + void fontsChanged(void); void iconsChanged(void); }; @@ -92,7 +93,7 @@ bool save(QString &errmsg); void load(void); -void loadqss(); +void loadqss(void); void loadStyleSheet(const QString &sheetName); void on_styleSheetCombo_activated(const QString &styleSheetName); Modified: trunk/browser/Source/ddownloadwindow.cc =================================================================== --- trunk/browser/Source/ddownloadwindow.cc 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Source/ddownloadwindow.cc 2010-04-26 23:55:52 UTC (rev 1276) @@ -86,6 +86,10 @@ connect(item, SIGNAL(downloadFinished(void)), this, SLOT(slotEnableClearListButton(void))); + connect(this, + SIGNAL(iconsChanged(void)), + item, + SLOT(slotSetIcons(void))); item->download(srcFileName, dstFileName); static_cast<QVBoxLayout *> (ui.frame->layout())->insertWidget(0, item); } @@ -98,6 +102,10 @@ connect(item, SIGNAL(downloadFinished(void)), this, SLOT(slotEnableClearListButton(void))); + connect(this, + SIGNAL(iconsChanged(void)), + item, + SLOT(slotSetIcons(void))); item->download(url, fileName); static_cast<QVBoxLayout *> (ui.frame->layout())->insertWidget(0, item); } @@ -193,6 +201,7 @@ setWindowIcon (QIcon(cfgSettings.value("downloadWindow/windowIcon").toString())); + emit iconsChanged(); } void ddownloadwindow::slotClear(void) Modified: trunk/browser/Source/ddownloadwindowitem.cc =================================================================== --- trunk/browser/Source/ddownloadwindowitem.cc 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Source/ddownloadwindowitem.cc 2010-04-26 23:55:52 UTC (rev 1276) @@ -67,7 +67,7 @@ m_done = 0; m_total = -1; ftp_total = -1; - paused = true; + paused = false; lastSize = 0; } @@ -100,10 +100,6 @@ void ddownloadwindowitem::download(const QUrl &url, const QString &fileName_) { - QSettings settings; - QSettings cfgSettings - (settings.value("iconSet").toString(), QSettings::IniFormat); - requestId = 0; fileName = fileName_; @@ -112,10 +108,7 @@ else ui.sourceLabel->setText(QFileInfo(url.path()).fileName()); - ui.abortToolButton->setIcon - (QIcon(cfgSettings.value("downloadWindowItem/abortIcon").toString())); - ui.pauseToolButton->setIcon - (QIcon(cfgSettings.value("downloadWindowItem/pauseIcon").toString())); + slotSetIcons(); ui.abortToolButton->setEnabled(false); ui.pauseToolButton->setEnabled(false); connect(ui.abortToolButton, SIGNAL(clicked(void)), @@ -372,17 +365,9 @@ ** Icons */ - QSettings settings; - QSettings cfgSettings - (settings.value("iconSet").toString(), QSettings::IniFormat); + paused = !paused; + slotSetIcons(); - if(paused) - ui.pauseToolButton->setIcon - (QIcon(cfgSettings.value("downloadWindowItem/resumeIcon").toString())); - else - ui.pauseToolButton->setIcon - (QIcon(cfgSettings.value("downloadWindowItem/pauseIcon").toString())); - QFtp *ftp = findChild<QFtp *> (); if(ftp) @@ -491,8 +476,6 @@ ui.downloadInformationLabel->setText (QString(tr("Paused (%1)")).arg(formattedSize(fileInfo.size()))); } - - paused = !paused; } void ddownloadwindowitem::slotRawCommandReply(int replyCode, @@ -501,3 +484,20 @@ Q_UNUSED(replyCode); Q_UNUSED(detail); } + +void ddownloadwindowitem::slotSetIcons(void) +{ + QSettings settings; + QSettings cfgSettings + (settings.value("iconSet").toString(), QSettings::IniFormat); + + ui.abortToolButton->setIcon + (QIcon(cfgSettings.value("downloadWindowItem/abortIcon").toString())); + + if(paused) + ui.pauseToolButton->setIcon + (QIcon(cfgSettings.value("downloadWindowItem/resumeIcon").toString())); + else + ui.pauseToolButton->setIcon + (QIcon(cfgSettings.value("downloadWindowItem/pauseIcon").toString())); +} Modified: trunk/browser/Source/dooble.cc =================================================================== --- trunk/browser/Source/dooble.cc 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Source/dooble.cc 2010-04-26 23:55:52 UTC (rev 1276) @@ -558,6 +558,8 @@ (QIcon(cfgSettings.value("actionSelect_All_Content").toString())); ui.zoomMenu->setIcon (QIcon(cfgSettings.value("zoomMenu").toString())); + ui.actionFull_Screen_Mode->setIcon + (QIcon(cfgSettings.value("actionFull_Screen_Mode").toString())); /* ** The 0th tab is not necessarily the Desktop. @@ -2190,3 +2192,7 @@ ui.marker->setVisible(true); } } + +void dooble::slotFontChanged(void) +{ +} Modified: trunk/browser/Source/dsettings.cc =================================================================== --- trunk/browser/Source/dsettings.cc 2010-04-26 23:48:16 UTC (rev 1275) +++ trunk/browser/Source/dsettings.cc 2010-04-26 23:55:52 UTC (rev 1276) @@ -1,7 +1,7 @@ /**************************************************************************** ** Dooble - The Secure Internet Web Browser ** -** Copyright (c) 2008, 2009 Alexis Megas, +** Copyright (c) 2008, 2009, 2010 Alexis Megas, ** Gunther van Dooble, and the Dooble Team. ** All rights reserved. ** @@ -97,6 +97,9 @@ ui.myRetrievedFilesLineEdit->setText (settings.value("settingsWindow/myRetrievedFiles").toString()); + + for(int i = 6; i <= 72; i++) + ui.fontSizeComboBox->addItem(QString::number(i)); } dsettings::~dsettings() @@ -406,6 +409,7 @@ settings.setValue(QString("iconSet%1").arg(i + 1), ui.iconSetComboBox->itemData(i)); + emit fontsChanged(); emit iconsChanged(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |