Hi Tim, thanks for your reply. Unfortunatelly I have no idea how to edit my code to make it working properly. I need to treat long running process (that's because I use threading) and leave my app window "unfreezed" during this process. I tried it with my code but I am not able to call deiconify function from this running process (especially it should make program window visible when something happens - e.g. exception raises, or I want to tell something to user, etc). Could you please provide me with short code of working example? I am newbie and appreciate your help.
Date: Thu, 17 Oct 2013 20:17:40 +0200
From: Peter Irbizon <[hidden email]>
To: [hidden email]
Subject: [pygtk] python deiconify and show is not working with
Content-Type: text/plain; charset="iso-8859-1"
please in function topko there are deiconify() and show() in my code but it
will not show my window. Please how can should I change it?
# -*- coding: utf-8 -*-
Date: Fri, 18 Oct 2013 10:29:09 +1300
From: Tim Evans <[hidden email]>
To: [hidden email]
Subject: Re: [pygtk] python deiconify and show is not working with
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=UTF-8; format=flowed
On 2013-10-18 07:17, Peter Irbizon wrote:
> please in function topko there are deiconify() and show() in my code but
> it will not show my window. Please how can should I change it?
From the import of _winreg I can tell you're working on Windows.
On Windows, you cannot interact with gtk widgets from a background
thread. It will just lock up your app, or not work in other ways. This
is caused by the underlying win32 "HWND" belonging to the main thread;
operating on it from another thread needs to be done differently and
carefully and GTK (rightly IMO) doesn't try to do that for you.
The best way to fix this is to do everything GTK-related in the main
thread. The easiest way to do that is via glib.idle_add().
# put code here that interacts with the UI