[pygtk] (FileChooserDialog) Save-Overwrite

Andrea Caminiti a.caminiti at yahoo.com
Thu May 8 06:42:36 WST 2008


thanks that worked good. but i still have some doubts about it. trying to follow
the example that is on filechooser reference i did this:

    def confirm_overwrite_callback(self, widget):
        same_name = False
        if same_name:
            if same_name:
                return gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME
            else:
                return gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN
        else:
    # fall back to the default dialog
            return gtk.FILE_CHOOSER_CONFIRMATION_CONFIRM 
        return

even if i got the job done, after making some mods, i need to ask: what does 
the uri (on the example) do or stands for?

and another question: the overwrite windows appears behind the filechooserdialog.
is there any way to set that window on top/in front of all windows??

----- Original Message ----
From: Mitko Haralanov <mitko at qlogic.com>
To: pygtk at daa.com.au
Sent: Wednesday, May 7, 2008 4:47:02 PM
Subject: Re: [pygtk] (FileChooserDialog) Save-Overwrite

On Wed, 7 May 2008 12:09:34 -0700 (PDT)
Andrea Caminiti <a.caminiti at yahoo.com> wrote:

> when i try it, an select an existing file, no overwrite dialog was displayed. when i check 
> the file the previous content was changed for the new one. any idea on what's wrong? 
> any suggestions?

Try connection the dialog's "confirm-overwrite" signal before you run
the dialog. If you look at the pygtk documentation for gtk.FileChooser,
you'll see an example of how to use the "confirm-overwrite" signal.

-- 
Mitko Haralanov
==========================================
"Who would have though hell would really exist? And that it would be
in New Jersey?" -Leela 
"Actually..." - Fry
_______________________________________________
pygtk mailing list  pygtk at daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



More information about the pygtk mailing list