Commit graph

3460 commits

Author SHA1 Message Date
Peter Penz 9135ff9537 Don't animate when switching view-modes
Currently when switching the view-modes an animation of the items
is done, where the position and size is adjusted for the new
view-mode.

Although this might look nice initially I'd consider this as a
kind of animation that is distracting and hence it has been
turned off.
2011-12-06 19:50:09 +01:00
Peter Penz 0c314917a5 Fix possible crash in SearchPanel::urlChanged()
m_lastSetUrlStatJob gets a dangling pointer if we don't have a
Nepomuk URL.

Thanks to Frank Reininghaus for the analysis and the hint!

BUG: 287075
FIXED-IN: 4.8.0
2011-12-06 19:30:21 +01:00
Peter Penz 8998ee8f51 Folders Panel cleanups
- Reactivate dropping of URLs
- Remove unused/obsolete code
- Simplify DragAndDropHelper interface
2011-12-06 19:22:55 +01:00
Peter Penz 899c171a2b Fix selection issue for Information Panel
When the selection changes during the Information Panel is
invisible, it still should get applied so that when making the
Information Panel visible again a valid selection is shown.

Thanks to A. Janardhan Reddy for the patch!

(Additionally the obsolete check for an empty selection has
been removed, as this cannot happen anymore with the new view
engine)

BUG: 281452
FIXED-IN: 4.8.0
2011-12-06 18:53:42 +01:00
Peter Penz 0db2847504 Reactivate drop-above-places-panel functionality
Dropping items into the Places panel has been temporary deactivated because
of switching to the new view-engine -> reactivate it again

BUG: 204359
FIXED-IN: 4.8.0
2011-12-06 16:31:24 +01:00
Peter Penz 51e1858398 Fix calculation of maximum scroll offset
The maximum scroll offset must be the maximum y-range of the last
row, not only the maximum of the last item.

Thanks to Frank Reininghaus for analysing the root-cause and
for providing the initial patch!

BUG: 287211
FIXED-IN: 4.8.0
2011-12-05 20:01:11 +01:00
Frank Reininghaus eb21254eef Update the view if an item is renamed 2011-12-04 23:37:18 +01:00
Peter Penz 7263a091c5 Fix crash #2 when filtering items
When KFileItems get removed from the model it is temporary possible
that the pending items are still part of the KFileItemModelRolesUpdater
while they have already been removed from the model (this happens
in the context during the signal itemsRemoved() gets emitted).

BUG: 287642
2011-12-04 20:50:01 +01:00
Peter Penz 854b0acd1a Fix crash #1 when filtering items
When filtering items it was possible that the current index got
an invalid value which resulted in accessing the URL of a
null-KFileItem.

