I didn't take time to try on other system, but think I found a potential 
workaround for these not Leo's default x icons.

I didn't really understand why QInputDialog and QfileDialogs have different 
behaviours regarding to setWindowIcon... 
I've read that since it has no parent, a Qwidget should be considered as a 
window... 
Maybe one have to deal with setAttribute or setWindowsFlags... but I didn't 
work on this way.

Actually, a simple workaround is to define a "parent" attribute for every 
Dialog in order to get rid of new windows tab/icons.
In fact, that the case for some functions in plugins/qt_gui.py :

Those have "c.frame.top" defined as parent so do not generate a new windows 
tab in your desktop

> runAboutLeoDialog
> runAskDateTimeDialog
> runAskOkDialog
> runAskYesNoCancelDialog
> runAskYesNoDialog
>

But those one specified parent=None, so a new tab is generated with an 
default x icon

> alert 
> runAskLeoIDDialog
> runOpenDirectoryDialog
> runOpenFileDialog
> runSaveFileDialog
>

As I said before, runOpenDirectoryDialog, runOpenFileDialog, 
runSaveFileDialog rely on QFileDialog on which setWindowIcon is actually 
not working.
I try to apply setWindowIcon on runAskLeoIDDialog which is a QMessageBox 
and it worked;

Finally those ones fallback on parent=None as well and i've modified them 
in rev e4b24d9526b60c3f04cedef9df673f263d70a7fd 
<https://github.com/leo-editor/leo-editor/commit/e4b24d9526b60c3f04cedef9df673f263d70a7fd>
 
to display Leo's icon.

> runAskOkCancelNumberDialog
> runAskOkCancelStringDialog
>


So my question is : what about setting parent=c.frame.top for all of them  ?
By the way, some of these functions request c but don't use it.


PS : what is c.in_qt_dialog for ?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to