51 |
51 |
52 self.__layout = QGridLayout(self) |
52 self.__layout = QGridLayout(self) |
53 self.__layout.setContentsMargins(0, 0, 0, 0) |
53 self.__layout.setContentsMargins(0, 0, 0, 0) |
54 self.__layout.setSpacing(1) |
54 self.__layout.setSpacing(1) |
55 |
55 |
|
56 self.__showNavigator = Preferences.getEditor("ShowSourceNavigator") |
56 self.__showOutline = Preferences.getEditor("ShowSourceOutline") |
57 self.__showOutline = Preferences.getEditor("ShowSourceOutline") |
57 |
58 |
58 self.__editor = Editor(dbs, fn, vm, filetype, editor, tv) |
59 self.__editor = Editor(dbs, fn, vm, filetype, editor, tv) |
59 self.__buttonsWidget = EditorButtonsWidget(self.__editor, self) |
60 self.__buttonsWidget = EditorButtonsWidget(self.__editor, self) |
60 self.__globalsCombo = QComboBox() |
61 self.__globalsCombo = QComboBox() |
88 self.__selectedGlobal = "" |
89 self.__selectedGlobal = "" |
89 self.__selectedMember = "" |
90 self.__selectedMember = "" |
90 self.__globalsBoundaries = {} |
91 self.__globalsBoundaries = {} |
91 self.__membersBoundaries = {} |
92 self.__membersBoundaries = {} |
92 |
93 |
93 self.__activateOutline(self.__showOutline) |
94 self.__activateOutline(self.__showNavigator and self.__showOutline) |
94 self.__activateCombos(not self.__showOutline) |
95 self.__activateCombos(self.__showNavigator and not self.__showOutline) |
95 |
96 |
96 ericApp().getObject("UserInterface").preferencesChanged.connect( |
97 ericApp().getObject("UserInterface").preferencesChanged.connect( |
97 self.__preferencesChanged |
98 self.__preferencesChanged |
98 ) |
99 ) |
99 |
100 |
118 |
119 |
119 def __preferencesChanged(self): |
120 def __preferencesChanged(self): |
120 """ |
121 """ |
121 Private slot handling a change of preferences. |
122 Private slot handling a change of preferences. |
122 """ |
123 """ |
|
124 showNavigator = Preferences.getEditor("ShowSourceNavigator") |
123 showOutline = Preferences.getEditor("ShowSourceOutline") |
125 showOutline = Preferences.getEditor("ShowSourceOutline") |
124 if showOutline != self.__showOutline: |
126 if showOutline != self.__showOutline or showNavigator != self.__showNavigator: |
125 self.__showOutline = showOutline |
127 self.__showOutline = showOutline |
126 self.__activateOutline(self.__showOutline) |
128 self.__showNavigator = showNavigator |
127 self.__activateCombos(not self.__showOutline) |
129 self.__activateOutline(self.__showNavigator and self.__showOutline) |
|
130 self.__activateCombos(self.__showNavigator and not self.__showOutline) |
128 |
131 |
129 ####################################################################### |
132 ####################################################################### |
130 ## Methods dealing with the navigation combos below |
133 ## Methods dealing with the navigation combos below |
131 ####################################################################### |
134 ####################################################################### |
132 |
135 |