<div dir="ltr"><div>> this looks like a cool project, congrats!</div><div><br></div><div>Thanks!</div><div><br></div>> It seems like what you would need is a way to obtain the currently<br>> selected file from Dolphin via DBus (without detouring through the<br>> clipboard). I don't think that exists right now, but it should be easy<br>> enough to add.<br><br>What would need to be added is:<br>1) a boolean to indicate whether a file has been selected or not: this is necessary because the program changes its behavior depending on whether something had been selected or not.<br>2) the file path, or the parent folder path if no file/folder was selected.<br>3) Although not necessary, it would be nice if dolphin provided a list of the files sorted the same way they are sorted in the open folder.<br><br>There are probably also other things that would be good to add to allow applications like mine, and not only, to integrate with Dolphin in a clean way.<br><br>> I'd recommend you look at<br>> <a href="https://api.kde.org/frameworks/kio/html/classKIO_1_1PreviewJob.html">https://api.kde.org/frameworks/kio/html/classKIO_1_1PreviewJob.html</a>.<br>> That's what Dolphin uses to create thumbnails and it has support for a<br>> huge variety of file types. While Dolphin typically generates rather<br>> small thumbnails it should be able to give you thumbnails of any<br>> requested size.<br><br>Thanks very much for the info!<br><div><br></div><div><br></div><div>For now I will focus on porting the application to Qt6/KF6 and then I will see about making a feature request to the dolphin developers.</div><div>In any case, thanks again.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 17 gen 2024 alle ore 20:27 Nicolas Fella <<a href="mailto:nicolas.fella@gmx.de">nicolas.fella@gmx.de</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/17/24 03:12, Danilo Agostini wrote:<br>
> Hi, I developed an application and was thinking about doing the<br>
> incubation process but I'm not sure if my application will be accepted<br>
> due to some defects.<br>
><br>
> What my application does:<br>
><br>
> It allows the user, through the use of a keyboard shortcut or a<br>
> dolphin servicemenu, to have a quick preview of the files that are<br>
> shown in the folder without having to open the default application.<br>
><br>
> Similar applications are Gnome Sushi and Quick Look (Mac os).<br>
<br>
Hi,<br>
<br>
this looks like a cool project, congrats!<br>
<br>
From a KDE perspective code quality concerns are mostly secondary,<br>
because we can always fix/improve things there. The most important<br>
question is what UX do we want to provide. Any implementation has to<br>
follow that, and not the other way around.<br>
<br>
> Technical Limitations/Defects:<br>
><br>
> 1) The way it integrates with dolphin is not clean due to dolphin's<br>
> limitations: I currently use dbus to copy the path of the selected<br>
> file into the clipboard and read it from my program. This, in addition<br>
> to not being a clean way, also causes corruption of the content that<br>
> was previously copied to the clipboard. I was able to get the<br>
> previously copied text to be restored, but there is no way to restore<br>
> the contents if what was copied to the clipboard before opening my<br>
> application was a file.<br>
<br>
It seems like what you would need is a way to obtain the currently<br>
selected file from Dolphin via DBus (without detouring through the<br>
clipboard). I don't think that exists right now, but it should be easy<br>
enough to add.<br>
<br>
> 2) The preview of some files (odt,doc,docx,xlsx,etc) is obtained by<br>
> converting the documents to pdf using the "libreoffice --headless<br>
> --nolockcheck --norestore --convert-to pdf" command. This obviously<br>
> requires libreoffice installed on the system and the conversion may<br>
> fail/be slow in some cases.<br>
<br>
I'd recommend you look at<br>
<a href="https://api.kde.org/frameworks/kio/html/classKIO_1_1PreviewJob.html" rel="noreferrer" target="_blank">https://api.kde.org/frameworks/kio/html/classKIO_1_1PreviewJob.html</a>.<br>
That's what Dolphin uses to create thumbnails and it has support for a<br>
huge variety of file types. While Dolphin typically generates rather<br>
small thumbnails it should be able to give you thumbnails of any<br>
requested size.<br>
<br>
> <a href="https://github.com/Nyre221/Kiview" rel="noreferrer" target="_blank">https://github.com/Nyre221/Kiview</a><br>
> <a href="https://github.com/Nyre221/Kiview/blob/master/src/dolphinbridge.cpp" rel="noreferrer" target="_blank">https://github.com/Nyre221/Kiview/blob/master/src/dolphinbridge.cpp</a><br>
> <a href="https://github.com/Nyre221/Kiview/blob/master/src/documentviewer.cpp" rel="noreferrer" target="_blank">https://github.com/Nyre221/Kiview/blob/master/src/documentviewer.cpp</a><br>
><br>
> I'm writing this here because it's what was suggested to me.<br>
><br>
> Is there any chance that something like this could be accepted, or is<br>
> it better if I continue to develop it myself?<br>
><br>
> Thank you.<br>
</blockquote></div>