All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ui/gtk: Set QEMU window icon
Date: Wed, 10 Apr 2013 13:48:20 +0200	[thread overview]
Message-ID: <51655184.9050607@siemens.com> (raw)
In-Reply-To: <1364653300-26813-1-git-send-email-sw@weilnetz.de>

On 2013-03-30 15:21, Stefan Weil wrote:
> The QEMU icon which is already used for SDL
> is now also loaded by GTK.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  ui/gtk.c |   13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/ui/gtk.c b/ui/gtk.c
> index a5a8156..c15023b 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);
> 

With gtk 2.22 I'm lacking transparency of that icon (it has a white
background). The icon is fine with SDL. Is that an issue of this
particular gtk version or actually a general problem with
gdk_pixbuf_new_from_file?

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

  parent reply	other threads:[~2013-04-10 11:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-30 14:21 [Qemu-devel] [PATCH] ui/gtk: Set QEMU window icon Stefan Weil
2013-04-02 20:21 ` Anthony Liguori
2013-04-10 11:48 ` Jan Kiszka [this message]
2013-04-11 19:46   ` Stefan Weil
2013-04-12  6:55     ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51655184.9050607@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.