aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-06-20 14:10:47 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-06-20 14:10:47 -0400
commit0f91b311be2d598d38a66982f619432dfe61bc70 (patch)
tree8f4ccce08f5b20c6145c5043f66f946db0e4550e /src
parentfa0593d2339b03b3764f0961d1c0094c9c38278a (diff)
downloadtextadept-0f91b311be2d598d38a66982f619432dfe61bc70.tar.gz
textadept-0f91b311be2d598d38a66982f619432dfe61bc70.zip
Added icons to Textadept.
Diffstat (limited to 'src')
-rw-r--r--src/textadept.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/textadept.c b/src/textadept.c
index e3024456..54546a1d 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -86,6 +86,22 @@ int main(int argc, char **argv) {
* - Two status bars: one for notifications, the other for document status.
*/
void create_ui() {
+ GList *icons = NULL;
+ const char *icon_files[] = {
+ "ta_16x16.png", "ta_32x32.png", "ta_48x48.png",
+ "ta_64x64.png", "ta_128x128.png"
+ };
+ for (int i = 0; i < 5; i++) {
+ char *icon_file = g_strconcat(textadept_home, "/core/images/",
+ icon_files[i], NULL);
+ GdkPixbuf *pb = gdk_pixbuf_new_from_file(icon_file, NULL);
+ if (pb) icons = g_list_prepend(icons, pb);
+ g_free(icon_file);
+ }
+ gtk_window_set_default_icon_list(icons);
+ g_list_foreach(icons, (GFunc) g_object_unref, NULL);
+ g_list_free(icons);
+
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size(GTK_WINDOW(window), 500, 400);
signal(window, "delete_event", w_exit);