aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-03-30 15:21:40 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-02 08:13:51 -0500
commitd819cdccffe08f6e12b4c2dec8f4aa381f0cd687 (patch)
tree73849dae615e3f796b63db4337bd1a9cdc5f111a /ui
parent77cfd14c9f5742136e7968aee5c305e50b8891ac (diff)
ui/gtk: Set QEMU window icon
The QEMU icon which is already used for SDL is now also loaded by GTK. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1364653300-26813-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 9692c56284..1a6bee616a 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1363,6 +1363,7 @@ static const DisplayChangeListenerOps dcl_ops = {
void gtk_display_init(DisplayState *ds)
{
GtkDisplayState *s = g_malloc0(sizeof(*s));
+ char *filename;
gtk_init(NULL, NULL);
@@ -1394,6 +1395,18 @@ void gtk_display_init(DisplayState *ds)
gtk_notebook_append_page(GTK_NOTEBOOK(s->notebook), s->drawing_area, gtk_label_new("VGA"));
+ filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, "qemu-icon.bmp");
+ if (filename) {
+ GError *error = NULL;
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(filename, &error);
+ if (pixbuf) {
+ gtk_window_set_icon(GTK_WINDOW(s->window), pixbuf);
+ } else {
+ g_error_free(error);
+ }
+ g_free(filename);
+ }
+
gd_create_menus(s);
gd_connect_signals(s);