From 950daef02b19247c7dc0501db6e1ea5b95a0e045 Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Fri, 20 Oct 2006 07:48:02 +0000 Subject: [PATCH] when an item is selected enable the combo box without checking if the field is empty --- .../impl/gui/main/call/CallComboBox.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java b/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java index d0bb1c47f..07b0fe98e 100644 --- a/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java +++ b/src/net/java/sip/communicator/impl/gui/main/call/CallComboBox.java @@ -77,15 +77,12 @@ public boolean isComboFieldEmpty() /** * Handles events triggered by user selection. Enables the call button - * when user selects something the combo box. + * when user selects something in the combo box. */ public void actionPerformed(ActionEvent e) - { - if(!isComboFieldEmpty()) { - - callManager.setCallMetaContact(false); - callManager.getCallButton().setEnabled(true); - } + { + callManager.setCallMetaContact(false); + callManager.getCallButton().setEnabled(true); } public void focusGained(FocusEvent e) @@ -113,7 +110,7 @@ public FilterableComboBoxModel(List items) { this.items = new ArrayList(items); filteredItems = new ArrayList(items.size()); - updateFilteredItems(); + updateFilteredItems(); } public void addElement( Object obj ) { @@ -216,17 +213,17 @@ public CallComboEditor() { public Component getEditorComponent() { return text; } public void setItem(Object item) { - if(filtering) return; setting = true; String newText = (item == null) ? "" : item.toString(); + text.setText(newText); setting = false; } - public Object getItem() { + public Object getItem() { return text.getText(); }