]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinsettingsdialog.cpp
David's patches come in faster than light: removed code duplication, as a proper...
[dolphin.git] / src / dolphinsettingsdialog.cpp
index 39640136c653a7b76461644f998076277cd9b75a..cf66af3b267e800781bad13c6a85e756ee90ea6a 100644 (file)
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
  ***************************************************************************/
 
 #include "dolphinsettingsdialog.h"
 #include "generalsettingspage.h"
 #include "viewsettingspage.h"
 #include "bookmarkssettingspage.h"
-#include "dolphin.h"
+#include "dolphinapplication.h"
+#include "dolphinmainwindow.h"
 //Added by qt3to4:
-#include <Q3Frame>
+#include <QFrame>
 
-DolphinSettingsDialog::DolphinSettingsDialog() :
-    KPageDialog()
+DolphinSettingsDialog::DolphinSettingsDialog(DolphinMainWindow* mainWindow) :
+    KPageDialog(),
+    m_mainWindow(mainWindow)
 {
     setFaceType( List);
     setCaption(i18n("Dolphin Preferences"));
     setButtons(Ok|Apply|Cancel);
     setDefaultButton(Ok);
 
-    m_generalSettingsPage = new GeneralSettingsPage(this);
+    m_generalSettingsPage = new GeneralSettingsPage(mainWindow, this);
     KPageWidgetItem* generalSettingsFrame = addPage(m_generalSettingsPage, i18n("General"));
     generalSettingsFrame->setIcon(KIcon("exec"));
 
-    m_viewSettingsPage = new ViewSettingsPage(this);
+    m_viewSettingsPage = new ViewSettingsPage(mainWindow, this);
     KPageWidgetItem* viewSettingsFrame = addPage(m_viewSettingsPage, i18n("View Modes"));
     viewSettingsFrame->setIcon(KIcon("view_choose"));
 
-    m_bookmarksSettingsPage = new BookmarksSettingsPage(this);
+    m_bookmarksSettingsPage = new BookmarksSettingsPage(mainWindow, this);
     KPageWidgetItem* bookmarksSettingsFrame = addPage(m_bookmarksSettingsPage, i18n("Bookmarks"));
     bookmarksSettingsFrame->setIcon(KIcon("bookmark"));
 }
@@ -66,7 +68,7 @@ void DolphinSettingsDialog::applySettings()
     m_generalSettingsPage->applySettings();
     m_viewSettingsPage->applySettings();
     m_bookmarksSettingsPage->applySettings();
-    Dolphin::mainWin().refreshViews();
+    DolphinApplication::app()->refreshMainWindows();
 }
 
 #include "dolphinsettingsdialog.moc"