void DolphinView::createView()
{
    assert(m_iconsView == 0);
    assert(m_detailsView == 0);

    switch (m_mode) {
    case IconsView:
    case PreviewsView: {
        const DolphinIconsView::LayoutMode layoutMode = (m_mode == IconsView) ?
                                                        DolphinIconsView::Icons :
                                                        DolphinIconsView::Previews;
        m_iconsView = new DolphinIconsView(this, layoutMode);
        m_topLayout->insertWidget(1, m_iconsView);
        setFocusProxy(m_iconsView);

        connect(m_iconsView, SIGNAL(executed(QIconViewItem*)),
                this, SLOT(triggerIconsViewItem(QIconViewItem*)));
        connect(m_iconsView, SIGNAL(returnPressed(QIconViewItem*)),
                this, SLOT(triggerIconsViewItem(QIconViewItem*)));
        connect(m_iconsView, SIGNAL(signalRequestActivation()),
                this, SLOT(slotGrabActivation()));

        m_iconsView->endItemUpdates();
        m_iconsView->show();
        m_iconsView->setFocus();
        break;
    }

    case DetailsView: {
        m_detailsView = new DolphinDetailsView(this);
        m_topLayout->insertWidget(1, m_detailsView);
        setFocusProxy(m_detailsView);

        connect(m_detailsView, SIGNAL(executed(QListViewItem*, const QPoint&, int)),
                this, SLOT(triggerDetailsViewItem(QListViewItem*, const QPoint&, int)));
        connect(m_detailsView, SIGNAL(returnPressed(QListViewItem*)),
                this, SLOT(triggerDetailsViewItem(QListViewItem*)));
        connect(m_detailsView, SIGNAL(signalRequestActivation()),
                this, SLOT(slotGrabActivation()));
        m_detailsView->show();
        m_detailsView->setFocus();
        break;
    }

    default:
        break;
    }

    connect(scrollView(), SIGNAL(contentsMoving(int, int)),
            this, SLOT(slotContentsMoving(int, int)));

    startDirLister(m_urlNavigator->url());
}
void DolphinView::slotURLChanged(const KURL& url)
{
    const ViewProperties props(url);
    setMode(props.viewMode());

    const bool showHiddenFiles = props.isShowHiddenFilesEnabled();
    setShowHiddenFilesEnabled(showHiddenFiles);
    m_dirLister->setShowingDotFiles(showHiddenFiles);

    setSorting(props.sorting());
    setSortOrder(props.sortOrder());

    startDirLister(url);

    // The selectionChanged signal is not emitted when a new view object is
    // created. The application does not care whether a view is represented by a
    // different instance, hence inform the application that the selection might have
    // changed so that it can update it's actions.
    Dolphin::mainWin().slotSelectionChanged();

    emit signalURLChanged(url);
}
KLinPopup::KLinPopup()
	: KXmlGuiWindow(),
	  m_view(new KLinPopupView(this)), currentMessage(0), unreadMessages(0),
	  m_hostName(QString()), m_arLabel(new QLabel(this))
{
	setCentralWidget(m_view);
	setFocusPolicy(Qt::WheelFocus);
	setupActions();
	setAutoSaveSettings();
	m_view->setFocus();

	cfg = new KConfig("klinpopuprc");
	readConfig();

	initSystemTray();

	// allow the view to change the statusbar and caption
	connect(m_view, SIGNAL(signalChangeStatusbar(const QString &)),
			this, SLOT(changeStatusbar(const QString&)));
	connect(m_view, SIGNAL(signalChangeCaption(const QString &)),
			this, SLOT(setCaption(const QString&)));

	statusBar()->insertItem(QString(), ID_STATUS_TEXT, 1);
	m_arOffPic = KStandardDirs::locate("data", "klinpopup/ar_off.png");
	m_arOnPic = KStandardDirs::locate("data", "klinpopup/ar_on.png");
	m_arLabel->setPixmap(QPixmap(m_arOffPic));
	m_arLabel->setToolTip(i18n("Autoreply off"));
	m_arLabel->setFixedSize(30, 13);
	statusBar()->addPermanentWidget(m_arLabel);

	readSavedMessages();
	showPopup();
	popupHelper();
	checkSmbclientBin();

	// use a timer to finish the constructor ASAP
	QTimer::singleShot(1, this, SLOT(startDirLister()));
}
void DolphinView::reload()
{
    startDirLister(m_urlNavigator->url(), true);
}