GNOME Bugzilla – Bug 707794
gedit does not set window icon under X11.
Last modified: 2013-11-02 14:44:22 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.
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.
I confirm, there is no icon with Xfce.
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 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...
Commit pushed.