Ticket #1192: sugar-1192.patch

File sugar-1192.patch, 1.5 KB (added by alsroot, 12 years ago)
  • filepicker.py

    From 8e4e3562c80f6dd3616469e4ac886a957e3be1ea Mon Sep 17 00:00:00 2001
    From: Aleksey Lim <alsroot@member.fsf.org>
    Date: Wed, 9 Sep 2009 20:33:52 +0000
    Subject: Object chooser remains shown after activity has been closed #1192
    
    ---
     filepicker.py |    8 ++++----
     1 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/filepicker.py b/filepicker.py
    index 240e7e8..9a39770 100644
    a b class FilePicker: 
    5050        self._title = None
    5151        self._parent = None
    5252        self._file = None
    53    
     53
    5454    def appendFilter(self, title, filter):
    5555        logging.warning('FilePicker.appendFilter: UNIMPLEMENTED')
    5656
    class FilePicker: 
    6060    def init(self, parent, title, mode):
    6161        self._title = title
    6262        self._file = None
    63         self._parent = hulahop.get_view_for_window(parent)
    64        
     63        self._parent = hulahop.get_view_for_window(parent).get_toplevel()
     64
    6565        if mode != interfaces.nsIFilePicker.modeOpen:
    6666            raise xpcom.COMException(NS_ERROR_NOT_IMPLEMENTED)
    6767
    class FilePicker: 
    7070        try:
    7171            result = chooser.run()
    7272            if result == gtk.RESPONSE_ACCEPT:
    73                 logging.debug('FilePicker.show: %r' % 
     73                logging.debug('FilePicker.show: %r' %
    7474                              chooser.get_selected_object())
    7575                jobject = chooser.get_selected_object()
    7676                if jobject and jobject.file_path: