Commit graph

3959 commits

Author SHA1 Message Date
Peter Penz 1e6031c04d Extract sorting-algorithm from KFileItemModel into custom class 2012-04-04 13:37:07 +02:00
Peter Penz 4657459937 Show the ratings as stars instead of text 2012-04-04 00:21:05 +02:00
Peter Penz b8a12851b8 Minor internal cleanup 2012-04-02 22:24:16 +02:00
Peter Penz fdab593c01 Fix focus-rectangle issues
Assure that the focus-rectangle exactly matches to the bottom of
the rendered text.

BUG: 297203
BUG: 289804
FIXED-IN: 4.9.0
2012-04-02 22:20:10 +02:00
Peter Penz a4ede4e0eb Allow showing Nepomuk metadata inside views
Metadata like image-size, rating, comments, tags, ... can be shown
now in the view (e.g. as column in the Details mode).

Still open: The rating-information needs to be shown as stars.

In the context of this feature also the following bugs have been
fixed:
- Fix visual glitches in the header of the Details mode
- Improve the minimum column width calculation to respect also
  the headling and not only the content

BUG: 296782
FIXED-IN: 4.9.0
2012-04-01 16:46:54 +02:00
Frank Reininghaus aced85db1f KItemListKeyboardSearchManager: make it possible to choose the timeout
It's now possible to change the timeout, after which any call of
KItemListKeyboardSearchManager::addKeys(const QString&) starts a new
search, from the default value of 5000 milliseconds. This is not used
in Dolphin at the moment, but it permits to reduce the timeout to a
small value in the unit test. Before this change, the unit test took
more than 5 seconds to complete.
(cherry picked from commit 82fc1b54bd)
2012-03-29 20:05:49 +02:00
Frank Reininghaus bd26bf2a20 Increase the timeout in KItemListKeyboardSearchManager to 5 seconds
The previous timeout [QApplication::keyboardInputInterval()] was too
short to do a multi-letter search for users who do not type extremely
fast.
(cherry picked from commit 02eab49b2d)
2012-03-28 19:22:12 +02:00
Frank Reininghaus 88c3bd1866 Select files which have been pasted or dropped
Also clear the previous selection.
CCBUG: 295389
(cherry picked from commit 210e5e3b96)
2012-03-27 19:52:04 +02:00
Peter Penz 793311dac1 KItemListView interface and implementation simplification
- Remove KItemListView::preferredRoleColumnWidth() and allow implementing
  this as part of derived classes from KItemListWidget. Those derived
  classes are aware about the layout and hence also can provide the
  preferred role width.

- Make KItemListView::itemSizeHint() non-virtual and also allow
  implementing the size hint as part of derived classes from KItemListWidget.
2012-03-27 00:48:34 +02:00
Peter Penz 8c986e22fd Rename KItemListView::preferredColumnWidth() to preferredRoleColumnWidth() 2012-03-26 22:19:38 +02:00
Peter Penz 829e5070ef Add missing 'virtual' to preferredColumnWidth() 2012-03-26 00:01:40 +02:00
Peter Penz b7f0091733 Internal interface cleanup
Let derived classes from KItemListView just implement
preferredColumnWidth() for one role of an item instead of returning
a hashtable for a given item-range.
2012-03-26 00:00:12 +02:00
Peter Penz e70c2f8aa4 Details view: Don't reset to automatic resizing when adding columns
Until now when a new column is added in the case where custom column widths
are used, the automatic resizing has been turned on again. The patch fixes
this so that the current widths stay and the new column gets a proper default
width.
2012-03-25 22:58:16 +02:00
Peter Penz 1cbe55b97c Cleanup and minor fixes for column-handling 2012-03-24 23:47:42 +01:00
Peter Penz 3f88f79f86 Details view: Optionally remember user changed column-widths
If the user changed a column-width in the details-view, up to now
the width got reset when changing a directory or when restarting
Dolphin. Now the column-widths automatically get remembered for each
directory in case if the user has modified the width. The automatic
resizing is still turn on per default. The storing of the custom
column-width can easily be reset by right clicking on the header and
selecting "Automatic Column Widths" from the context-menu.

Some finetuning is still necessary (e.g. the "Adjust View Properties"
dialog currently is not aware about this setting) but this will
be fixed during the next weeks.

BUG: 264434
FIXED-IN: 4.9.0
2012-03-23 22:31:55 +01:00
Peter Penz 3fc96ef97b Details view: Expand the name-column like in Dolphin 1.x
With the new view-engine the name-column always has been expanded
to the maximum width of all available names. But this makes it
impossible to see other columns without scrolling when having long
filenames, so per default the Dolphin 1.x behavior has been applied
to the new view-engine so that the name-column-width gets decreased
to be able to show the other columns.

