Commit graph

710 commits

Author SHA1 Message Date
Dawit Alemayehu a469cd9847 Merge remote-tracking branch 'origin/KDE/4.9' 2012-10-16 00:38:13 -04:00
Ignat Semenov 9888a438d8 check the "paste" action pointer in PopupView::showContextMenu 2012-10-13 18:43:58 +04:00
Ignat Semenov fe8b9eafcb check if the model index list is empty in PopupView::contextMenuRequest
TODO: Context menu code is duplicated between FolderView and PopupView, and needs to
be factored out.

BUG:292127
FIXED-IN:4.9.3
2012-10-13 00:59:28 +04:00
Ignat Semenov 30ae111f75 check if the model index list is empty in PopupView::contextMenuRequest
TODO: Context menu code is duplicated between FolderView and PopupView, and needs to
be factored out.

BUG:292127
FIXED-IN:4.9.3
2012-10-13 00:56:11 +04:00
Gregor Tätzner 1465967cac Use folder-blue instead of user-folder as iconName for unkown icons. 2012-10-02 13:11:20 +02:00
Raphael Kubo da Costa 396c2c3fcf Adjust to Ark's drag'n'drop D-Bus interface changes.
Ark's drag'n'drop D-Bus interface needs to be changed: so far, the object
path was always /DndExtract, but this does not work if Ark is being used as
an embedded KPart (in Konqueror or Rekonq, for example), as all tabs will
end up calling QDBusConnection::registerObject() with the same path. Only
the first call will work, and the result is that dragging and dropping from
any tab previewing an archive with Ark will extract from the first archive
being previewed.

To fix that, applications that accept the application/x-kde-dndextract
mimetype should now be adjusted to check the
application/x-kde-ark-dndextract-service and
application/x-kde-ark-dndextract-path ones instead; the former contains the
same service information that used to be passed, while the latter tells
which object path should be talked to.

This is the folderview part of the change, modeled after the changes made to
Dolphin.

CCBUG: 304860
2012-08-26 01:29:43 -03:00
Ignat Semenov d3b8716c57 only start the clear saved positions timer if it is already running
CCBUG:265774
2012-07-13 21:05:47 +04:00
Ignat Semenov 87691b0cb8 use m_model instead of m_dirModel since the view can be filtered 2012-07-06 16:50:19 +04:00
Script Kiddy 0388171e04 SVN_SILENT made messages (.desktop file) 2012-06-26 19:08:12 +02:00
Script Kiddy 12abf054b8 SVN_SILENT made messages (.desktop file) 2012-06-18 10:06:11 +02:00
Script Kiddy 8aa8921501 SVN_SILENT made messages (.desktop file) 2012-06-16 12:13:06 +02:00
Ivan Čukić b9379ec086 Selecting the proper item in the configuration dialogue when showing
the files from the current activity (activities:/current/)
2012-05-25 09:39:32 +02:00
Ignat Semenov c1a82f1321 use Plasma::viewFor() to locate the relevant QGraphicsView
QGraphicsView::underMouse() can fail if the mouseEnterEvent has not been
delivered. E.g. opening a context menu in a folder peek popup and then clicking
the desktop makes subsequent underMouse() calls return false.

This replaces underMouse() with the standard Plasma method based on using the
item's scene coordinates.

BUG:300386
FIXED-IN:4.8.4
2012-05-21 20:38:01 +04:00
Ivan Čukić 70ca713486 Showing current activity 2012-05-16 22:41:16 +02:00
Ivan Čukić 93fba26f56 Added folderview option to show files related to the current activity 2012-05-16 17:54:04 +02:00
Script Kiddy 234818d7a0 SVN_SILENT made messages (.desktop file) 2012-04-17 16:06:32 +02:00
Ignat Semenov 87d7b70509 add public slot FolderView::addUrl(KUrl)
This slot can be used e.g. by Kickoff for the "Add to Desktop" action to add a real link
instead of an Icon applet.

REVIEW:104328
2012-03-29 16:23:55 +04:00
Ignat Semenov 1417342151 automatically disable action buttons if they cover the actual icon
REVIEW:104413
2012-03-27 10:50:59 +04:00
Ignat Semenov 046c8cf4c6 set the custom icon position data before setting the model
This is to avoid a potential race condition between the end of the layouting
process and setting the custom icon position data.

CCBUG:265774
2012-03-26 18:05:47 +04:00
Ignat Semenov 0b534c25dc give "Display" configuration page labels sane names 2012-03-25 19:20:20 +04:00
Ignat Semenov a20258c2ee do not shrink icons on mouse press+Ctrl and mouse press+Shift 2012-03-25 17:11:28 +04:00
Ignat Semenov 9c7cf7525a fix previously unselected icon repaint on mouse press event
This fies a bug introduced in 98e43df2c5
2012-03-25 16:53:00 +04:00
Ignat Semenov 8d3055fb4a scroll automatically on dragging the rubberband over the view edge
BUG:189350
REVIEW:104396
2012-03-24 20:22:41 +04:00
Ignat Semenov 2f74937497 document the icon position data format and setIconPositionsData() 2012-03-24 19:47:57 +04:00
Ignat Semenov 2e80f9b45a correctly handle m_sortDirsFirst in configChanged() 2012-03-24 19:43:26 +04:00
Ignat Semenov 98e43df2c5 repaint less on mousePressEvent, mouseReleaseEvent and mouseDoubleClickEvent
Only call markAreaDirty() for those items that have really changed their state
as a result of the mouse event.

