aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Kazimiers <tom@voodoo-arts.net>2013-12-11 23:56:54 -0500
committerIngo Bauersachs <ingo@jitsi.org>2016-05-17 22:25:17 +0200
commit683f6c1ed1218fcf3c47328ce5d9ee21bbf6c85c (patch)
tree9bb95b9b64d43942309744f3f4ee4d9358cb1306
parent14a19e430d6c37bca2926ae3d1325a86e3d9d6f4 (diff)
downloadjitsi-683f6c1ed1218fcf3c47328ce5d9ee21bbf6c85c.zip
jitsi-683f6c1ed1218fcf3c47328ce5d9ee21bbf6c85c.tar.gz
jitsi-683f6c1ed1218fcf3c47328ce5d9ee21bbf6c85c.tar.bz2
Add contact dialog: have prompts in name and contact fields
Having prompts in those two fields gives the user a hint of what (s)he is expected to put into them. This commit will use the example name 'Jane Doe' and the example contact 'jane.doe@example.com' for both fields. The text has a faint gray color and will vanish if the user adds text into the field.
-rw-r--r--resources/languages/resources.properties2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java6
2 files changed, 8 insertions, 0 deletions
diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties
index 39c5078..9eb8a78 100644
--- a/resources/languages/resources.properties
+++ b/resources/languages/resources.properties
@@ -171,6 +171,7 @@ service.gui.CONNECTION=Connection
service.gui.CONNECTION_FAILED_MSG=Connection failed for the following account: User name: {0}, Server name: {1}. Please check your network connection or contact your network administrator for more information.
service.gui.CONNECTION_EXPIRED_MSG=You are currently disconnected from the {0} server.
service.gui.CONTACT_NAME=ID or Number
+service.gui.CONTACT_NAME_PROMPT=jane.doe@example.com
service.gui.CONTACT_NAME_INFO=Add either an instant messaging address (such as jane.doe@example.com) or a VoIP number
service.gui.CONTACT_NOT_SUPPORTING_TELEPHONY=The chosen {0} contact doesn''t support telephony.
service.gui.CONTACT_NOT_SUPPORTING_CHAT_CONF=The chosen {0} contact doesn''t support chat conferencing.
@@ -205,6 +206,7 @@ service.gui.DESKTOP_SHARING_WARNING=<b>Are you sure you want to start screen sha
service.gui.DESKTOP_SHARING_DIALOG_INDICATE=You are sharing your screen
service.gui.DIALPAD=Dial Pad
service.gui.DISPLAY_NAME=Display name
+service.gui.DISPLAY_NAME_PROMPT=Jane Doe
service.gui.DISPLAY_NAME_INFO=Add a name for this contact. If left blank the IM address or VoIP number will be used. (Optional)
service.gui.DISCONNECTED_STATUS=Disconnected
service.gui.DND_STATUS=Do not disturb
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
index 950bb66..f8e8515 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
@@ -248,9 +248,15 @@ public class AddContactDialog
this.contactAddressField = new JTextField();
this.contactAddressField.setToolTipText(contact_info);
+ addPrompt(this.contactAddressField,
+ GuiActivator.getResources().getI18NString(
+ "service.gui.CONTACT_NAME_PROMPT"));
this.displayNameField = new JTextField();
this.displayNameField.setToolTipText(display_name_info);
+ addPrompt(this.displayNameField,
+ GuiActivator.getResources().getI18NString(
+ "service.gui.DISPLAY_NAME_PROMPT"));
this.groupLabel = new JLabel(
GuiActivator.getResources().getI18NString(