This patch will be released with KDE applications 4.8.2. For
Dolphin 2.1 (KDE applications 4.9) user-modified widths of the
columns will be remembered per directory also between different
sessions.

CCBUG: 264434
2012-03-22 15:47:01 +01:00
Peter Penz 403aa0bff3 KFileItemModel: Fix triggering of wrong assertion
When switching from the details-mode of a search-view into any other
mode, the m_expandedParentsCountRoot is set to ForceExpandedParentsCountRoot.
2012-03-21 16:54:02 +01:00
Peter Penz 982ce7ae20 Prevent flickering when updating items
When downloading images from e.g. the camera-IO-slave the files
will be downloaded as *.part files and renamed afterwards. The renaming
results in an undetermined mimetype and hence the probably already available
preview or icon gets replaced by a dummy icon. The patch fixes this by
keeping the old values as long until they have been resolved by
KFileItemModelRolesUpdater.
2012-03-21 12:12:35 +01:00
Peter Penz d3a2f1ba82 Fix sorting-issue when "Sort folders first" is disabled
The comparison of expanded trees may not assume that directories
are always sorted first and must respect the "Sort folders first"
setting.

The sorting-unittest has been extended by a sub-tree and the usecase
of bug 296437. The already deactivated test for
KFileItemModel::expandedParentsCountCompare() has been completely removed
as it has been replaced by testSorting().

BUG: 296437
FIXED-IN: 4.8.2
2012-03-20 23:35:43 +01:00
Peter Penz 4815fbd00b Bypass crash with Polyester-style
The Polyester style crashes when drawing a header where the
parent widget is 0.

BUG: 296453
FIXED-IN: 4.8.2
2012-03-20 21:09:52 +01:00
Peter Penz 03a65da80a KFileItemModel: Remove minimum-update timer
The timer became unnecessary after introducing the behavior to
collect all new items until KDirLister emits a completed()-signal.
2012-03-20 17:23:28 +01:00
Peter Penz 0dcb51b927 Fix alternate background issue
When items get inserted or deleted, the alternate background
must be updated.
2012-03-20 17:23:27 +01:00
Peter Penz 5798e081f5 Let additional mouse buttons trigger history navigation
Thanks to Sebastian Dörner for the patch!

REVIEW: 101335
BUG: 181823
FIXED-IN: 4.9
2012-03-19 16:53:53 +01:00
Peter Penz 476128f01a Fix translation issue in context-menu
Thanks to Alexander Potashev for the patch!

BUG: 290620
FIXED-IN: 4.8.2
2012-03-19 15:31:47 +01:00
Script Kiddy 0303f6b27f SVN_SILENT made messages (.desktop file) 2012-03-19 09:50:32 +01:00
Patrick Spendrin ff239e9297 remove the : on windows to have a valid path name
BUG:287360
(cherry picked from commit 0bf2e7c29a)
2012-03-18 12:50:48 +01:00
Peter Penz d6e10a5942 Use sub-menus for the "Sort By"- and "Additional Information"-menu
This allows doing some grouping for the visible roles by e.g. Image,
Document, Music or whatever.
2012-03-14 16:53:31 +01:00
Script Kiddy d048fe0161 SVN_SILENT made messages (.desktop file) 2012-03-14 09:19:01 +01:00
Peter Penz f041099904 Remove RolesInfoAccessor
Now KFileItemModel provides a way to access the available roles
including their translations. Note that the 3 roles "comments",
"rating" and "tags" have not been implemented yet in KFileItemModel
and turning them on does not work currently.
2012-03-13 16:29:45 +01:00
Peter Penz 6c60bf0ad5 Provide backward compatibility with older .directory versions
When upgrading to Dolphin 2.1 the obsolete additionalInfo-property
must be converted to the visibleRoles-property.
2012-03-12 15:19:20 +01:00
Peter Penz 2ba5c2cfc2 First step to introduce dynamic roles
Currently Dolphin is only capable of showing a fixed number of
roles (e.g. name, size, date, owner, ...). Dolphin 2.1 should
support also other roles like rating, tags, comments or other
meta-information of images or audio-files.

To support this the sorting-type and additional-type from
DolphinView has been replaced by a role-type represented as
QByteArray.
2012-03-11 19:05:56 +01:00
Oswald Buddenhagen d280813385 adjust to INSTALLed permissions 2012-03-10 13:23:41 +01:00
Peter Penz 956d32ed16 Prevent endless scrolling of list when dragging items
BUG: 295584
FIXED-IN: 4.8.2
2012-03-09 17:58:57 +01:00
Peter Penz d5726758b8 Folders Panel: Turn on items-expanding
Since the fix of bug 289090 the items-expanding is not automatically
turned on anymore when using the DetailsMode.

