diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-12-16 05:43:34 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-12-16 05:43:34 +0100 |
commit | 2e82a4f26ac99a1a93afdcb6bbfc4095d0933cc6 (patch) | |
tree | dc978534340a32685aa7615a49a324e48eec52a2 | |
parent | ca41ce6efd7a68b1a9b4f98e2787609518c6fb5b (diff) |
gtk: add icon
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rwxr-xr-x | icon/melon_128x128.png | bin | 0 -> 59159 bytes | |||
-rwxr-xr-x | icon/melon_16x16.png | bin | 0 -> 730 bytes | |||
-rwxr-xr-x | icon/melon_256x256.png | bin | 0 -> 149161 bytes | |||
-rwxr-xr-x | icon/melon_32x32.png | bin | 0 -> 1686 bytes | |||
-rwxr-xr-x | icon/melon_48x48.png | bin | 0 -> 3340 bytes | |||
-rwxr-xr-x | icon/melon_64x64.png | bin | 0 -> 32364 bytes | |||
-rw-r--r-- | melon_grc.xml | 11 | ||||
-rw-r--r-- | src/libui_sdl/libui/unix/main.c | 9 |
10 files changed, 27 insertions, 0 deletions
@@ -3,3 +3,5 @@ obj *.depend *.layout *.o +melon_grc.c +melon_grc.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fcbe773..5941ae2 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 Binary files differnew file mode 100755 index 0000000..b8cd179 --- /dev/null +++ b/icon/melon_128x128.png diff --git a/icon/melon_16x16.png b/icon/melon_16x16.png Binary files differnew file mode 100755 index 0000000..4fdce27 --- /dev/null +++ b/icon/melon_16x16.png diff --git a/icon/melon_256x256.png b/icon/melon_256x256.png Binary files differnew file mode 100755 index 0000000..59bf63a --- /dev/null +++ b/icon/melon_256x256.png diff --git a/icon/melon_32x32.png b/icon/melon_32x32.png Binary files differnew file mode 100755 index 0000000..3d31487 --- /dev/null +++ b/icon/melon_32x32.png diff --git a/icon/melon_48x48.png b/icon/melon_48x48.png Binary files differnew file mode 100755 index 0000000..c6ff679 --- /dev/null +++ b/icon/melon_48x48.png diff --git a/icon/melon_64x64.png b/icon/melon_64x64.png Binary files differnew file mode 100755 index 0000000..6182efb --- /dev/null +++ b/icon/melon_64x64.png diff --git a/melon_grc.xml b/melon_grc.xml new file mode 100644 index 0000000..f494272 --- /dev/null +++ b/melon_grc.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/kuriboland/melonDS"> + <file preprocess="to-pixdata">icon/melon_16x16.png</file> + <file preprocess="to-pixdata">icon/melon_32x32.png</file> + <file preprocess="to-pixdata">icon/melon_48x48.png</file> + <file preprocess="to-pixdata">icon/melon_64x64.png</file> + <file preprocess="to-pixdata">icon/melon_128x128.png</file> + <file preprocess="to-pixdata">icon/melon_256x256.png</file> + </gresource> +</gresources> diff --git a/src/libui_sdl/libui/unix/main.c b/src/libui_sdl/libui/unix/main.c index e645234..409b659 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; } |