On Mon, Sep 28, 2009 at 03:17, Steve Borho <st...@borho.org> wrote:
> On Sun, Sep 27, 2009 at 12:35 PM, Yuki KODAMA <endflow....@gmail.com> wrote:
>> Hi folks,
>>
>> I have a small (but a bit annoying) problem related window focus.
>> In Changelog viewer, I open Update dialog from context menu
>> of changeset TreeView.  After finished the update, I sometimes want
>> to close Changelog viewer with CTRL-W keyboard shortcut, but, for this,
>> I always have to click Changelog viewer before hitting CTRL-W so that
>> Changelog viewer could be grab the focus.
>>
>> IMO, this problem are caused by "dialog.set_transient_for(None)"
>> statement. For example:
>>
>>    def checkout(self, menuitem):
>>        rev = self.currevid
>>        parents = [x.node() for x in self.repo.parents()]
>>        dialog = update.UpdateDialog(rev)
>>        dialog.set_transient_for(self)
>>        dialog.show_all()
>>        dialog.set_notify_func(self.checkout_completed, parents)
>>        dialog.present()
>>        dialog.set_transient_for(None)  # <- YOU ARE!
>>
>> By dropping this statement, I could close Changelog viewer directly,
>> but I noticed that the statement is just workaround and based on
>> historical reason; see <f668034aeda3>.
>>
>> commit log of <f668034aeda3>:
>>
>>    hggtk/history: workaround strange bug on transient dialogs
>>
>>    where we must remove transient explicitly to prevent history dialog
>>    from getting pushed behind other app windows
>>
>> I couldn't reproduced this issue in my environment (WinXP),
>> I don't know whether the issue is still alive now.
>
> My guess is that it worked around behavior bugs in PyGtk 2.10, or the
> older version of GTK+ we shipped back then.

Maybe.  That code has so long history...

>> If now we drop "set_transient_for(None)", it works without problems,
>> I want to cleanup these statements.
>
> For trivial things like this, my feeling is that we should lean
> towards supporting the current GTK+ version we ship in our binary
> packages.  ie, trade off slight wierdness in older versions for less
> slight wierdness in our binary packages.

I see. I'll try to write the code that branches on PyGTK 2.12, like this:

    if gtk.pygtk_version < (2, 12, 0):
        # workaround codes

> --
> Steve Borho
>



-- 
Yuki KODAMA

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to