CCBUG: 289090
2012-03-09 16:28:35 +01:00
Peter Penz 9035ae212d Provide UI-option for "Expandable folders"
CCBUG: 289090
2012-03-09 16:24:20 +01:00
Peter Penz 475f8b1261 Details view: Allow to turn off expandable folders like in Dolphin 1.7
The option for turning off expandable folders has been removed with
the new view-engine. Due to several requests this option has been
readded again.

As for 4.8.x no new user-interface strings may be introduced, the
line
  ExpandableFolders=false
must be manually added below the section "[DetailsMode]" in the file
~/.kde/share/config/dolphinrc if the expandable-folders feature
should be disabled.

Thanks to H.H. "cyberbeat" for the initial patch!

BUG: 289090
FIXED-IN: 4.8.2
2012-03-09 16:19:19 +01:00
Peter Penz 08a485349f Allow custom sorting of details-view columns
Fix regression that Dolphin 2.0 did not allow to adjust the sorting
of the details-view columns.

BUG: 164696
FIXED-IN: 4.8.2
2012-03-07 22:18:59 +01:00
Peter Penz 90e6190f13 Update siblings when turning on/off grouping 2012-02-28 17:17:55 +01:00
Peter Penz ee31c709a5 Finetuning of margins and alternate row colors
Thanks to Martin Zilz for the ongoing support.
2012-02-28 16:43:53 +01:00
Script Kiddy 4620d8995e SVN_SILENT made messages (.desktop file) 2012-02-24 09:43:06 +01:00
Peter Penz 21a5a890b3 Whitespace cleanups and documentation fixes 2012-02-23 17:28:03 +01:00
Peter Penz a6627b9f23 Fix drag and drop issue when dragging between windows
Explicitly check whether a dragging is ongoing to decide whether a
tooltip may be shown or not, just using QApplication::mouseButtons()
is not sufficient when dragging between windows.

BUG: 294533
FIXED-IN: 4.8.1
2012-02-23 15:55:06 +01:00
Peter Penz dbc5fd7a49 Fix alternate backgrounds when enabling grouping
Up to now the alternating backgrounds just have been calculated by
checking whether the item index is odd. This does not work well when
grouping is enabled: In this case the alternate background color
of the first item of a group should stay consistent.
2012-02-22 18:31:03 +01:00
Peter Penz bdd0fdf246 Fix possible crash if no model is set
When updating the siblings-information by e.g. a call to
setSupportsItemExpanding() it is possible that the model is not
set yet.
2012-02-21 17:20:27 +01:00
Peter Penz 2db0cca5cf Don't show tooltips when dragging to another Dolphin window
BUG: 294533
FIXED-IN: 4.8.1
2012-02-21 17:07:00 +01:00
Peter Penz 7deb601f31 Don't trigger assert when switching to details-view
If the visible roles of the details-view are equal to the visible roles
of other views, then switching to the details-view will trigger an
assert because the invisible roles don't get updated.

Thanks to Frank Reininghaus for the detailed analyses!

In the context of this fix optimizations have been done when switching
view-modes: The "don't-animate-workaround" could be removed.

BUG: 294531
FIXED-IN: 4.8.1
2012-02-21 16:49:38 +01:00
Dawit Alemayehu a89bc63f6c Fixed signal to signal connection in Dolphin's view modes.
REVIEW: 104033
(cherry picked from commit b484b87376)
2012-02-20 18:07:20 -05:00
Peter Penz 51bd6cfdfa Remember the row- and column-information for visible items
Up to now KItemListView has not been aware to which column or row
an item belongs to. This has been handled internally in
KItemListViewLayouter. But for deciding whether a move-animation
might result in overlapping items it is mandatory to be aware about
the column/row. The current approach to guess a column/row change
by comparing the source- and target-rectangle works very well but
breaks on some corner-cases when e.g. zooming.

Now the layouter allows to access the information. This assures
that in the vertical alignment no move-animation is done between
rows and the in the horizontal alignment no move-animation is
done between the columns.
2012-02-17 16:02:14 +01:00
Peter Penz a5becac42c Compact view: Fix of left margin for first group 2012-02-16 16:37:36 +01:00
Peter Penz 613758b5ec Compact view: Padding- and margin-improvements for grouped alignments 2012-02-16 16:23:00 +01:00