From: Michael Scherer Date: Thu, 13 Oct 2011 23:05:04 +0000 (+0200) Subject: Add the Opensuse logo ( thanks to Vincent Untz ) X-Git-Tag: 1.13.21~5 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=15d79b5ea95ba28ebf6d8bb7542d86702edc1e8f;p=libguestfs.git Add the Opensuse logo ( thanks to Vincent Untz ) Like Ubuntu one, it may not be always present. --- diff --git a/src/inspect_icon.c b/src/inspect_icon.c index d04e2d4..7d08a00 100644 --- a/src/inspect_icon.c +++ b/src/inspect_icon.c @@ -55,6 +55,7 @@ static char *icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); static char *icon_debian (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); static char *icon_ubuntu (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); static char *icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); +static char *icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); static char *icon_windows (guestfs_h *g, struct inspect_fs *fs, size_t *size_r); /* Dummy static object. */ @@ -136,6 +137,10 @@ guestfs__inspect_get_icon (guestfs_h *g, const char *root, size_t *size_r, r = icon_mageia (g, fs, &size); break; + case OS_DISTRO_OPENSUSE: + r = icon_opensuse(g, fs, &size); + break; + /* These are just to keep gcc warnings happy. */ case OS_DISTRO_ARCHLINUX: case OS_DISTRO_GENTOO: @@ -309,6 +314,15 @@ icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) { return get_png (g, fs, MAGEIA_ICON, size_r, 2048); } + +#define OPENSUSE_ICON "/usr/share/icons/hicolor/24x24/apps/distributor.png" + +static char * +icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r) +{ + return get_png (g, fs, OPENSUSE_ICON, size_r, 2048); +} + /* Windows, as usual, has to be much more complicated and stupid than * anything else. *