16 from E5Gui import E5FileDialog |
16 from E5Gui import E5FileDialog |
17 |
17 |
18 from .Ui_SvnPropSetDialog import Ui_SvnPropSetDialog |
18 from .Ui_SvnPropSetDialog import Ui_SvnPropSetDialog |
19 |
19 |
20 import Utilities |
20 import Utilities |
|
21 import UI.PixmapCache |
21 |
22 |
22 |
23 |
23 class SvnPropSetDialog(QDialog, Ui_SvnPropSetDialog): |
24 class SvnPropSetDialog(QDialog, Ui_SvnPropSetDialog): |
24 """ |
25 """ |
25 Class implementing a dialog to enter the data for a new property. |
26 Class implementing a dialog to enter the data for a new property. |
31 @param parent parent widget (QWidget) |
32 @param parent parent widget (QWidget) |
32 """ |
33 """ |
33 super(SvnPropSetDialog, self).__init__(parent) |
34 super(SvnPropSetDialog, self).__init__(parent) |
34 self.setupUi(self) |
35 self.setupUi(self) |
35 |
36 |
|
37 self.fileButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
38 |
36 self.propFileCompleter = E5FileCompleter(self.propFileEdit) |
39 self.propFileCompleter = E5FileCompleter(self.propFileEdit) |
37 |
40 |
38 @pyqtSlot() |
41 @pyqtSlot() |
39 def on_fileButton_clicked(self): |
42 def on_fileButton_clicked(self): |
40 """ |
43 """ |
41 Private slot called by pressing the file selection button. |
44 Private slot called by pressing the file selection button. |
42 """ |
45 """ |
43 fn = E5FileDialog.getOpenFileName( |
46 fn = E5FileDialog.getOpenFileName( |
44 self, |
47 self, |
45 self.trUtf8("Select file for property"), |
48 self.tr("Select file for property"), |
46 self.propFileEdit.text(), |
49 self.propFileEdit.text(), |
47 "") |
50 "") |
48 |
51 |
49 if fn: |
52 if fn: |
50 self.propFileEdit.setText(Utilities.toNativeSeparators(fn)) |
53 self.propFileEdit.setText(Utilities.toNativeSeparators(fn)) |