diff options
| author | Peter Penz <[email protected]> | 2006-12-02 21:51:36 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2006-12-02 21:51:36 +0000 |
| commit | c94276725b1452d9f899dec192a8e66ecb9a516d (patch) | |
| tree | 3694c3570d7e9c1007cd59f09971275ddb435b7d /src/dolphinmainwindow.cpp | |
| parent | 4f951f75e2f21e3c1748e13e1978d5770daabb8c (diff) | |
reanimated the context menu
svn path=/trunk/playground/utils/dolphin/; revision=609962
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 938d41cbc..c1a68fad5 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -589,20 +589,7 @@ void DolphinMainWindow::deleteItems() void DolphinMainWindow::properties() { - const KFileItemList* sourceList = m_activeView->selectedItems(); - if (sourceList == 0) { - return; - } - - KFileItemList list; - KFileItemList::const_iterator it = sourceList->begin(); - const KFileItemList::const_iterator end = sourceList->end(); - KFileItem* item = 0; - while (it != end) { - list.append(item); - ++it; - } - + const KFileItemList list = m_activeView->selectedItems(); new KPropertiesDialog(list, this); } @@ -1461,8 +1448,8 @@ void DolphinMainWindow::updateHistory() void DolphinMainWindow::updateEditActions() { - const KFileItemList* list = m_activeView->selectedItems(); - if ((list == 0) || (*list).isEmpty()) { + const KFileItemList list = m_activeView->selectedItems(); + if (list.isEmpty()) { stateChanged("has_no_selection"); } else { @@ -1470,13 +1457,13 @@ void DolphinMainWindow::updateEditActions() KAction* renameAction = actionCollection()->action("rename"); if (renameAction != 0) { - renameAction->setEnabled(list->count() >= 1); + renameAction->setEnabled(list.count() >= 1); } bool enableMoveToTrash = true; - KFileItemList::const_iterator it = list->begin(); - const KFileItemList::const_iterator end = list->end(); + KFileItemList::const_iterator it = list.begin(); + const KFileItemList::const_iterator end = list.end(); while (it != end) { KFileItem* item = *it; const KUrl& url = item->url(); |
