diff --git a/.gitignore b/.gitignore index 5ff8eb6c..2d5b5f42 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ obj *.depend *.layout *.o +melon_grc.c +melon_grc.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fcbe7739..5941ae22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,7 @@ if (UNIX) src/libui_sdl/libui/unix/text.c src/libui_sdl/libui/unix/util.c src/libui_sdl/libui/unix/window.c + melon_grc.c ) FIND_PACKAGE(PkgConfig REQUIRED) @@ -86,6 +87,10 @@ if (UNIX) LINK_LIBRARIES(${GTK3_LIBRARIES}) ADD_DEFINITIONS(${GTK3_CFLAGS_OTHER}) + + add_custom_command(OUTPUT melon_grc.c + COMMAND glib-compile-resources --generate-source melon_grc.xml + COMMAND glib-compile-resources --generate-header melon_grc.xml) if (CMAKE_SYSTEM_NAME STREQUAL "Linux") LINK_LIBRARIES("dl") diff --git a/icon/melon_128x128.png b/icon/melon_128x128.png new file mode 100755 index 00000000..b8cd1795 Binary files /dev/null and b/icon/melon_128x128.png differ diff --git a/icon/melon_16x16.png b/icon/melon_16x16.png new file mode 100755 index 00000000..4fdce275 Binary files /dev/null and b/icon/melon_16x16.png differ diff --git a/icon/melon_256x256.png b/icon/melon_256x256.png new file mode 100755 index 00000000..59bf63a8 Binary files /dev/null and b/icon/melon_256x256.png differ diff --git a/icon/melon_32x32.png b/icon/melon_32x32.png new file mode 100755 index 00000000..3d314875 Binary files /dev/null and b/icon/melon_32x32.png differ diff --git a/icon/melon_48x48.png b/icon/melon_48x48.png new file mode 100755 index 00000000..c6ff6794 Binary files /dev/null and b/icon/melon_48x48.png differ diff --git a/icon/melon_64x64.png b/icon/melon_64x64.png new file mode 100755 index 00000000..6182efb9 Binary files /dev/null and b/icon/melon_64x64.png differ diff --git a/melon_grc.xml b/melon_grc.xml new file mode 100644 index 00000000..f4942723 --- /dev/null +++ b/melon_grc.xml @@ -0,0 +1,11 @@ + + + + icon/melon_16x16.png + icon/melon_32x32.png + icon/melon_48x48.png + icon/melon_64x64.png + icon/melon_128x128.png + icon/melon_256x256.png + + diff --git a/src/libui_sdl/libui/unix/main.c b/src/libui_sdl/libui/unix/main.c index e6452343..409b659f 100644 --- a/src/libui_sdl/libui/unix/main.c +++ b/src/libui_sdl/libui/unix/main.c @@ -22,6 +22,15 @@ const char *uiInit(uiInitOptions *o) gtkthread = g_thread_self(); + GList* iconlist = NULL; + iconlist = g_list_append(iconlist, gdk_pixbuf_new_from_resource("/org/kuriboland/melonDS/icon/melon_16x16.png", NULL)); + iconlist = g_list_append(iconlist, gdk_pixbuf_new_from_resource("/org/kuriboland/melonDS/icon/melon_32x32.png", NULL)); + iconlist = g_list_append(iconlist, gdk_pixbuf_new_from_resource("/org/kuriboland/melonDS/icon/melon_48x48.png", NULL)); + iconlist = g_list_append(iconlist, gdk_pixbuf_new_from_resource("/org/kuriboland/melonDS/icon/melon_64x64.png", NULL)); + iconlist = g_list_append(iconlist, gdk_pixbuf_new_from_resource("/org/kuriboland/melonDS/icon/melon_128x128.png", NULL)); + + gtk_window_set_default_icon_list(iconlist); + return NULL; }