Commit graph

3838 commits

Author SHA1 Message Date
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
Script Kiddy 1a4ca3edb1 SVN_SILENT made messages (.desktop file) 2012-02-16 10:49:16 +01:00
Peter Penz 749362987b Folders Panel: Use the whole width as selection region
As no rubberband-selection is enabled for the Folders Panel it does
not make sense to keep the selection region as small as possible.

BUG: 294111
FIXED-IN: 4.8.1
2012-02-15 16:20:47 +01:00
Peter Penz cf72e48111 Minor padding optimizations 2012-02-14 23:27:01 +01:00
Peter Penz 83130d8e16 Details view: Fix filter issue with sibblings
When the filter has been enabled, the sibblings got not updated. Explicitely
update the sibblings when inserting, removing or moving items. For layouting
implicitely update the sibblings only for recycled widgets.
2012-02-14 23:00:48 +01:00
Peter Penz 55f46ceb9c Details view: Siblings fixes
The siblings should only range within one group.
2012-02-14 20:59:08 +01:00
Peter Penz 0397658b81 Details view: Fix indicator-branches
Up to now no indicator-branches have been drawn when showing a tree. The patch
fixes this so that that the style-dependent branches are drawn.

The main part of the patch is the implementation of
KItemListView::updateSiblingsInformation(). Most of the other changes are
related due to an internal renaming of the expansionsLevel-role to
expandedParentsCount and some related cleanups.

BUG: 290276
FIXED-IN: 4.8.1
2012-02-14 18:05:29 +01:00
Frank Reininghaus 7f0aaff9b5 Test which items are activated when pressing Enter or Return
The ViewState struct gets a new bool member to indicate if the selected
items should have been activated after the last event or not. One could
argue that adding a bool parameter to the constructor is not optimal,
but I think adding an enum is not really worth the effort because the
struct is not used outside this unit test. Moreover, I could not think
of a good name for the enum type and its values.
(cherry picked from commit 307cca7b31)
2012-02-13 22:39:04 +01:00
Frank Reininghaus e1766d0e5f Fix regression in KItemListControllerTest
Since commit 66ce4db487, enabling or
disabling groupling may change the number of columns in the view.
Therefore, the test should first change the "grouping" setting and then
change the view geometry to make sure that the column count is correct.
(cherry picked from commit 61390b201a)
2012-02-13 20:21:57 +01:00
Peter Penz 056d12d60f Group header layout fixes
- Don't use a margin for the first group header
- Provide margins between the groups
- Use a more subtle coloring
- Prevent animation glitches when resizing a window
2012-02-11 18:04:53 +01:00
Peter Penz e29e1cda15 Icon-rectangle and selection-toggle optimizations
- No padding should be applied to the icon-rectangle
- Base the selection-toggle size on the icon-size of the style not
  the actual pixmap content, as this might lead to smaller selection-toggles
  when having pixmap-previews with a small height.
2012-02-09 16:05:03 +01:00
Peter Penz 03415d9078 Layout optimizations
- Differ internally between margins and paddings
- Add a small padding in the icons-view and the compact-views
- Optimize the width of the icons-view if previews are shown
2012-02-08 17:48:32 +01:00
Peter Penz 3c83d8f14d Drag and drop: Adjust destination if the item is no directory or desktop-file
The URL of the view should be used as destination target if a dropping is not
done above a directory or desktop-file.

BUG: 293511
FIXED-IN: 4.8.1
2012-02-08 17:48:28 +01:00
Peter Penz a3a19f4a06 Compact view: Don't hide items at the bottom when grouping is turned on
When grouping has been turned on, it was possible that items aligned
at the bottom have been hidden.

BUG: 291640
FIXED-IN: 4.8.1
2012-02-07 17:18:47 +01:00
Peter Penz 5369ee6819 Group header improvements
- Use a simpler background and colors as suggested by Martin Zilz.
  This is just an early draft, I need to post some comparison screenshots to
  Martin for review.
- Fixes of some layout issues that have been revealed because of adjusting
  the group header heights.
- More clever animation/no-animation detection when doing listview-property
  changes in parallel.
2012-02-06 23:31:49 +01:00
Peter Penz 7af39fb960 Fix potential endless loop in layout
Usecase:
- No scrollbar is shown
- Window size will be decreased so that a scrollbar gets necessary

The decreased window size minus the space required for the scrollbar
results in a relayout of the items. In 99 % of all
cases a decreased window size won't result in showing more items in parallel in
comparison to a larger window size. However in the remaining 1 % this can
happen (e.g. see bug 293318 for a sample). This results in an endless loop as
now no scrollbar is required anymore, the layout changes again, the scrollbar
is required again, ...

BUG: 293318
FIXED-IN: 4.8.1
2012-02-05 19:22:34 +01:00
Frank Reininghaus d0933155e2 Replace setExpanded(const QSet<KUrl>&) by expandParentItems(const KUrl&)
The use case of this function (Folders Panel) requires the expansion of
the parent items of a single URL, so it's not needed to handle a full
set of URLs in this function. Moreover, the issue that not only the
parents, but also the URLs themselves were expanded is fixed by this
commit.
(cherry picked from commit 89082ca391)
2012-02-05 15:59:59 +01:00
Peter Penz 72af3125a8 Icons view: Layout optimizations
- Assure that landscape-previews use the whole available width of the icon-area
  instead of only using the square width. This waste of space occured if the
  text-width was larger than the icon-width.

- Only use one margin instead of two between the icons and the text to improve the
  visual appearance (thanks to Martin Zilz for the hint)

BUG: 293268
FIXED-IN: 4.8.1
CCMAIL: martin@kreativkonzentrat.de
2012-02-04 22:22:19 +01:00
Frank Reininghaus a2a78c98fc Simplify KItemListControllerTest::testKeyboardNavigation_data()
Function-static variables do not help much in a function which is
called exactly once.
(cherry picked from commit 847c8ebfd3)
2012-02-04 17:31:38 +01:00
Peter Penz 1041f340a2 Show the value "Unknown" for the item-count only after it has been verified
During determining the item-count for directories just show an empty string
until either the item-count has been calculated or if the item-count is unknown.

Thanks to Nikita Skovoroda for the initial proof-of-concept patch.

BUG: 291823
FIXED-IN: 4.8.1
2012-02-03 23:12:12 +01:00
Peter Penz 7bbdb66618 Show file size when hovering an item
BUG: 292687
FIXED-IN: 4.8.1
2012-02-03 22:32:39 +01:00
Peter Penz 3188ef05b2 FoldersPanel: Rename setHiddenFilesShown() to setShowHiddenFiles()
This is consistent with the naming scheme in KFileItemModel and KDirLister.
2012-02-03 20:29:08 +01:00