Kaydet (Commit) 57954fdd authored tarafından Xisco Fauli's avatar Xisco Fauli

pyagenda: remove setEnabled method

Change-Id: I174be35302361bfa9985ad77a3c6496d858da472
üst c94a5149
...@@ -214,23 +214,17 @@ class TopicsControl(ControlScroller): ...@@ -214,23 +214,17 @@ class TopicsControl(ControlScroller):
''' '''
def enableButtons(self): def enableButtons(self):
UnoDialog.setEnabled( self.CurUnoDialog.btnInsert.Model.Enabled = \
self.CurUnoDialog.btnInsert, self.lastFocusRow < len(self.scrollfields)
self.lastFocusRow < len(self.scrollfields)) self.CurUnoDialog.btnRemove.Model.Enabled = \
UnoDialog.setEnabled( self.lastFocusRow < len(self.scrollfields) - 1
self.CurUnoDialog.btnRemove,
self.lastFocusRow < len(self.scrollfields) - 1)
if self.lastFocusControl is not None: if self.lastFocusControl is not None:
UnoDialog.setEnabled( self.CurUnoDialog.btnUp.Model.Enabled = self.lastFocusRow > 0
self.CurUnoDialog.btnUp, self.lastFocusRow > 0) self.CurUnoDialog.btnDown.Model.Enabled = \
UnoDialog.setEnabled( self.lastFocusRow < len(self.scrollfields) - 1
self.CurUnoDialog.btnDown,
self.lastFocusRow < len(self.scrollfields) - 1)
else: else:
UnoDialog.setEnabled( self.CurUnoDialog.btnUp.Model.Enabled = False
self.CurUnoDialog.btnUp, False) self.CurUnoDialog.btnDown.Model.Enabled = False
UnoDialog.setEnabled(
self.CurUnoDialog.btnDown, False)
''' '''
Removes the current row. Removes the current row.
...@@ -723,7 +717,6 @@ class TopicsControl(ControlScroller): ...@@ -723,7 +717,6 @@ class TopicsControl(ControlScroller):
traceback.print_exc() traceback.print_exc()
''' '''
@author rp143992
A class represting a single GUI row. A class represting a single GUI row.
Note that the instance methods of this class Note that the instance methods of this class
are being called and handle controls of are being called and handle controls of
...@@ -821,10 +814,10 @@ class ControlRow(object): ...@@ -821,10 +814,10 @@ class ControlRow(object):
''' '''
def setEnabled(self, enabled): def setEnabled(self, enabled):
self.dialog.setEnabled(self.label, enabled) self.label.Model.Enabled = enabled
self.dialog.setEnabled(self.textbox, enabled) self.textbox.Model.Enabled = enabled
self.dialog.setEnabled(self.combobox, enabled) self.combobox.Model.Enabled = enabled
self.dialog.setEnabled(self.timebox, enabled) self.timebox.Model.Enabled = enabled
''' '''
Impelementation of XKeyListener. Impelementation of XKeyListener.
......
...@@ -257,10 +257,6 @@ class UnoDialog(object): ...@@ -257,10 +257,6 @@ class UnoDialog(object):
setControlProperty(ListBoxName, "SelectedItems", [SelPos]) setControlProperty(ListBoxName, "SelectedItems", [SelPos])
xListBox.selectItemPos((short)(SelPos - 1), True) xListBox.selectItemPos((short)(SelPos - 1), True)
@classmethod
def setEnabled(self, control, enabled):
control.Model.Enabled = enabled
@classmethod @classmethod
def getDisplayProperty(self, xServiceInfo): def getDisplayProperty(self, xServiceInfo):
if xServiceInfo.supportsService( if xServiceInfo.supportsService(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment