BPS
BPS

Reputation: 1231

What is best signal for writing configuration file in pyGTK?

I want to save window position and size when user is closing main window of my application, but i cant get correct window position

myTopLevelWindow.connect('unrealize', self.__onUnrealize)

def __onUnrealize(self, widget):
    myTopLevelWindow.get_size() #OK
    myTopLevelWindow.get_position()    <-- always (0, 0) :P

in what signal handler get_position() will work correctly? I've tried 'destroy' and it's also not good :/

Upvotes: 0

Views: 114

Answers (1)

Ancurio
Ancurio

Reputation: 1728

Have you tried "delete-event"? I just tested it in C and gtk gives me the correct position/size in the handler.

Upvotes: 2

Related Questions