gnome file dialog fix
This commit is contained in:
parent
daa0053e4b
commit
8c6caab299
@ -351,7 +351,7 @@ class FileTransferItem(QtGui.QListWidget):
|
||||
directory = QtGui.QFileDialog.getExistingDirectory(self,
|
||||
QtGui.QApplication.translate("MainWindow", 'Choose folder', None, QtGui.QApplication.UnicodeUTF8),
|
||||
curr_directory(),
|
||||
QtGui.QFileDialog.ShowDirsOnly)
|
||||
QtGui.QFileDialog.ShowDirsOnly | QtGui.QFileDialog.DontUseNativeDialog)
|
||||
self.pb.setVisible(True)
|
||||
if directory:
|
||||
pr = profile.Profile.get_instance()
|
||||
@ -485,7 +485,7 @@ class InlineImageItem(QtGui.QScrollArea):
|
||||
'Choose folder', None,
|
||||
QtGui.QApplication.UnicodeUTF8),
|
||||
curr_directory(),
|
||||
QtGui.QFileDialog.ShowDirsOnly)
|
||||
QtGui.QFileDialog.ShowDirsOnly | QtGui.QFileDialog.DontUseNativeDialog)
|
||||
if directory:
|
||||
fl = QtCore.QFile(directory + '/toxygen_inline_' + curr_time().replace(':', '_') + '.png')
|
||||
self._pixmap.save(fl, 'PNG')
|
||||
|
@ -425,7 +425,7 @@ class MainWindow(QtGui.QMainWindow):
|
||||
self.menu.hide()
|
||||
if self.profile.active_friend + 1:
|
||||
choose = QtGui.QApplication.translate("MainWindow", 'Choose file', None, QtGui.QApplication.UnicodeUTF8)
|
||||
name = QtGui.QFileDialog.getOpenFileName(self, choose)
|
||||
name = QtGui.QFileDialog.getOpenFileName(self, choose, options=QtGui.QFileDialog.DontUseNativeDialog)
|
||||
if name[0]:
|
||||
self.profile.send_file(name[0])
|
||||
|
||||
|
@ -235,7 +235,8 @@ class ProfileSettings(CenteredWidget):
|
||||
|
||||
def set_avatar(self):
|
||||
choose = QtGui.QApplication.translate("ProfileSettingsForm", "Choose avatar", None, QtGui.QApplication.UnicodeUTF8)
|
||||
name = QtGui.QFileDialog.getOpenFileName(self, choose, None, 'Images (*.png)')
|
||||
name = QtGui.QFileDialog.getOpenFileName(self, choose, None, 'Images (*.png)',
|
||||
options=QtGui.QFileDialog.DontUseNativeDialog)
|
||||
if name[0]:
|
||||
bitmap = QtGui.QPixmap(name[0])
|
||||
bitmap.scaled(QtCore.QSize(128, 128), aspectMode=QtCore.Qt.KeepAspectRatio,
|
||||
@ -248,7 +249,7 @@ class ProfileSettings(CenteredWidget):
|
||||
Profile.get_instance().set_avatar(str(byte_array.data()))
|
||||
|
||||
def export_profile(self):
|
||||
directory = QtGui.QFileDialog.getExistingDirectory() + '/'
|
||||
directory = QtGui.QFileDialog.getExistingDirectory(options=QtGui.QFileDialog.DontUseNativeDialog) + '/'
|
||||
if directory != '/':
|
||||
ProfileHelper.get_instance().export_profile(directory)
|
||||
settings = Settings.get_instance()
|
||||
@ -477,7 +478,7 @@ class PrivacySettings(CenteredWidget):
|
||||
settings.save()
|
||||
|
||||
def new_path(self):
|
||||
directory = QtGui.QFileDialog.getExistingDirectory() + '/'
|
||||
directory = QtGui.QFileDialog.getExistingDirectory(options=QtGui.QFileDialog.DontUseNativeDialog) + '/'
|
||||
if directory != '/':
|
||||
self.path.setPlainText(directory)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user