There is still one (general) open issue in KFileItemModelRolesUpdater
(crash #2) where a KFileItem that is already null gets read.
It is not really related to filtering but can be triggered
quite easy when filtering huge directories with enabled previews.

CCBUG: 287642
2011-12-04 18:21:46 +01:00
Frank Reininghaus 031b1a4c19 Make sure that enabling previews triggers the generation of previews
Before this commit, no previews were generated if the icon size was the
same with and without previews.
2011-12-04 17:44:59 +01:00
Frank Reininghaus 0dce0b3bef Update the zoom slider if the previews setting is changed
This is important if the zoom levels are different with previews
enabled/disabled.
2011-12-04 17:44:59 +01:00
Frank Reininghaus 82b20ff58e Clear the selection in MousePressEvent() rather than MouseReleaseEvent()
This fixes the problem that clicking an unselected item in order to drag
it would result in dragging all previously selected items as well. With
this commit, previously selected items are unselected when a new item is
clicked.

The reason why clearing the selection was moved to MouseReleaseEvent()
in commit b583dd6d4d was that clicking one
of several selected items should not result in unselecting the other
items (to make sure that dragging multiple items is possible). However,
this can also be assured by just checking in MousePressEvent() if the
clicked item has been selected already and not clearing the previous
selection in that case. This applies equally to the case that a context
menu is requested when several items are selected.
2011-12-04 13:54:05 +01:00
Ni Hui e2e5b0e45a avoid double margins 2011-12-04 18:17:58 +08:00
Frank Reininghaus 27339e15c6 Update the current item during rubber band selections 2011-12-03 18:09:34 +01:00
Script Kiddy c16c6f76a6 SVN_SILENT made messages (.desktop file) 2011-12-03 09:31:16 +01:00
Script Kiddy d843a6278b SVN_SILENT made messages (.desktop file) 2011-12-02 09:58:31 +01:00
Peter Penz 7b8fbf7374 Reimplement name-filtering
The filtering of items has not been implemented yet in
the KFileItemModel of the new view-engine. The patch brings back
this functionality again, but some minor issues are open:
- When filtering trees expanded directories should only get
  hidden if no child is visible
- Regular expressions are not supported yet (they have not been
  supported in Dolphin 1.x but it is now quite simple to implement).
- When filtering previews and removing the filter it might be
  possible that the preview is not shown (is most probably an
  an already existing bug in KFileItemModelRolesUpdater).

BUG: 287642
FIXED-IN: 4.8.0
2011-11-30 00:24:33 +01:00
Peter Penz 3719ce7d2a Reactivate the "Open folders during drag operations" feature
The feature got temporary lost due to the port to the new view
engine.
2011-11-29 22:03:26 +01:00
Script Kiddy 4cd8ebff82 SVN_SILENT made messages (.desktop file) 2011-11-29 16:47:26 +01:00
Weng Xuetian 03e9b71f0a nepomuk config option change strigiservice -> fileindexer 2011-11-28 00:19:15 +08:00
Peter Penz d7f89808f7 Apply icon effect for cut items
Fix issue that no icon effect got applied to icons that have
been cut.
2011-11-27 00:29:25 +01:00
Peter Penz 362817d183 Folders Panel fixes
The following functionality from Dolphin 1.x has
been ported to the new view-engine:
- Allow expanding/collapsing of items
- Automatically select the current item
- Context menu for items

Related improvements to the view-engine:
- Make the expanding/collapsing interface already accessible
  in the base classes KItemModelBase and KItemListView. If
  no expanding/collapsing is supported at all by derived models
  (which is usually the default case) simply not reimplementing
  those 3 methods is sufficient and it does not introduce an
  additional complexity like in QAbstractItemModel/QModelIndex.

- Automatically handle the expanding/collapsing in KItemListController.
  This also includes the key-handling, which is quite special for
  expandable items.

- Don't let KItemListView automatically scroll to the current item
  if the current item got changed. The automatic scrolling should
  only be done if the current item has been changed by the user.
  Hence this functionality has been moved to the KItemListController
  which currently only triggers the automatic scrolling if the current
  item has been changed by the keyboard (we might extend the usecases
  later if required).
2011-11-26 01:16:31 +01:00
Peter Penz bf1a8f989e Use correct selection color for inactive windows 2011-11-25 21:34:19 +01:00
Sebastian Trueg 93cc480803 Use KFileItem::text() instead of KFileItem::name().
This way Nepomuk search results get their proper user readable names.
BUG: 287472
REVIEW: 103237
2011-11-25 16:09:57 +01:00
Frank Reininghaus 3950eccaf0 Fix restoring expanded URLs
When navigating back or forward in history, DolphinView tells the
KFileItemModel about the expanded URLs which should be restored before
the folder is entered. In this case, the algorithm in the new function
KFileItemModel::setExpanded(const QSet<KUrl>&) does not work. To fix
this, the old function
KFileItemModel::restoreExpandedUrls(const QSet<KUrl>&) is restored.

Unit test included.
2011-11-24 23:38:36 +01:00
Script Kiddy c0feb043e0 SVN_SILENT made messages (.desktop file) 2011-11-23 09:18:21 +01:00
Frank Reininghaus 1f41bed142 Don't try to divide by zero.
Fixes a crash in Dolphin when pressing a key so quickly after a url
change that there are no items in the file item model yet.

BUG:287147
2011-11-22 00:54:52 +01:00
Peter Penz 36b8989179 Fix shortcut issue with panels
The KAction instance of the panels is added to the menu instance
now instead of the QDock-actions. It is assured that the state
between the actions gets synchronized. Now it's possible for
the user to apply custom shortcuts and the shortcuts are also
shown in the menu as expected.

CCMAIL: lueck@hube-lueck.de
2011-11-21 11:08:26 +01:00
Burkhard Lück 7f139702ee columns view was removed, new compact view 2011-11-21 10:14:50 +01:00
Frank Reininghaus fa1b7e277f Don't crash when closing Dolphin if the Folders Panel is hidden 2011-11-20 23:26:41 +01:00
Peter Penz 3c079ee3f9 Show panel shortcuts in menu 2011-11-20 20:03:59 +01:00
Peter Penz b27e599429 Initial draft for bringing back the "Folders" panel
The folders panel has been adjusted to use the new view-engine.
A lot of things don't work yet, but are mostly minor issues that
should be fixable during the next 10 days.
2011-11-20 19:35:01 +01:00
Script Kiddy 693f254252 SVN_SILENT made messages (.desktop file) 2011-11-19 10:09:17 +01:00
Peter Penz fcfb63bb9d Simplify creation of drag-pixmap 2011-11-19 08:09:38 +01:00
Peter Penz cbab7fdc62 Improve dragging pixmap
When dragging multiple files, those files should be shown as part
of the dragging pixmap like in Dolphin 1.7.

BUG: 285031
FIXED-IN: 4.8.0
2011-11-19 07:36:25 +01:00
Peter Penz b6fb59fc7e Remove "Rename inline" option
The new view-engine currently does not support inline-renaming
and because of more important pending issues this cannot be
implemented for the 4.8 release of KDE applications.

The plan for 4.9 is to implement inline-renaming again and
to make it "so good" (tm) that it is always turned on (-> there is
no need anymore for an option to disable it ;-)

CCBUG: 286893
2011-11-19 07:12:06 +01:00
Peter Penz dc8ec1bf01 Fix crash when toggling the menu-bar visibility
Use a queued connection to prevent that the menu
gets hidden during it is still open. Thanks to
Christoph Feck for the hint!

Frank and I could not reproduce the issue in our
environments even when following the steps from
bug 278366, however Christoph's hint sounds sane
and let's hope it works (leaves a bad gut feeling
to "fix" bugs without being able to verify them).