REVIEW:103822
2012-03-22 20:27:39 +04:00
Aaron Seigo 410c44bf99 only restore state when coming out of being iconified
BUG:295535
2012-03-19 20:31:41 +01:00
Aaron Seigo fb25c1d284 Containment::saveState does useful things as well 2012-03-19 20:31:29 +01:00
Aaron Seigo 91a0c51e13 Revert "resize to the default size in constraintsEvent(), not in the applet constructor"
This reverts commit b0f8ba9d84.
2012-03-19 20:19:08 +01:00
Aaron Seigo 53af4e8d14 nest if's suck :) 2012-03-19 20:19:02 +01:00
Ignat Semenov 568d85d63e do not crash when passing a url in the ctor
Do not call setUrl in the ctor since m_dirLister does not exist yet.
Instead, assign m_url and call setUrl later in init().
2012-03-17 13:44:21 +04:00
Ignat Semenov f838eb40df update the size hint on setting icon size and word wrap
Use updateSizeHint() instead of markAreaDirty() in setWordWrap()
and setIconSize() to relayout the view automatically.
2012-03-14 22:24:43 +04:00
Ignat Semenov 4327bca491 scale correctly when placed in a panel
1)Use setPreferredSize instead of setMinimumSize
2)Set the size policy to QSizePolicy::Minimum

Also, remove update() from constraintesEvent() as per the docs.

BUG:295531
FIXED-IN:4.8.2
2012-03-12 23:50:58 +04:00
Ignat Semenov 2f7a07157f close the folder peek popups on triggering the "Open With" action
Close all open popups on "Open With" selected to maintain consistency with activating an item in the folder peek popup and in order not to occlude the dialog with the popup
1)Expose the KFileItemActions object in KonqPopupMenu
2)Add a method hideThisAndParentPopup() to hide the open popups without deletion;actually delete the popups only after executing the context menu in order to avoid a crash in contextMenuRequest() after deleting the popups

BUG:240414
FIXED-IN:4.8.2

reviewed by fredrikh
2012-03-06 19:37:03 +04:00
Ignat Semenov 2ccb2c2cff use QVector instead of QList for storing the check state of the model items
This makes the data() call for Qt::CheckStateRole O(1) instead of O(n).

reviewed by fredrikh
2012-02-25 18:54:00 +04:00
Ignat Semenov 0a24ae1bee properly handle the m_showPreviews setting in configChanged() and configAccepted()
BUG:294377
FIXED-IN:4.8.1
2012-02-25 16:35:10 +04:00
Ignat Semenov 4ba8055d84 do not inherit parent model filtering settings in the popup view 2012-02-22 18:33:09 +04:00
Ralf Jung 39baedcf97 make folderview compile with Qt 4.7
REVIEW: 104030
2012-02-21 12:10:47 +01:00
Script Kiddy 6d74e9f516 SVN_SILENT made messages (.desktop file) 2012-02-16 10:49:16 +01:00
Ignat Semenov 8ff2cf1357 inherit parent text line count in the popup view 2012-02-12 23:09:14 +04:00
Ignat Semenov 303e963f4e correctly apply text line count settings in list view
1)Apply the text line count setting in updateListViewState() - removed an incorrect pointer check
2)Relayout the items in the list view on text line count change and recalculate the list view size

This correctly fixes bug 261207, as it allows the user to set the text line count to 1, thus saving vertical space.

BUG:261207
FIXED-IN:4.8.1
2012-02-12 22:14:48 +04:00
Ignat Semenov b0f8ba9d84 resize to the default size in constraintsEvent(), not in the applet constructor
This has the added benefit of the applet behaving correctly if dragged out of a panel and dropped onto the desktop.
2012-02-11 22:32:47 +04:00
Ignat Semenov fe323abef1 read custom icon size in init() 2012-02-11 22:01:49 +04:00
Ignat Semenov f1d15d2a8c do not paint the hovered frame on the pressed icon during the drag 2012-02-11 20:43:49 +04:00
Ignat Semenov 5304ebf8b9 re-read the flow settings in configChanged() 2012-02-11 14:13:41 +04:00
Ignat Semenov 89208d71a9 do not scale the folderview icon when in panel
1)Keep the folderview panel icon size constant independent of the panel height / width.
2)Update icon size on panel icon size change using KGlobalSettings.
3)Check for m_iconWidget in the panle branch of constraintsEvent() to avoid creating duplicates / ghost entries on constraintEvent().

BUG:244557
FIXED-IN:4.8.1
REVIEW:103915
2012-02-11 00:23:35 +04:00
Ignat Semenov 84a2cb8b81 when sorting files by category other than the name, and the data in that category is the same for both files, sort by the name instead
fix sorting by size

1)If the files have identical size, type or modification time, sort them by name for consistency - this fixes "random" sorting
2)Explicitly handle sorting by size (previously done by size_t->string, resulting in wrong sorting)
3)When sorting by size, put folders on top of the list and sort them by the number of child items
4)Introduce three-level fallback for file name comparison, as done in Dolphin. Thanks goes to Peter Penz

BUG:265774
FIXED-IN:4.8.1
CCMAIL:peter.penz19@gmail.com
REVIEW:103895
2012-02-09 22:45:22 +04:00
Ignat Semenov 5c82f31cba account for the possible margin size change on plasma theme change in IconView and ListView
move m_itemFrame to AbstractItemView; code duplication--

BUG:290694
FIXED-IN:4.8
2012-02-09 22:06:46 +04:00
Ignat Semenov 69bc39db13 give folders sorting precedence regardless of the sorting order used
When comparing folders wth other file items in ProxyModel::lessThan(), take into account the current sorting order to allow folders to get to the start of the list. Note that the folders are still sorted according to the current sorting order.

CCBUG:180646
REVIEW:103884
2012-02-08 01:39:58 +04:00
Ignat Semenov 4a31a10022 disable on-hover item animation if the KDE graphic effects level is lower than SimpleAnimation
reviewed by fredrikh
2012-02-07 18:39:55 +04:00