Commit graph

3497 commits

Author SHA1 Message Date
Peter Penz
f640e48bbe Assure that the general settings are refreshed
This fixes issues where Dolphin must get restarted after changing
a general setting.

BUG: 289131
FIXED-IN: 4.8.0
2011-12-16 19:43:10 +01:00
Peter Penz
d9222cd1ce RenameDialog: Don't disable the OK-button if nothing has been changed
This prevents using the RETURN-key when accidently opening the
renaming dialog.

Thanks to Thomas Murach for pointing this out and providing the patch!

REVIEW: 103414
2011-12-15 16:47:54 +01:00
Script Kiddy
9a11094790 SVN_SILENT made messages (.desktop file) 2011-12-15 09:09:04 +01:00
Frank Reininghaus
dbfba7dfed Start an anchored selection when clicking a selection marker
BUG:200782
FIXED-IN:4.8.0
2011-12-15 00:36:30 +01:00
Peter Penz
065244fac9 Fix descending sort order issue
If the sort order is descending and directories and files are
shown on the same hierarchy level, the sorting was partly wrong.
2011-12-15 00:24:33 +01:00
Peter Penz
756c648f62 Don't show an expansion toggle for locked expansions 2011-12-15 00:05:33 +01:00
Peter Penz
b27aefa798 Fix expansion levels for search results
Force an expansion level of 0 for search results to prevent
showing tabbed child items without parent items.
2011-12-14 23:46:12 +01:00
Peter Penz
0c1ad320d1 Fix filtering issue in combination with expanded items
When items have been expanded they should never get filtered, as
each child item must have a parent item.
2011-12-14 22:59:10 +01:00
Peter Penz
10659d97af Improve private method KFileItemModel::expansionLevelsCompare()
Get rid of the hack to access the m_itemData member for getting
the parent of an item during sorting. ItemData has been extended
by a parent-member which allows a fast and save way to do this.

Sadly this makes the unit-test for expansionLevelsCompare() more
complex and it has been temporary deactivated. I'll take care to
fix this during the next week.
2011-12-14 22:33:34 +01:00
Peter Penz
ee8d9bb4ab Fix comment 2011-12-14 00:03:40 +01:00
Peter Penz
67783026f5 Fix several sort-issues
- Treeview: When sorting descending assure that the parent item is still
  ordered before the child items and not afterwards.
- Treeview: When sorting by other roles than names expansionsLevelCompare()
  had been buggy and resulted in ordering child items below wrong parent
  items.
- General: When sorting by another role than names and the role of
  two items had been equal a case sensitive sorting of the names had
  been done. This has been fixed by using the default name sorting
  as fallback.

BUG: 286726
FIXED-IN: 4.8.0
2011-12-13 23:43:28 +01:00
Michael Drueing
bd9f6e49d3 dolphin: DLLEXPORT is not valid for template class
MSVC tries to import the specialized class from the library, which fails because only the generic version can be exported.
GCC probably silently ignores the export.
2011-12-13 23:07:24 +01:00
Script Kiddy
0fe72f9b8d SVN_SILENT made messages (.desktop file) 2011-12-13 15:50:11 +01:00
Christoph Feck
a390d12de8 Respect style's viewport scrollbar layout policy
REVIEW: 103381
2011-12-12 17:36:19 +01:00
Peter Penz
42adf258b6 Remember sort settings
If the user has changed the sort-role or sort-order by clicking on the view-header of the details-view, the settings have been adjusted to the model but not remembered in the directory settings.
2011-12-11 20:24:38 +01:00
Peter Penz
85d08ac7ed Fix KItemListView::scrollToItem()
Don't let the item be invisible if the header is shown.
2011-12-11 19:34:08 +01:00
Peter Penz
7b679cc956 Scroll the view when the current item has been changed
We need now explicitly to scroll to the item when the current item has been changed, as this is not done automatically in the scope of KItemListView.

BUG: 288745
FIXED-IN: 4.8.0
2011-12-11 19:23:02 +01:00
Script Kiddy
c02daeba1c SVN_SILENT made messages (.desktop file) 2011-12-11 08:36:39 +01:00
Peter Penz
bb6dda6500 Fix issue that icon overlay is missing for links
BUG: 288609
FIXED-IN: 4.8.0
2011-12-10 23:03:38 +01:00
Peter Penz
54713bab0b Show error-message when dropping a folder into itself
Thanks to Janardhan Reddy for the analysis of the issue!

BUG: 283646
FIXED-IN: 4.8.0
2011-12-10 21:50:24 +01:00
Peter Penz
542a80874b Minor fix in copyright header
This class is not based on the ItemViews-NG project.
2011-12-10 21:38:15 +01:00
Peter Penz
cf704d2db6 Support wildcards for the filter
Thanks to Janardhan Reddy for the patch!

