[Gtk-sharp-list] How to show dialog modal and wait for it?

Krzysztof Kotlenga pocek at users.sf.net
Sun Dec 27 13:33:36 EST 2009


Maciej Pilichowski wrote:

> On Friday 25 December 2009 11:47:37 Rafa wrote:
> 
>> Are you sure the error is there?
> 
> Well, I don't know. In my case I have FileChooseButton to select a 
> file. From code I call its method (on an object) SetFilename. But the 
> event SelectionChanged is called twice -- first with null filename, 
> the second time with proper one.

Try replacing SelectionChanged with FileSet event.

> And in handler of this event I load data from selected file and show 
> the message dialog. Since the event is triggered twice I have two 
> message dialogs.
> 
> Even if FileChooseButton has a bug (very odd double event)

Although I'm a newbie here, indeed it looks like a bug to me, too.

BTW, the role of SelectionChanged signal in FileChooser{Widget,Dialog}
is clear, but the way it's supposed to work in FileChooserButton is
totally bizarre.

Oh, hey...
https://bugzilla.gnome.org/show_bug.cgi?id=327243

> calling modal dialog should stop processing events in main dialog

"Modal windows prevent interaction with other windows in the same
application." It doesn't mean they do that by stopping event
processing...

-- 
A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?


More information about the Gtk-sharp-list mailing list