CCBUG: 286822
CCBUG: 278366
FIXED-IN: 4.7.4
2011-11-19 06:51:31 +01:00
Peter Penz d4d83e04e5 Apply the selected-state to the current item
This assures that (with the default colors) the indication
of the current item is done in white instead of black.
2011-11-18 22:53:16 +01:00
Peter Penz ba0c58c221 Fix wrong position of selection-toggle
When switching between view-modes the selection-toggle sometimes
had a wrong position.
2011-11-18 22:05:32 +01:00
Peter Penz fdab9ee644 Fix colors for the selection/hover-area
Thanks to Hugo Pereira Da Costa for pointing this out and
the initial patch!

CCMAIL: hugo@oxygen-icons.org
2011-11-18 20:53:22 +01:00
Script Kiddy 77f9af8044 SVN_SILENT made messages (.desktop file) 2011-11-14 09:28:37 +01:00
Peter Penz e560a2f646 Fix selection style issues
Don't use a custom drawing code for showing the hover-indication
or selection of the text.
- The default style for items is used.
- Merge icon-rectangle and text-rectangle if possible.
- Fix background and minor focus-issues
2011-11-13 20:58:43 +01:00
Peter Penz 2438b61d8e Bring back the selection-markers
Still some finetuning is necessary, but lets first bring
back the missing features from Dolphin 1.x to 2.0 before starting
with this.
2011-11-13 16:21:56 +01:00
Script Kiddy fddcbc7a9e SVN_SILENT made messages (.desktop file) 2011-11-13 08:35:08 +01:00
Script Kiddy 6f3230112a SVN_SILENT made messages (.desktop file) 2011-11-12 10:27:10 +01:00
Script Kiddy ef46904a27 SVN_SILENT made messages (.desktop file) 2011-11-10 09:44:57 +01:00
Script Kiddy f947ce6d91 SVN_SILENT made messages (.desktop file) 2011-11-08 15:36:30 +01:00
Peter Penz c4e3528c7a Fix expansion-level issue
When the details-view has been used on / a wrong expansion-level
has been calculated and hence no expansion-toggles have been
visible.
2011-11-06 23:10:56 +01:00
Peter Penz e7390eba86 Show compact-mode icon also in Konqueror
Additionally a broken signal-connection has been fixed.
2011-11-06 12:14:07 +01:00
Peter Penz 3c77ffe832 Delete obsolete class DolphinSettings 2011-11-06 11:59:26 +01:00