Prefer to use Geany icon from theme over inline one
Note that no attempt is made to handle when the icon theme is changed to update Geany's window icon (ex. using the style-set signal).
This commit is contained in:
parent
220ace841c
commit
4c7ca69be0
@ -1059,7 +1059,13 @@ gint main(gint argc, gchar **argv)
|
||||
|
||||
/* set window icon */
|
||||
{
|
||||
GdkPixbuf *pb = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO);
|
||||
GdkPixbuf *pb;
|
||||
pb = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "geany", 48, 0, NULL);
|
||||
if (pb == NULL)
|
||||
{
|
||||
g_warning("Unable to find Geany icon in theme, using embedded icon");
|
||||
pb = ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO);
|
||||
}
|
||||
gtk_window_set_icon(GTK_WINDOW(main_widgets.window), pb);
|
||||
g_object_unref(pb); /* free our reference */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user