BUG: 155986
FIXED-IN: 4.8.0
2011-12-10 21:30:07 +01:00
Peter Penz
780e42533a Resort items when they have been changed
This assures that when renaming an item the sort-position will be adjusted. Thanks to Frank Reininghaus and Janardhan Reddy for the patch and the tests.

BUG: 288311
2011-12-10 12:27:09 +01:00
Peter Penz
54745c440c Fix issue with duplicate items in details view
When expanding an item, collapsing it and expanding it again before the items for the first expanding could be loaded, it was possible that items have been inserted twice into the model.

BUG: 288521
FIXED-IN: 4.8.0
2011-12-09 21:52:31 +01:00
Peter Penz
9a7a77e973 Reloading is not necessary anymore on a settings change
The new view-engine can adjust the properties with the existing items.
2011-12-09 16:54:56 +01:00
Peter Penz
a237e085fc Fix font settings issue
The font settings have been ignored currently because of the transition to the new view-engine.

The patch is based on the work of Janardhan Reddy and has been extended by the helper class ViewModeSettings.

BUG: 288395
FIXED-IN: 4.8.0
2011-12-08 23:10:42 +01:00
Peter Penz
2827b96d98 Fix "show hidden files" issues
Use KFileItemModel instead of KDirLister for toggling the whether
hidden files should be shown. This assures that the signal
KFileItemModel::loadingCompleted() will be emitted.

In the longterm Dolphin should only use the KFileItemModel, so that
the KDirLister instance is used only internally as implementation
detail in KFileItemModel. Although there are only a few cases left
where KDirLister is used instead of KFileItemModel this cleanup
will be postponed to after the 4.8 release...

BUG: 287314
BUG: 288213
FIXED-IN: 4.8.0
2011-12-08 11:13:28 +01:00
Script Kiddy
d5bfe1863c SVN_SILENT made messages (.desktop file) 2011-12-08 09:02:45 +01:00
Peter Penz
1d27156cdc Prevent unwanted item animations (#2)
Use a cleaner approach to prevent item animations when showing
a hidden tab the first time. For Dolphin > 2.0 the tab-code should
be refactored from DolphinMainWindow and encapsulated into an
own module (but well, this is on my TODO-list since KDE SC 4.4...)
2011-12-07 23:49:58 +01:00
Peter Penz
b358e99280 Enable "menu key" functionality
Bring back the functionality that a context-menu is opened if the "menu key" has been pressed. In opposite to Dolphin 1.7 the context-menu is shown above the selected item and not on the (probably unrelated) mouse position.

A new method KItemListView::itemContextRect() has been introduced: The method is now also used as reference for tooltips which fixes the issue that tooltips had a wrong horizontal alignment in the details-view.

BUG: 288366
FIXED-IN: 4.8.0
2011-12-07 23:10:00 +01:00
Peter Penz
5a3e79e4ed Prevent unwanted item animations
When splitting the view or opening a new tab there should not be
any animation of the items due to a wrong initial viewport size.
2011-12-07 21:57:12 +01:00
Peter Penz
c2533317f2 Fix issue of unknown icon-types
If the split-view is used and/or the Folders Panel is activated
it might happen that the "unknown"-icon of an item is shown instead
of the correct icon. The root-cause is that one model might already
have been resolved the MIME-type of a KFileItem while the other
model has not updated the icon yet. As KFileItems are shared the
check whether the MIME-type has been resolved is wrong. As at that
stage it is assured anyhow that the MIME-type is known just
applying the icon-name in any case won't slow down the performance.
2011-12-07 18:39:58 +01:00
Peter Penz
6c29a1d98a Fix icon boundaries issue
The size of the icon boundaries should be as minimal as possible.
The patch for fixing the zooming-issues with the selection resulted
into a minor regression where the icon boundaries might be too large.
This patch remembers the original size of the pixmap to be able
to scale m_iconRect.
2011-12-07 15:34:34 +01:00
Script Kiddy
539b88cc5f SVN_SILENT made messages (.desktop file) 2011-12-07 09:21:22 +01:00
Peter Penz
cf422a8abf Use scaled size for KFileItemListWidget::iconRect()
This prevents temporary selection rectangle issues when zooming
the icon sizes.

BUG: 287542
FIXED-IN: 4.8.0
2011-12-06 21:38:30 +01:00
Peter Penz
f61e1c4b87 Version control: Don't tint unversioned files
BUG: 287742
FIXED-IN: 4.8.0
2011-12-06 21:25:27 +01:00
Peter Penz
9d5d18739f Selection and current item fixes
- Remember selection + current item when switching view-modes
- Fix the current item indicator alignment for selections
- Set the item as current item when the selection toggle has
  been clicked
2011-12-06 21:17:01 +01:00
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