mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
further action related cleanups
remove several blah's and todo comments svn path=/trunk/kdebase/konqueror/keditbookmarks/; revision=215524
This commit is contained in:
parent
b5d78d6480
commit
386cdf0137
3 changed files with 10 additions and 32 deletions
|
@ -137,6 +137,8 @@
|
|||
<Action name="file_quit"/>
|
||||
<Action name="exportNS"/>
|
||||
<Action name="exportMoz"/>
|
||||
<Action name="expandall"/>
|
||||
<Action name="collapseall"/>
|
||||
</enable>
|
||||
</State>
|
||||
|
||||
|
@ -147,14 +149,12 @@
|
|||
<Action name="changecomment"/>
|
||||
<Action name="changeicon"/>
|
||||
<Action name="changeurl"/>
|
||||
<Action name="collapseall"/>
|
||||
<Action name="delete"/>
|
||||
<Action name="edit_copy"/>
|
||||
<Action name="edit_cut"/>
|
||||
<Action name="edit_paste"/>
|
||||
<Action name="edit_redo"/>
|
||||
<Action name="edit_undo"/>
|
||||
<Action name="expandall"/>
|
||||
<Action name="file_save"/>
|
||||
<Action name="importGaleon"/>
|
||||
<Action name="importIE"/>
|
||||
|
|
|
@ -111,7 +111,7 @@ void KEBListView::readonlyFlagInit(bool readonly) {
|
|||
void ListView::setInitialAddress(QString address) {
|
||||
KEBListViewItem *item = getItemAtAddress(address);
|
||||
if (!item) {
|
||||
item = m_listView->rootItem(); // BLAH
|
||||
item = m_listView->rootItem();
|
||||
}
|
||||
setCurrent(item);
|
||||
item->setSelected(true);
|
||||
|
@ -169,7 +169,6 @@ QValueList<KBookmark> ListView::itemsToBookmarks(QPtrList<KEBListViewItem>* item
|
|||
|
||||
QPtrList<KEBListViewItem>* ListView::selectedItems() {
|
||||
QPtrList<KEBListViewItem> *items = new QPtrList<KEBListViewItem>();
|
||||
// BLAH
|
||||
for (QPtrListIterator<KEBListViewItem> it(*(m_listView->itemList()));
|
||||
it.current() != 0; ++it) {
|
||||
if (it.current()->isSelected()) {
|
||||
|
@ -297,7 +296,6 @@ QValueList<KBookmark> ListView::selectedBookmarksExpanded() {
|
|||
if (!it.current()->isSelected()
|
||||
|| it.current()->isEmptyFolder()
|
||||
|| it.current() == m_listView->rootItem()) {
|
||||
// BLAH
|
||||
continue;
|
||||
}
|
||||
if (it.current()->childCount() == 0) {
|
||||
|
@ -321,7 +319,6 @@ QValueList<KBookmark> ListView::selectedBookmarksExpanded() {
|
|||
|
||||
QValueList<KBookmark> ListView::allBookmarks() {
|
||||
QValueList<KBookmark> bookmarks;
|
||||
// BLAH
|
||||
for (QPtrListIterator<KEBListViewItem> it(*(m_listView->itemList())); it.current() != 0; ++it) {
|
||||
if ((it.current()->childCount() == 0) && !it.current()->isEmptyFolder()) {
|
||||
bookmarks.append(it.current()->bookmark());
|
||||
|
@ -332,7 +329,6 @@ QValueList<KBookmark> ListView::allBookmarks() {
|
|||
|
||||
void ListView::updateLastAddress() {
|
||||
KEBListViewItem *lastItem = 0;
|
||||
// BLAH
|
||||
for (QPtrListIterator<KEBListViewItem> it(*(m_listView->itemList())); it.current() != 0; ++it) {
|
||||
if ((it.current()->isSelected()) && !it.current()->isEmptyFolder()) {
|
||||
lastItem = it.current();
|
||||
|
@ -376,7 +372,7 @@ void ListView::setCurrent(KEBListViewItem *item) {
|
|||
}
|
||||
|
||||
KEBListViewItem* ListView::getItemAtAddress(const QString &address) {
|
||||
QListViewItem *item = m_listView->rootItem(); // BLAH
|
||||
QListViewItem *item = m_listView->rootItem();
|
||||
|
||||
QStringList addresses = QStringList::split('/',address); // e.g /5/10/2
|
||||
|
||||
|
@ -394,7 +390,6 @@ KEBListViewItem* ListView::getItemAtAddress(const QString &address) {
|
|||
}
|
||||
|
||||
void ListView::setOpen(bool open) {
|
||||
// BLAH
|
||||
for (QPtrListIterator<KEBListViewItem> it(*(m_listView->itemList())); it.current() != 0; ++it) {
|
||||
if (it.current()->parent()) {
|
||||
it.current()->setOpen(open);
|
||||
|
@ -413,32 +408,22 @@ SelcAbilities ListView::getSelectionAbilities() {
|
|||
sa.group = nbk.isGroup();
|
||||
sa.separator = nbk.isSeparator();
|
||||
sa.urlIsEmpty = nbk.url().isEmpty();
|
||||
sa.singleSelect = (!sa.multiSelect && sa.itemSelected); // oops, TODO, FIXME!
|
||||
sa.root = (m_listView->rootItem() == item); // BLAH
|
||||
sa.singleSelect = (!sa.multiSelect && sa.itemSelected);
|
||||
sa.root = (m_listView->rootItem() == item);
|
||||
sa.multiSelect = (selectedItems()->count() > 1);
|
||||
} else {
|
||||
// kdDebug() << "no item" << endl;
|
||||
}
|
||||
|
||||
sa.notEmpty = (m_listView->rootItem()->childCount() > 0); // BLAH
|
||||
sa.notEmpty = (m_listView->rootItem()->childCount() > 0);
|
||||
|
||||
return sa;
|
||||
}
|
||||
|
||||
// TODO
|
||||
void ListView::handleDropped(KEBListView *lv, QDropEvent *e, QListViewItem *newParent, QListViewItem *itemAfterQLVI) {
|
||||
Q_UNUSED(lv);
|
||||
|
||||
bool inApp = (e->source() == m_listView->viewport())
|
||||
|| (m_folderListView && e->source() == m_folderListView->viewport());
|
||||
bool toOther = e->source() != lv->viewport();
|
||||
|
||||
kdDebug() << "inApp == " << inApp
|
||||
<< "toOther == " << toOther
|
||||
<< endl;
|
||||
|
||||
if (m_splitView) {
|
||||
// TODO
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -614,7 +599,6 @@ void ListView::rename(int column) {
|
|||
}
|
||||
|
||||
void ListView::clearSelection() {
|
||||
// num 2 can't have a selection
|
||||
m_listView->clearSelection();
|
||||
}
|
||||
|
||||
|
@ -656,7 +640,7 @@ void ListView::renameNextCell(bool fwd) {
|
|||
: KEBListView::CommentColumn;
|
||||
}
|
||||
if (!myrenameitem
|
||||
|| myrenameitem == m_listView->rootItem() // BLAH
|
||||
|| myrenameitem == m_listView->rootItem()
|
||||
|| myrenameitem->isEmptyFolder()
|
||||
|| myrenameitem->bookmark().isSeparator()
|
||||
|| (myrenamecolumn == KEBListView::UrlColumn
|
||||
|
|
|
@ -119,10 +119,11 @@ void KEBApp::createActions() {
|
|||
(void) KStdAction::quit(this, SLOT( close() ), actionCollection());
|
||||
(void) KStdAction::keyBindings(this, SLOT( slotConfigureKeyBindings() ), actionCollection());
|
||||
(void) KStdAction::configureToolbars(this, SLOT( slotConfigureToolbars() ), actionCollection());
|
||||
|
||||
(void) KStdAction::cut(actn, SLOT( slotCut() ), actionCollection());
|
||||
(void) KStdAction::copy(actn, SLOT( slotCopy() ), actionCollection());
|
||||
(void) KStdAction::paste(actn, SLOT( slotPaste() ), actionCollection());
|
||||
(void) KStdAction::find(actn, SLOT( slotSearch() ), actionCollection(), "search");
|
||||
(void) KStdAction::findNext(actn, SLOT( slotNextHit() ), actionCollection(), "nexthit");
|
||||
|
||||
(void) new KToggleAction(
|
||||
i18n("&Auto-Save on Program Close"), 0,
|
||||
|
@ -162,8 +163,6 @@ void KEBApp::createActions() {
|
|||
(void) new KAction(i18n("Check &Status"), "bookmark", 0,
|
||||
actn, SLOT( slotTestSelection() ), actionCollection(), "testlink" );
|
||||
|
||||
(void)KStdAction::find( actn, SLOT( slotSearch() ), actionCollection(), "search" );
|
||||
(void)KStdAction::findNext( actn, SLOT( slotNextHit() ), actionCollection(), "nexthit" );
|
||||
(void) new KAction(i18n("Check Status: &All"), 0,
|
||||
actn, SLOT( slotTestAll() ), actionCollection(), "testall" );
|
||||
(void) new KAction(i18n("Update All &Favicons"), 0,
|
||||
|
@ -225,9 +224,6 @@ void KEBApp::setActionsEnabled(SelcAbilities sa) {
|
|||
|
||||
coll->action("nexthit") ->setEnabled(true);
|
||||
|
||||
coll->action("expandall") ->setEnabled(true);
|
||||
coll->action("collapseall") ->setEnabled(true);
|
||||
|
||||
coll->action("search") ->setEnabled(!sa.multiSelect);
|
||||
|
||||
coll->action("edit_copy") ->setEnabled(sa.itemSelected);
|
||||
|
@ -258,8 +254,6 @@ void KEBApp::setActionsEnabled(SelcAbilities sa) {
|
|||
coll->action("setastoolbar") ->setEnabled(t5 && sa.group);
|
||||
}
|
||||
|
||||
// DESIGN clean up this sh*t
|
||||
|
||||
void KEBApp::setCancelFavIconUpdatesEnabled(bool enabled) {
|
||||
actionCollection()->action("cancelfaviconupdates")->setEnabled(enabled);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue