After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707794 - gedit does not set window icon under X11.
gedit does not set window icon under X11.
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-09 18:25 UTC by Alistair Buxton
Modified: 2013-11-02 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GeditApp: always set application name and icon (1.92 KB, patch)
2013-11-02 14:25 UTC, Sébastien Wilmet
accepted-commit_now Details | Review

Description Alistair Buxton 2013-09-09 18:25:17 UTC
Under Mac and Windows the icon is set:

gedit/gedit-app-win32.c:	gtk_window_set_default_icon_name ("accessories-text-editor");
gedit/gedit-app-osx.c:	gtk_window_set_default_icon_name ("accessories-text-editor");

but there is no matching call in gedit-app-x11.c or gedit-app.c.

Prior to 3.8, gedit set the icon using smclient:

gedit/smclient/eggdesktopfile.c:          gtk_window_set_default_icon_name (egg_desktop_file->icon);

In the 3.8 series, smclient support has been removed, but no alternative code to set the application icon has been added, so now gedit does not have an icon under Linux/X11.
Comment 1 Alberts Muktupāvels 2013-10-07 20:03:28 UTC
osx and win32 are manually setting name and icon:

/* manually set name and icon */
g_set_application_name ("gedit");
gtk_window_set_default_icon_name ("accessories-text-editor");

So these line should be added for linux/X11 too. I guess it could be added to gedit-app-x11.c in gedit_app_x11_init function. This is place where egg desktop file was used before.
Comment 2 Sébastien Wilmet 2013-11-01 20:34:09 UTC
I confirm, there is no icon with Xfce.
Comment 3 Sébastien Wilmet 2013-11-02 14:25:18 UTC
Created attachment 258802 [details] [review]
GeditApp: always set application name and icon

In GeditAppOsx, it was in the init() function. In GeditAppWin32, it was
in startup(). Now it is in GeditApp's init().
Comment 4 Paolo Borelli 2013-11-02 14:39:41 UTC
Comment on attachment 258802 [details] [review]
GeditApp: always set application name and icon

I think there was at some point some magic that derived the icon from the .desktop file on linux.

I guess that was lost in the gapplication transition.

Weird that gapp does not do this for us though...
Comment 5 Sébastien Wilmet 2013-11-02 14:44:22 UTC
Commit pushed.