Setting application icon for Wayland

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting application icon for Wayland

Ryan Holmes
Our application sets a window icon on the main frame using 

self.SetIcon(wx.Icon())

On X11, it seems to use this icon as the application icon when running (taskbar, alt-tabbing, etc). However, on Wayland, it's just a default blank document icon.

Anyone know how to get this to work on Wayland?

For reference, here's the issue page I'm trying to debug, might have more useful information: https://github.com/pyfa-org/Pyfa/issues/1607

Thanks!

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Scott Talbert
On Fri, 25 May 2018, Ryan Holmes wrote:

> Our application sets a window icon on the main frame using 
> self.SetIcon(wx.Icon())
>
> On X11, it seems to use this icon as the application icon when running
> (taskbar, alt-tabbing, etc). However, on Wayland, it's just a default blank
> document icon.
>
> Anyone know how to get this to work on Wayland?
>
> For reference, here's the issue page I'm trying to debug, might have more
> useful information: https://github.com/pyfa-org/Pyfa/issues/1607
I believe that you just need to create a .desktop file that includes an
"Icon=xyz" line.  Then install the .desktop file to
/usr/share/applications and run update-desktop-database.

Scott

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Mario Lacunza-2
In reply to this post by Ryan Holmes
Hi,

After the creation of the main frame add this code:

favicon = wx.Icon("imgs/logo24.ico", wx.BITMAP_TYPE_ICO, 128,128)
wx.Frame.SetIcon(self,favicon)


Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru


El vie., 25 de may. de 2018 a la(s) 11:10, Ryan Holmes ([hidden email]) escribió:
Our application sets a window icon on the main frame using 

self.SetIcon(wx.Icon())

On X11, it seems to use this icon as the application icon when running (taskbar, alt-tabbing, etc). However, on Wayland, it's just a default blank document icon.

Anyone know how to get this to work on Wayland?

For reference, here's the issue page I'm trying to debug, might have more useful information: https://github.com/pyfa-org/Pyfa/issues/1607

Thanks!

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

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Dietmar Schwertberger-2
On 5/28/2018 3:07 AM, Mario Lacunza wrote:
> After the creation of the main frame add this code:
>
> favicon = wx.Icon("imgs/logo24.ico", wx.BITMAP_TYPE_ICO, 128,128)
> wx.Frame.SetIcon(self,favicon)

Are you sure? I just tried with a 128x128 icon, but it did not make a
difference on Wayland.

Regards,

Dietmar

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Mario Lacunza-2
Works for me in Ubuntu 16, 18.04 with Gnome and Xubuntu

Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru


El jue., 31 de may. de 2018 a la(s) 11:15, Dietmar Schwertberger ([hidden email]) escribió:
On 5/28/2018 3:07 AM, Mario Lacunza wrote:
> After the creation of the main frame add this code:
>
> favicon = wx.Icon("imgs/logo24.ico", wx.BITMAP_TYPE_ICO, 128,128)
> wx.Frame.SetIcon(self,favicon)

Are you sure? I just tried with a 128x128 icon, but it did not make a
difference on Wayland.

Regards,

Dietmar

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

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Mario Lacunza-2
and need to be ICO not JPG or PNG just in case...

Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru


El jue., 31 de may. de 2018 a la(s) 21:27, Mario Lacunza ([hidden email]) escribió:
Works for me in Ubuntu 16, 18.04 with Gnome and Xubuntu

Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru


El jue., 31 de may. de 2018 a la(s) 11:15, Dietmar Schwertberger ([hidden email]) escribió:
On 5/28/2018 3:07 AM, Mario Lacunza wrote:
> After the creation of the main frame add this code:
>
> favicon = wx.Icon("imgs/logo24.ico", wx.BITMAP_TYPE_ICO, 128,128)
> wx.Frame.SetIcon(self,favicon)

Are you sure? I just tried with a 128x128 icon, but it did not make a
difference on Wayland.

Regards,

Dietmar

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

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Dietmar Schwertberger-2
In reply to this post by Mario Lacunza-2
On 6/1/2018 4:27 AM, Mario Lacunza wrote:
> Works for me in Ubuntu 16, 18.04 with Gnome and Xubuntu

But on Ubuntu 16 you usually don't have Wayland and 18.04 is X by default.

The result of 'echo $XDG_SESSION_TYPE' should be 'wayland'.


Regards,

Dietmar

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Mario Lacunza-2
I test it using both and works for me.

Enviado desde mi celular LG

El vie., 1 de jun. de 2018 05:15, Dietmar Schwertberger <[hidden email]> escribió:
On 6/1/2018 4:27 AM, Mario Lacunza wrote:
> Works for me in Ubuntu 16, 18.04 with Gnome and Xubuntu

But on Ubuntu 16 you usually don't have Wayland and 18.04 is X by default.

The result of 'echo $XDG_SESSION_TYPE' should be 'wayland'.


Regards,

Dietmar

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

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Dietmar Schwertberger-2
On 6/1/2018 6:33 PM, Mario Lacunza wrote:
> I test it using both and works for me.

OK, but only on wxPython Classic, which uses gtk2 which runs in X
compatibility mode...


So for Phoenix there's no solution yet. But at least that shows that
it's technically possible without a .desktop file.


Regards,

Dietmar

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Mario Lacunza-2
Uhm... Im using Phoenix.

Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru


El vie., 1 de jun. de 2018 a la(s) 12:57, Dietmar Schwertberger ([hidden email]) escribió:
On 6/1/2018 6:33 PM, Mario Lacunza wrote:
> I test it using both and works for me.

OK, but only on wxPython Classic, which uses gtk2 which runs in X
compatibility mode...


So for Phoenix there's no solution yet. But at least that shows that
it's technically possible without a .desktop file.


Regards,

Dietmar

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

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Dietmar Schwertberger-2
On 6/1/2018 10:01 PM, Mario Lacunza wrote:
> Uhm... Im using Phoenix.
That's strange.

To be sure:
  - you're using the wheel from
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/ ?
  - you're not using a custom build with gtk2? (this is available as
option and also is the default if gtk3 is not found)
  - echo '$XDG_SESSION_TYPE' really returns 'wayland'?

Regards,
Dietmar

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Setting application icon for Wayland

Mario Lacunza-2
In 18.04 I install all from sources.... actually I dont have a 16 version, but the SAME code works in it.

Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
Hosting:: http://mlv-host.com/
Skype: mlacunzav

Lima - Peru


El vie., 1 de jun. de 2018 a la(s) 15:28, Dietmar Schwertberger ([hidden email]) escribió:
On 6/1/2018 10:01 PM, Mario Lacunza wrote:
> Uhm... Im using Phoenix.
That's strange.

To be sure:
  - you're using the wheel from
https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/ ?
  - you're not using a custom build with gtk2? (this is available as
option and also is the default if gtk3 is not found)
  - echo '$XDG_SESSION_TYPE' really returns 'wayland'?

Regards,
Dietmar

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

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