# :coding: utf-8
# :copyright: Copyright (c) 2014 Martin Pengelly-Phillips
# :license: See LICENSE.txt.

import sys

from PySide import QtGui

import riffle.browser


def main(arguments=None):
    '''Interactive test of custom filesystem browser.'''
    if arguments is None:
        arguments = sys.argv

    application = QtGui.QApplication(arguments)

    browser = riffle.browser.FilesystemBrowser()
    browser.setMinimumSize(600, 300)
    if browser.exec_():
        selected = browser.selected()
        print('Selected: {0}'.format(selected))

    sys.exit(application.exec_())


if __name__ == '__main__':
    raise SystemExit(main())


@@ -401,44 +401,147 @@
 r()%0A
-    browser.setMinimumSize(600, 300)
+%0A    screen_size = application.desktop().availableGeometry()%0A    browser.setMinimumSize(screen_size.width() / 2, screen_size.height() / 2)%0A
 %0A   
@@ -652,43 +652,8 @@
 ))%0A%0A
-    sys.exit(application.exec_())%0A%0A
 %0Aif 

Fix misleading hang on close of dialog in interactive test.