OllamaInterface/OllamaWidget.py

changeset 34
2b3ed778af64
parent 24
f4d5108e90fe
child 40
1cb80644982d
equal deleted inserted replaced
33:acc362920670 34:2b3ed778af64
150 Private method to set the enabled state of the main widget. 150 Private method to set the enabled state of the main widget.
151 151
152 @param enable enabled state 152 @param enable enabled state
153 @type bool 153 @type bool
154 """ 154 """
155 for widget in ( 155 widgets = [
156 self.reloadModelsButton,
157 self.modelComboBox, 156 self.modelComboBox,
158 self.newChatButton, 157 self.newChatButton,
159 self.mainSplitter, 158 self.mainSplitter,
160 self.__modelMenuAct, 159 self.__modelMenuAct,
161 ): 160 ]
161 if self.__plugin.getPreferences("OllamaHeartbeatInterval"):
162 widgets.append(self.reloadModelsButton)
163 else:
164 self.reloadModelsButton.setEnabled(True)
165
166 for widget in widgets:
162 widget.setEnabled(enable) 167 widget.setEnabled(enable)
163 168
164 ############################################################################ 169 ############################################################################
165 ## Methods handling signals from the 'ollama' client. 170 ## Methods handling signals from the 'ollama' client.
166 ############################################################################ 171 ############################################################################

eric ide

mercurial