Commit graph

741 commits

Author SHA1 Message Date
Eike Hein 378c4476ab Cleanup.
Abusing the saved positions system to cope with theme changes
is no longer necessary now that updateGridSize() no longer
throws out position data.
2013-05-23 10:04:05 +02:00
Eike Hein f86bf88770 Preserve relative positions when changing icon size in containment case.
Icon positions are preserved by scaling the top-left coordinate pair
by the difference between the old and new grid sizes, or by recreating
the same logical column/row coordinate pair in the newly-calculated
grid if the align-to-grid option is enabled.

Icons that run out of bounds (or exceed the maximum column or row)
accumulate at the relevant screen edges. There is a precedent for
this behavior in the general align-to-grid code.

The left-to-right or right-to-left flow is taken into account when
scaling.

Smarter behaviors can be imagined as an optimization (e.g. identi-
fying groups of icons along screen edges and preserving their edge
alignment regardless of overall layout flow), but this simple scaling
implementation certainly beats throwing positions away altogether.

However, positions do still get thrown away in the non-containment
case - as the regular widget is capable of handling overflow via a
scrollbar, relayouting to exploit that felt better in practice.

CCBUG:182712
2013-05-22 03:35:00 +02:00
Eike Hein ff68ed3e6a Preserve icon positions across theme changes. 2013-05-20 03:07:47 +02:00
Eike Hein e14314d5c0 Fix non-square icon scaling when items are selected. 2013-05-16 19:56:42 +02:00
Script Kiddy 8a299ad08c SVN_SILENT made messages (.desktop file) 2013-04-19 13:27:40 +02:00
Ignat Semenov 574cd6de32 avoid a potential stall: QComboBox::maxCount() -> QComboBox::count() 2013-04-16 22:51:01 +04:00
Eike Hein ac18ec1712 Fix inadvertent losses of custom icon positions due to config handling.
The configChanged() implementation could unnecessarily schedule a
reload due to a bug in a has-this-config-element-changed comparison,
which would result in icon position losses in scenarios such as
changing the wallpaper or the workspace theme, without having touched
any sorting-related options. Further, OK'ing the config dialog could
undo the unsorted state entered by moving an icon while the dialog
was open; this is now handled by updating the sorting mode combo box
in the dialog after the icon is dropped.

The later relies on a preceding fix in kde-workspace.git to make
Applet::isUserConfiguring() work for containments if Folder View is
used as desktop containment.
2013-04-15 16:20:03 +02:00
Eike Hein f979fab6c8 Tint icon by selection color if selected, consistent with Dolphin. 2013-04-15 10:42:34 +02:00
Eike Hein 15428f1910 Default to main view sorting defaults if the main view is unsorted. 2013-04-15 10:42:25 +02:00
Ignat Semenov ed34d83fd5 no need to check pointer before deleting it 2013-04-11 16:38:56 +04:00
Ignat Semenov c7884e2122 unbreak build with a Q_DECLARE_METATYPE 2013-03-25 22:30:47 +04:00
Ignat Semenov 391fd1b7a5 int -> QVariant for IconView::Flow 2013-03-25 22:21:33 +04:00
Ignat Semenov 5fb0a7236b streamline the filter combobox code
- int m_filterType -> ProxyModel::FilterType m_filterType
- ProxyModel::filterModeFromInt(int) -> static_cast<ProxyModel::FilterType>(int)
- int -> QVariant<ProxyModel::FilterType> in the config UI
- selectUnselectAll() -> two separate methods; eliminate sender() call

This also fixes filterChanged() and configAccepted() wrt this config key.
Use the actual filter mode value instead of the combobox index which is
error-prone in case the order of the items in the combobox changes.

BUG:317323
FIXED_IN:4.10.2
2013-03-25 15:48:33 +04:00
Script Kiddy 7a4946e49a SVN_SILENT made messages (.desktop file) 2013-03-15 14:57:44 +01:00
Script Kiddy de34d5edc9 SVN_SILENT made messages (.desktop file) 2013-03-14 17:08:18 +01:00
Patrick von Reth e3cbdc2312 fixed build on non x11 systems
(cherry picked from commit 8e6d6a0f2d)
2013-02-19 16:10:06 +01:00
Aaron Seigo 331a177499 compare against new value, not against itself
typo found by Ömer Fadıl USTA
2013-02-17 12:27:24 +01:00
Ignat Semenov 35fa98757b fix warning 2013-02-05 21:45:52 +04:00
Ignat Semenov 125cfae8d5 fix a typo:reload the url if it's not local 2013-02-05 16:23:26 +04:00
Script Kiddy d8ab9f5c43 SVN_SILENT made messages (.desktop file) 2013-01-10 12:19:18 +01:00
Script Kiddy a8c475eefa SVN_SILENT made messages (.desktop file) 2012-12-24 08:54:15 +01:00
Ignat Semenov 0df2b730ea fix crash: delete the Dialog and its child ListView in the applet dtor
The ListView object ownership is transferred to Dialog upon creation, so
not deleting the Dialog object in the applet dtor results in a leaked
ListView. However, when the leaked ListView receives a repaint signal on
plasma theme change, the model pointer in that view is already invalid,
which leads to the crash in m_model->rowCount().

BUG:299077
FIXED-IN:4.9.5
2012-12-23 23:22:25 +04:00
Script Kiddy 1a3fc37886 SVN_SILENT made messages (.desktop file) 2012-12-23 07:50:02 +01:00
Script Kiddy a0330ee72b SVN_SILENT made messages (.desktop file) 2012-12-22 08:05:56 +01:00
Ignat Semenov 09c8e911d6 Revert "delete m_listView in constraintsEvent()"
This reverts commit f9ec7cf53d.

BUG:311754
2012-12-16 21:35:55 +04:00
Script Kiddy 6f2a295092 SVN_SILENT made messages (.desktop file) 2012-12-10 07:32:47 +01:00
Aaron Seigo 37747c3a2f simplify 2012-11-20 12:14:52 +01:00
Marco Martin b66a3e6ea3 use kwin for shadows 2012-11-16 16:08:15 +01:00
Christoph Feck 299c8332dd Merge remote-tracking branch 'origin/KDE/4.9' 2012-10-26 01:58:50 +02:00
Jekyll Wu f6cd6d1d81 Remove unused local variables (-Wunused-variable) 2012-10-24 10:27:52 +08:00
Ignat Semenov f9ec7cf53d delete m_listView in constraintsEvent()
CCBUG: 299077
2012-10-22 18:37:42 +04:00
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