Window icon is not shown in gnome shell dash under wayland

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

Window icon is not shown in gnome shell dash under wayland

rastersoft
Hello:

I created several applications that make use of Gtk.window, and set a
window icon. But recently I discovered that, under wayland, the icon is
not shown in the dash, but under X it is shown fine. It fails both in
python3 and Vala applications.

In both cases I used Glade to generate the window, and set the icon name
there.

What can I do to have again the right icon in the dash?

Thanks

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Window icon is not shown in gnome shell dash under wayland

Emmanuele Bassi
Hi;

On 2 December 2017 at 22:34, rastersoft <[hidden email]> wrote:

> I created several applications that make use of Gtk.window, and set a window
> icon. But recently I discovered that, under wayland, the icon is not shown
> in the dash, but under X it is shown fine. It fails both in python3 and Vala
> applications.
>
> In both cases I used Glade to generate the window, and set the icon name
> there.
>
> What can I do to have again the right icon in the dash?

Window icons are set using X11 properties, which means there is no
corresponding concept under Wayland (and other windowing systems).

GNOME Shell uses the desktop file for retrieving metadata like icon,
names, and actions; you need to provide a desktop file with the same
name as your application's binary, or your GtkApplication application
id, and put it under /usr/share/applications or
$HOME/.local/share/applications. The icon specified in the desktop
file is going to be the one used by the shell.

For more information:

 - https://standards.freedesktop.org/desktop-entry-spec/latest/
 - https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Window icon is not shown in gnome shell dash under wayland

rastersoft
Hi:

Thanks. That explains the problem: the .desktop file differs from the
program because the program ends in .py :(


El 03/12/17 a las 00:44, Emmanuele Bassi escribió:

> Hi;
>
> On 2 December 2017 at 22:34, rastersoft <[hidden email]> wrote:
>
>> I created several applications that make use of Gtk.window, and set a window
>> icon. But recently I discovered that, under wayland, the icon is not shown
>> in the dash, but under X it is shown fine. It fails both in python3 and Vala
>> applications.
>>
>> In both cases I used Glade to generate the window, and set the icon name
>> there.
>>
>> What can I do to have again the right icon in the dash?
> Window icons are set using X11 properties, which means there is no
> corresponding concept under Wayland (and other windowing systems).
>
> GNOME Shell uses the desktop file for retrieving metadata like icon,
> names, and actions; you need to provide a desktop file with the same
> name as your application's binary, or your GtkApplication application
> id, and put it under /usr/share/applications or
> $HOME/.local/share/applications. The icon specified in the desktop
> file is going to be the one used by the shell.
>
> For more information:
>
>   - https://standards.freedesktop.org/desktop-entry-spec/latest/
>   - https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
>
> Ciao,
>   Emmanuele.
>

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Window icon is not shown in gnome shell dash under wayland

Florian Müllner-2
On Sun, Dec 3, 2017 at 11:39 AM, rastersoft <[hidden email]> wrote:
> Thanks. That explains the problem: the .desktop file differs from the
> program because the program ends in .py :(

GNOME Shell does not *really* use the binary name to match .desktop
files, but the WM_CLASS (X11) or application-id (wayland) property.
GTK+ sets those from the program name, either determined automatically
or from the value specified by g_set_prgname() - that is, you should
be able to fix this issue by calling that function with an appropriate
value before creating the first window.

Cheers,
Florian
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Window icon is not shown in gnome shell dash under wayland

Phil Wolff-2
In reply to this post by Emmanuele Bassi
In the wiki link, "this blog post" points to
http://cgwalters.livejournal.com/25818.html, which can't be resolved.
Have you an accessible alternative?


On 12/02/2017 03:44 PM, Emmanuele Bassi wrote:
> For more information:
>
>   -https://standards.freedesktop.org/desktop-entry-spec/latest/
>   -https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
>
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list