mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
compile and stuff
svn path=/trunk/kdebase/konqueror/keditbookmarks/; revision=206974
This commit is contained in:
parent
2d7e5dd634
commit
36f5b2e0f3
|
@ -75,14 +75,14 @@ ActionsImpl* ActionsImpl::s_self = 0;
|
|||
|
||||
void ActionsImpl::slotCut() {
|
||||
slotCopy();
|
||||
KMacroCommand *mcmd = CmdGen::self()->deleteItems(i18n("Cut Items"), listview->selectedItems());
|
||||
KMacroCommand *mcmd = CmdGen::self()->deleteItems(i18n("Cut Items"), ListView::self()->selectedItems());
|
||||
KEBTopLevel::self()->didCommand(mcmd);
|
||||
}
|
||||
|
||||
void ActionsImpl::slotCopy() {
|
||||
// this is not a command, because it can't be undone
|
||||
Q_ASSERT(listview->selectedItems()->count() != 0);
|
||||
QValueList<KBookmark> bookmarks = listview->itemsToBookmarks(listview->selectedItems());
|
||||
Q_ASSERT(ListView::self()->selectedItems()->count() != 0);
|
||||
QValueList<KBookmark> bookmarks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItems());
|
||||
KBookmarkDrag* data = KBookmarkDrag::newDrag(bookmarks, 0 /* not this ! */);
|
||||
kapp->clipboard()->setData(data, QClipboard::Clipboard);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ void ActionsImpl::slotPaste() {
|
|||
CmdGen::self()->insertMimeSource(
|
||||
i18n("Paste"),
|
||||
kapp->clipboard()->data(QClipboard::Clipboard),
|
||||
listview->userAddress());
|
||||
ListView::self()->userAddress());
|
||||
KEBTopLevel::self()->didCommand(mcmd);
|
||||
}
|
||||
|
||||
|
@ -110,20 +110,20 @@ void ActionsImpl::slotNewFolder() {
|
|||
return;
|
||||
}
|
||||
CreateCommand *cmd = new CreateCommand(
|
||||
listview->userAddress(),
|
||||
ListView::self()->userAddress(),
|
||||
dlg.text(), "bookmark_folder", /*open*/ true);
|
||||
KEBTopLevel::self()->addCommand(cmd);
|
||||
}
|
||||
|
||||
void ActionsImpl::slotNewBookmark() {
|
||||
CreateCommand * cmd = new CreateCommand(
|
||||
listview->userAddress(),
|
||||
ListView::self()->userAddress(),
|
||||
QString::null, QString::null, KURL());
|
||||
KEBTopLevel::self()->addCommand(cmd);
|
||||
}
|
||||
|
||||
void ActionsImpl::slotInsertSeparator() {
|
||||
CreateCommand * cmd = new CreateCommand(listview->userAddress());
|
||||
CreateCommand * cmd = new CreateCommand(ListView::self()->userAddress());
|
||||
KEBTopLevel::self()->addCommand(cmd);
|
||||
}
|
||||
|
||||
|
@ -133,9 +133,9 @@ void ActionsImpl::slotImport() {
|
|||
return;
|
||||
}
|
||||
KEBTopLevel::self()->addCommand(import);
|
||||
KEBListViewItem *item = listview->getItemAtAddress(import->groupAddress());
|
||||
KEBListViewItem *item = ListView::self()->getItemAtAddress(import->groupAddress());
|
||||
if (item) {
|
||||
listview->setCurrent(item);
|
||||
ListView::self()->setCurrent(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,11 +170,11 @@ void ActionsImpl::slotCancelSearch() {
|
|||
}
|
||||
|
||||
void ActionsImpl::slotTestAll() {
|
||||
TestLinkItrHolder::self()->insertItr(new TestLinkItr(listview->allBookmarks()));
|
||||
TestLinkItrHolder::self()->insertItr(new TestLinkItr(ListView::self()->allBookmarks()));
|
||||
}
|
||||
|
||||
void ActionsImpl::slotUpdateAllFavIcons() {
|
||||
FavIconsItrHolder::self()->insertItr(new FavIconsItr(listview->allBookmarks()));
|
||||
FavIconsItrHolder::self()->insertItr(new FavIconsItr(ListView::self()->allBookmarks()));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
@ -182,11 +182,11 @@ void ActionsImpl::slotUpdateAllFavIcons() {
|
|||
/* ------------------------------------------------------------- */
|
||||
|
||||
void ActionsImpl::slotTestSelection() {
|
||||
TestLinkItrHolder::self()->insertItr(new TestLinkItr(listview->selectedBookmarksExpanded()));
|
||||
TestLinkItrHolder::self()->insertItr(new TestLinkItr(ListView::self()->selectedBookmarksExpanded()));
|
||||
}
|
||||
|
||||
void ActionsImpl::slotUpdateFavIcon() {
|
||||
FavIconsItrHolder::self()->insertItr(new FavIconsItr(listview->selectedBookmarksExpanded()));
|
||||
FavIconsItrHolder::self()->insertItr(new FavIconsItr(ListView::self()->selectedBookmarksExpanded()));
|
||||
}
|
||||
|
||||
void ActionsImpl::slotSearch() {
|
||||
|
@ -195,7 +195,7 @@ void ActionsImpl::slotSearch() {
|
|||
// or, generically. itr's shouldn't overlap. difficult problem...
|
||||
bool ok;
|
||||
QString text = KLineEditDlg::getText("Find string in bookmarks:", "", &ok, KEBTopLevel::self());
|
||||
SearchItr* itr = new SearchItr(listview->allBookmarks());
|
||||
SearchItr* itr = new SearchItr(ListView::self()->allBookmarks());
|
||||
itr->setText(text);
|
||||
SearchItrHolder::self()->insertItr(itr);
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ void ActionsImpl::slotSearch() {
|
|||
/* ------------------------------------------------------------- */
|
||||
|
||||
void ActionsImpl::slotSort() {
|
||||
KBookmark bk = listview->selectedBookmark();
|
||||
KBookmark bk = ListView::self()->selectedBookmark();
|
||||
Q_ASSERT(bk.isGroup());
|
||||
SortCommand *cmd = new SortCommand(i18n("Sort Alphabetically"), bk.address());
|
||||
KEBTopLevel::self()->addCommand(cmd);
|
||||
|
@ -216,12 +216,12 @@ void ActionsImpl::slotSort() {
|
|||
/* ------------------------------------------------------------- */
|
||||
|
||||
void ActionsImpl::slotDelete() {
|
||||
KMacroCommand *mcmd = CmdGen::self()->deleteItems(i18n("Delete Items"), listview->selectedItems());
|
||||
KMacroCommand *mcmd = CmdGen::self()->deleteItems(i18n("Delete Items"), ListView::self()->selectedItems());
|
||||
KEBTopLevel::self()->didCommand(mcmd);
|
||||
}
|
||||
|
||||
void ActionsImpl::slotOpenLink() {
|
||||
QValueList<KBookmark> bks = listview->itemsToBookmarks(listview->selectedItems());
|
||||
QValueList<KBookmark> bks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItems());
|
||||
QValueListIterator<KBookmark> it;
|
||||
for (it = bks.begin(); it != bks.end(); ++it) {
|
||||
if ((*it).isGroup() || (*it).isSeparator()) {
|
||||
|
@ -236,22 +236,22 @@ void ActionsImpl::slotOpenLink() {
|
|||
/* ------------------------------------------------------------- */
|
||||
|
||||
void ActionsImpl::slotRename() {
|
||||
listview->rename(KEBListView::NameColumn);
|
||||
ListView::self()->rename(KEBListView::NameColumn);
|
||||
}
|
||||
|
||||
void ActionsImpl::slotChangeURL() {
|
||||
listview->rename(KEBListView::UrlColumn);
|
||||
ListView::self()->rename(KEBListView::UrlColumn);
|
||||
}
|
||||
|
||||
void ActionsImpl::slotSetAsToolbar() {
|
||||
KBookmark bk = listview->selectedBookmark();
|
||||
KBookmark bk = ListView::self()->selectedBookmark();
|
||||
Q_ASSERT(bk.isGroup());
|
||||
KMacroCommand *mcmd = CmdGen::self()->setAsToolbar(bk);
|
||||
KEBTopLevel::self()->addCommand(mcmd);
|
||||
}
|
||||
|
||||
void ActionsImpl::slotChangeIcon() {
|
||||
KBookmark bk = listview->selectedBookmark();
|
||||
KBookmark bk = ListView::self()->selectedBookmark();
|
||||
KIconDialog dlg(KEBTopLevel::self());
|
||||
QString newIcon = dlg.selectIcon(KIcon::Small, KIcon::FileSystem);
|
||||
if (newIcon.isEmpty()) {
|
||||
|
|
|
@ -43,7 +43,7 @@ void BookmarkIterator::slotCancelTest(BookmarkIterator *test) {
|
|||
}
|
||||
|
||||
KEBListViewItem* BookmarkIterator::curItem() {
|
||||
return listview->getItemAtAddress(m_book.address());
|
||||
return ListView::self()->getItemAtAddress(m_book.address());
|
||||
}
|
||||
|
||||
void BookmarkIterator::nextOne() {
|
||||
|
|
|
@ -167,7 +167,7 @@ void CreateCommand::unexecute() {
|
|||
Q_ASSERT(!bk.isNull() && !bk.parentGroup().isNull());
|
||||
|
||||
KEBListViewItem *item =
|
||||
static_cast<KEBListViewItem*>(listview->firstSelected());
|
||||
static_cast<KEBListViewItem*>(ListView::self()->firstSelected());
|
||||
|
||||
if (item && item->bookmark().hasParent() && item->bookmark().address() == m_to) {
|
||||
item->setSelected(false);
|
||||
|
@ -181,8 +181,8 @@ void CreateCommand::unexecute() {
|
|||
|
||||
selectItem =
|
||||
(prevAddr.isEmpty())
|
||||
? listview->getItemAtAddress(KBookmark::parentAddress(bk.address()))
|
||||
: listview->getItemAtAddress(prevAddr);
|
||||
? ListView::self()->getItemAtAddress(KBookmark::parentAddress(bk.address()))
|
||||
: ListView::self()->getItemAtAddress(prevAddr);
|
||||
}
|
||||
|
||||
if (selectItem) {
|
||||
|
|
|
@ -58,7 +58,7 @@ void ImportCommand::execute() {
|
|||
m_cleanUpCmd = DeleteCommand::deleteAll( bkGroup );
|
||||
|
||||
// unselect current item, it doesn't exist anymore
|
||||
listview->clearSelection();
|
||||
ListView::self()->clearSelection();
|
||||
m_cleanUpCmd->execute();
|
||||
|
||||
// import at the root
|
||||
|
@ -80,7 +80,7 @@ void ImportCommand::unexecute() {
|
|||
KCommand *cmd = DeleteCommand::deleteAll(root);
|
||||
|
||||
// unselect current item, it doesn't exist anymore
|
||||
listview->clearSelection();
|
||||
ListView::self()->clearSelection();
|
||||
cmd->execute();
|
||||
delete cmd;
|
||||
|
||||
|
|
|
@ -326,7 +326,7 @@ void ListView::slotDropped(QDropEvent *e, QListViewItem *newParent, QListViewIte
|
|||
mcmd = CmdGen::self()->insertMimeSource(i18n("Drop items"), e, newAddress);
|
||||
|
||||
} else {
|
||||
QPtrList<KEBListViewItem> *selection = listview->selectedItems();
|
||||
QPtrList<KEBListViewItem> *selection = selectedItems();
|
||||
KEBListViewItem *firstItem = selection->first();
|
||||
if (!firstItem || firstItem == itemAfterQLVI) {
|
||||
return;
|
||||
|
@ -481,11 +481,11 @@ bool KEBListView::acceptDrag(QDropEvent * e) const {
|
|||
}
|
||||
|
||||
QDragObject *KEBListView::dragObject() {
|
||||
QPtrList<KEBListViewItem> *selcItems = listview->selectedItems();
|
||||
QPtrList<KEBListViewItem> *selcItems = ListView::self()->selectedItems();
|
||||
if (selcItems->count() == 0) {
|
||||
return (QDragObject*)0;
|
||||
} else {
|
||||
QValueList<KBookmark> bookmarks = listview->itemsToBookmarks(selcItems);
|
||||
QValueList<KBookmark> bookmarks = ListView::self()->itemsToBookmarks(selcItems);
|
||||
KBookmarkDrag *drag = KBookmarkDrag::newDrag(bookmarks, viewport());
|
||||
const QString iconname = (bookmarks.size() == 1) ? bookmarks.first().icon() : "bookmark";
|
||||
drag->setPixmap(SmallIcon(iconname)) ;
|
||||
|
|
Loading…
Reference in a new issue