[geany/geany] 4c7ca6: Prefer to use Geany icon from theme over inline one

Matthew Brush git-noreply at geany.org
Sat Oct 13 22:37:00 UTC 2012


Branch:      refs/heads/master
Author:      Matthew Brush <matt at geany.org>
Committer:   Matthew Brush <matt at geany.org>
Date:        Sat, 13 Oct 2012 22:37:00
Commit:      4c7ca69be0642aeec9e7d3831d799215d1737b95
             https://github.com/geany/geany/commit/4c7ca69be0642aeec9e7d3831d799215d1737b95

Log Message:
-----------
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).


Modified Paths:
--------------
    src/main.c

Modified: src/main.c
8 files changed, 7 insertions(+), 1 deletions(-)
===================================================================
@@ -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 */
 	}



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).


More information about the Commits mailing list