KDesktopFile::isDesktopFile() checks only the extension (if the file ends with .desktop) while
KFileItem::isDesktopFile() checks the MIME type which is a bit more
expensive but more correct too (the desktoppaths KCM copies links such that
the files do not end with .desktop for example)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
this will make it call access() to do a permission check if S_IRUSR,
S_IRGRP and S_IROTH are not all set which is more reliable check (much like
the one done by KFileItem::isWritable())
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
can't mount directories on network:/, trash:/, etc. - just not a thing.
also org::kde::KDirNotify should not be used for local files and
directories
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
that way file and directory dialogs will be consistent, not to mention
there were things that KDirSelectDialog was lacking such as resizable
places area.
more changes are needed to account for the directory mode
(KFile::Directory), currently for directory only mode the filter is set
to "All Folders" but it can be changed (the filter widget is not
disabled). also when an attempt to open non-existing directory by name
(via the name input widget) the error says "the file cannot be found"
- it should be "the directory cannot be found" for directory mode
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
other than starting kuiserver it does nothing, the kuiserver program is
already started by other classes (such as job tracker classes) on demand
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
note to self: signal is emited for the local file too when the trash is
emptied, meaning any currently listed directories which had files moved to
the trash will be updated too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
this essentially will watch the .desktop file URL which is, say, "trash:/"
and emit changes as if the .desktop file itself was modified (to update the
icon for example). that's what the KIO desktop slave was doing essentially
but now it is implemented into KDirLister itself so anything using that
class will get it!
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
so that it is clear that the options shall affect only the result, also for
local files the correct thing can be done regardless of the trailing slash
as is done in KUrl::upUrl()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
same thing (all URL components are compared) except the trailing slash
option can be re-used for it essentially adding one more option (to add
trailing slash when comparing)
also fixed and tested KUrl::upUrl() for some cases
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
was used to pass the referrer and while it is still possible to
reimplement it realisticly speaking it is impossible to preserve the
referrer (and other HTTP(S) header metadata) because it will be lost in
transition in some cicumstances such as when drag-n-drop is done to
application unaware of application/x-kio-metadata
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>