Logo Search packages:      
Sourcecode: d3lphin version File versions  Download package

void DolphinView::updateStatusBar (  ) 

Updates the number of items (= number of files + number of directories) in the statusbar. If files are selected, the number of selected files and the sum of the filesize is shown.

Definition at line 344 of file dolphinview.cpp.

References defaultStatusBarText(), DolphinStatusBar::defaultText(), hasSelection(), DolphinStatusBar::message(), DolphinStatusBar::progress(), selectionStatusBarText(), DolphinStatusBar::setDefaultText(), DolphinStatusBar::setMessage(), and DolphinStatusBar::type().

Referenced by Dolphin::slotSelectionChanged().

    // As the item count information is less important
    // in comparison with other messages, it should only
    // be shown if:
    // - the status bar is empty or
    // - shows already the item count information or
    // - shows only a not very important information
    // - if any progress is given don't show the item count info at all
    const QString msg(m_statusBar->message());
    const bool updateStatusBarMsg = (msg.isEmpty() ||
                                     (msg == m_statusBar->defaultText()) ||
                                     (m_statusBar->type() == DolphinStatusBar::Information)) &&
                                    (m_statusBar->progress() == 100);

    const QString text(hasSelection() ? selectionStatusBarText() : defaultStatusBarText());

    if (updateStatusBarMsg) {
        m_statusBar->setMessage(text, DolphinStatusBar::Default);

Generated by  Doxygen 1.6.0   Back to index