connect(this, SIGNAL(signalSortOrderChanged(Qt::SortOrder)),
&dolphin, SLOT(slotSortOrderChanged(Qt::SortOrder)));
- m_urlNavigator = new URLNavigator(url, this);
+ m_urlNavigator = new UrlNavigator(url, this);
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
- this, SLOT(slotURLChanged(const KUrl&)));
+ this, SLOT(slotUrlChanged(const KUrl&)));
connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
- &dolphin, SLOT(slotURLChanged(const KUrl&)));
+ &dolphin, SLOT(slotUrlChanged(const KUrl&)));
connect(m_urlNavigator, SIGNAL(historyChanged()),
&dolphin, SLOT(slotHistoryChanged()));
m_dirLister = 0;
}
-void DolphinView::setURL(const KUrl& url)
+void DolphinView::setUrl(const KUrl& url)
{
- m_urlNavigator->setURL(url);
+ m_urlNavigator->setUrl(url);
}
const KUrl& DolphinView::url() const
void DolphinView::renameSelectedItems()
{
- const KUrl::List urls = selectedURLs();
+ const KUrl::List urls = selectedUrls();
if (urls.count() > 1) {
// More than one item has been selected for renaming. Open
// a rename dialog and rename all items afterwards.
if (destExists) {
delete progressIndicator;
progressIndicator = 0;
- view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").arg(name),
+ view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).",name),
DolphinStatusBar::Error);
break;
}
emit signalRequestItemInfo(url);
}
-bool DolphinView::isURLEditable() const
+bool DolphinView::isUrlEditable() const
{
- return m_urlNavigator->isURLEditable();
+ return m_urlNavigator->isUrlEditable();
}
void DolphinView::zoomIn()
m_urlNavigator->goHome();
}
-void DolphinView::setURLEditable(bool editable)
+void DolphinView::setUrlEditable(bool editable)
{
- m_urlNavigator->editURL(editable);
+ m_urlNavigator->editUrl(editable);
}
-const Q3ValueList<URLNavigator::HistoryElem> DolphinView::urlHistory(int& index) const
+const Q3ValueList<UrlNavigator::HistoryElem> DolphinView::urlHistory(int& index) const
{
return m_urlNavigator->history(index);
}
return fileView()->selectedItems();
}
-KUrl::List DolphinView::selectedURLs() const
+KUrl::List DolphinView::selectedUrls() const
{
KUrl::List urls;
if (list != 0) {
KFileItemList::const_iterator it = list->begin();
const KFileItemList::const_iterator end = list->end();
- KFileItem* item = 0;
while (it != end) {
+ KFileItem* item = *it;
urls.append(item->url());
++it;
}
}
if (ok) {
- m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").arg(source.fileName(), dest.fileName()),
+ m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.",source.fileName(), dest.fileName()),
DolphinStatusBar::OperationCompleted);
DolphinCommand command(DolphinCommand::Rename, source, dest);
UndoManager::instance().addCommand(command);
}
else {
- m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").arg(source.fileName(), dest.fileName()),
+ m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.",source.fileName(), dest.fileName()),
DolphinStatusBar::Error);
reload();
}
startDirLister(m_urlNavigator->url(), true);
}
-void DolphinView::slotURLListDropped(QDropEvent* /* event */,
+void DolphinView::slotUrlListDropped(QDropEvent* /* event */,
const KUrl::List& urls,
const KUrl& url)
{
destination = m_urlNavigator->url();
}
else {
- // Check whether the destination URL is a directory. If this is not the
- // case, use the navigator URL as destination (otherwise the destination,
+ // Check whether the destination Url is a directory. If this is not the
+ // case, use the navigator Url as destination (otherwise the destination,
// which represents a file, would be replaced by a copy- or move-operation).
KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, destination);
if (!fileItem.isDir()) {
}
}
- Dolphin::mainWin().dropURLs(urls, destination);
+ Dolphin::mainWin().dropUrls(urls, destination);
}
void DolphinView::mouseReleaseEvent(QMouseEvent* event)
Dolphin::mainWin().setActiveView(this);
}
-void DolphinView::slotURLChanged(const KUrl& url)
+void DolphinView::slotUrlChanged(const KUrl& url)
{
const ViewProperties props(url);
setMode(props.viewMode());
// changed so that it can update it's actions.
Dolphin::mainWin().slotSelectionChanged();
- emit signalURLChanged(url);
+ emit signalUrlChanged(url);
}
void DolphinView::triggerIconsViewItem(Q3IconViewItem* item)
((keyboardState & Qt::ControlModifier) > 0);*/
const bool isSelectionActive = false;
if ((item != 0) && !isSelectionActive) {
- // Updating the URL must be done outside the scope of this slot,
+ // Updating the Url must be done outside the scope of this slot,
// as iconview items will get deleted.
- QTimer::singleShot(0, this, SLOT(updateURL()));
+ QTimer::singleShot(0, this, SLOT(updateUrl()));
Dolphin::mainWin().setActiveView(this);
}
}
}
if (m_detailsView->isOnFilename(item, pos)) {
- // Updating the URL must be done outside the scope of this slot,
+ // Updating the Url must be done outside the scope of this slot,
// as listview items will get deleted.
- QTimer::singleShot(0, this, SLOT(updateURL()));
+ QTimer::singleShot(0, this, SLOT(updateUrl()));
Dolphin::mainWin().setActiveView(this);
}
else {
triggerDetailsViewItem(item, pos, 0);
}
-void DolphinView::updateURL()
+void DolphinView::updateUrl()
{
KFileView* fileView = (m_iconsView != 0) ? static_cast<KFileView*>(m_iconsView) :
static_cast<KFileView*>(m_detailsView);
}
if (fileItem->isDir()) {
- // Prefer the local path over the URL. This assures that the
- // volume space information is correct. Assuming that the URL is media:/sda1,
- // and the local path is /windows/C: For the URL the space info is related
+ // Prefer the local path over the Url. This assures that the
+ // volume space information is correct. Assuming that the Url is media:/sda1,
+ // and the local path is /windows/C: For the Url the space info is related
// to the root partition (and hence wrong) and for the local path the space
// info is related to the windows partition (-> correct).
const QString localPath(fileItem->localPath());
if (localPath.isEmpty()) {
- setURL(fileItem->url());
+ setUrl(fileItem->url());
}
else {
- setURL(KUrl(localPath));
+ setUrl(KUrl(localPath));
}
}
else {
m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error);
}
else {
- m_statusBar->setMessage(i18n("The location '%1' is invalid.").arg(location),
+ m_statusBar->setMessage(i18n("The location '%1' is invalid.",location),
DolphinStatusBar::Error);
}
return;
text = i18n("1 Item");
}
else {
- text = i18n("%1 Items").arg(itemCount);
+ text = i18n("%1 Items",itemCount);
}
text += " (";
text += i18n("1 Folder");
}
else {
- text += i18n("%1 Folders").arg(m_folderCount);
+ text += i18n("%1 Folders",m_folderCount);
}
text += ", ";
text += i18n("1 File");
}
else {
- text += i18n("%1 Files").arg(m_fileCount);
+ text += i18n("%1 Files",m_fileCount);
}
text += ")";
text = i18n("1 Folder selected");
}
else if (folderCount > 1) {
- text = i18n("%1 Folders selected").arg(folderCount);
+ text = i18n("%1 Folders selected",folderCount);
}
if ((fileCount > 0) && (folderCount > 0)) {
const QString sizeText(KIO::convertSize(byteSize));
if (fileCount == 1) {
- text += i18n("1 File selected (%1)").arg(sizeText);
+ text += i18n("1 File selected (%1)",sizeText);
}
else if (fileCount > 1) {
- text += i18n("%1 Files selected (%1)").arg(fileCount).arg(sizeText);
+ text += i18n("%1 Files selected (%1)",fileCount,sizeText);
}
return text;