~ubuntu-branches/ubuntu/quantal/kde-baseapps/quantal

« back to all changes in this revision

Viewing changes to dolphin/src/dolphinpart.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-05-25 17:26:17 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20120525172617-xr9bzhlugldbflvq
Tags: 4:4.8.80a-0ubuntu1
* Merge with debian git, remainging changes:
  - keep breaks/replaces
  - keep symbol files
  - keep kubuntu patches
  - dolphin suggests and not recommends ruby
  - add kfind, konsole and kompare to dolphin suggests
* konq-plugins breaks/replaces kde-baseapps-data << 4:4.8.80

* Drop squence numbers from kubuntu patches 

* New upstream beta release
  - refresh kubuntu_fix_systemsettings_about_me.diff
  - add new doc images to {konqueror,dolphin}.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#include "views/dolphinviewactionhandler.h"
46
46
#include "views/dolphinnewfilemenuobserver.h"
47
47
#include "views/dolphinremoteencoding.h"
48
 
#include "views/dolphindirlister.h"
49
48
 
50
49
#include <QActionGroup>
51
50
#include <QApplication>
52
51
#include <QClipboard>
 
52
#include <QDir>
53
53
 
54
54
K_PLUGIN_FACTORY(DolphinPartFactory, registerPlugin<DolphinPart>();)
55
55
K_EXPORT_PLUGIN(DolphinPartFactory("dolphinpart", "dolphin"))
69
69
    m_view->setTabsForFilesEnabled(true);
70
70
    setWidget(m_view);
71
71
 
72
 
    connect(m_view, SIGNAL(finishedPathLoading(KUrl)), this, SLOT(slotCompleted(KUrl)));
73
 
    connect(m_view, SIGNAL(pathLoadingProgress(int)), this, SLOT(updateProgress(int)));
 
72
    connect(m_view, SIGNAL(directoryLoadingCompleted()), this, SIGNAL(completed()));
 
73
    connect(m_view, SIGNAL(directoryLoadingProgress(int)), this, SLOT(updateProgress(int)));
74
74
    connect(m_view, SIGNAL(errorMessage(QString)), this, SLOT(slotErrorMessage(QString)));
75
75
 
76
76
    setXMLFile("dolphinpart.rc");
96
96
    connect(m_view, SIGNAL(modeChanged(DolphinView::Mode,DolphinView::Mode)),
97
97
            this, SIGNAL(viewModeChanged())); // relay signal
98
98
    connect(m_view, SIGNAL(redirection(KUrl,KUrl)),
99
 
            this, SLOT(slotRedirection(KUrl,KUrl)));
 
99
            this, SLOT(slotDirectoryRedirection(KUrl,KUrl)));
100
100
 
101
101
    // Watch for changes that should result in updates to the
102
102
    // status bar text.
299
299
    return true;
300
300
}
301
301
 
302
 
void DolphinPart::slotCompleted(const KUrl& url)
303
 
{
304
 
    Q_UNUSED(url)
305
 
    emit completed();
306
 
}
307
 
 
308
302
void DolphinPart::slotMessage(const QString& msg)
309
303
{
310
304
    emit setStatusBarText(msg);
437
431
                                actionGroups);
438
432
}
439
433
 
440
 
void DolphinPart::slotRedirection(const KUrl& oldUrl, const KUrl& newUrl)
 
434
void DolphinPart::slotDirectoryRedirection(const KUrl& oldUrl, const KUrl& newUrl)
441
435
{
442
436
    //kDebug() << oldUrl << newUrl << "currentUrl=" << url();
443
437
    if (oldUrl.equals(url(), KUrl::CompareWithoutTrailingSlash /* #207572 */)) {
477
471
 
478
472
    if (okClicked && !pattern.isEmpty()) {
479
473
        QRegExp patternRegExp(pattern, Qt::CaseSensitive, QRegExp::Wildcard);
480
 
        m_view->setItemSelectionEnabled(patternRegExp, selectItems);
 
474
        m_view->selectItems(patternRegExp, selectItems);
481
475
    }
482
476
}
483
477
 
608
602
 
609
603
bool DolphinPartFileInfoExtension::hasSelection() const
610
604
{
611
 
    return part()->view()->hasSelection();
 
605
    return part()->view()->selectedItemsCount() > 0;
612
606
}
613
607
 
614
608
KParts::FileInfoExtension::QueryModes DolphinPartFileInfoExtension::supportedQueryModes() const