[Freeswitch-trunk] [freeswitch-contrib] FreeSWITCH user-contributed scripts, etc branch master updated. java-esl-client-0.9.2-390-g274a7dd
git at svn.freeswitch.org
git at svn.freeswitch.org
Wed Feb 2 21:02:58 MSK 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FreeSWITCH user-contributed scripts, etc".
The branch, master has been updated
via 274a7dd627ab98012ebf26c68c0ed5f440fa9033 (commit)
from 2bd0da508187e942e4c906275e286cefedb3a62e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 274a7dd627ab98012ebf26c68c0ed5f440fa9033
Author: Mitch Capper <mitch.capper at gmail.com>
Date: Wed Feb 2 10:02:48 2011 -0800
Reset contact search bar string on escape or dial
diff --git a/mitchcapper/FSClient/Broker.cs b/mitchcapper/FSClient/Broker.cs
index 0372d51..0195525 100644
--- a/mitchcapper/FSClient/Broker.cs
+++ b/mitchcapper/FSClient/Broker.cs
@@ -229,7 +229,7 @@ namespace FSClient {
public void DialString(String str){
if (string.IsNullOrWhiteSpace(str))
return;
- MainWindowRemoveFocus();
+ MainWindowRemoveFocus(true);
if (str.StartsWith("#") && str.Length > 2) {
String acct_num = str.Substring(1, 1);
@@ -572,8 +572,8 @@ namespace FSClient {
public OurAutoCompleteBox GetContactSearchBox() {
return MainWindow.get_instance().GetContactSearchBox();
}
- public void MainWindowRemoveFocus(){
- MainWindow.get_instance().RemoveFocus();
+ public void MainWindowRemoveFocus(bool ResetContactSearchText=false){
+ MainWindow.get_instance().RemoveFocus(ResetContactSearchText);
}
private delegate void BroadcastEventDel(FSEvent evt);
BroadcastEventDel BroadcastHandler;
diff --git a/mitchcapper/FSClient/MainWindow.xaml.cs b/mitchcapper/FSClient/MainWindow.xaml.cs
index 2dd780b..2201cf0 100644
--- a/mitchcapper/FSClient/MainWindow.xaml.cs
+++ b/mitchcapper/FSClient/MainWindow.xaml.cs
@@ -268,8 +268,10 @@ namespace FSClient {
}
- public void RemoveFocus(){
+ public void RemoveFocus(bool ResetContactSearchText=false){
btnMute.Focus(); //should really divert focus a better way
+ if (ResetContactSearchText)
+ ResetContactSearchStr();
}
@@ -424,10 +426,11 @@ namespace FSClient {
return txtSearchBox;
}
+ private const string contact_search_text = "Contact Search";
private void txtSearchBox_GotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) {
text_interception_enabled = false;
txtSearchBox.Opacity = 1;
- if (txtSearchBox.Text == "Contact Search")
+ if (txtSearchBox.Text == contact_search_text)
txtSearchBox.Text = "";
}
@@ -436,7 +439,10 @@ namespace FSClient {
txtSearchBox.Opacity = 0.8;
if (String.IsNullOrWhiteSpace(txtSearchBox.Text))
- txtSearchBox.Text = "Contact Search";
+ ResetContactSearchStr();
+ }
+ public void ResetContactSearchStr(){
+ txtSearchBox.Text = contact_search_text;
}
private bool ContactMenuOpen;
diff --git a/mitchcapper/FSClient/SimpleContactPluginBase.cs b/mitchcapper/FSClient/SimpleContactPluginBase.cs
index d2fbc41..4575f30 100644
--- a/mitchcapper/FSClient/SimpleContactPluginBase.cs
+++ b/mitchcapper/FSClient/SimpleContactPluginBase.cs
@@ -150,7 +150,7 @@ namespace FSClient
if (e.Key == Key.Enter)
call_current_contact();
else if (e.Key == Key.Escape)
- Broker.get_instance().MainWindowRemoveFocus();
+ Broker.get_instance().MainWindowRemoveFocus(true);
}
protected OurAutoCompleteBox search_box;
-----------------------------------------------------------------------
Summary of changes:
mitchcapper/FSClient/Broker.cs | 6 +++---
mitchcapper/FSClient/MainWindow.xaml.cs | 12 +++++++++---
mitchcapper/FSClient/SimpleContactPluginBase.cs | 2 +-
3 files changed, 13 insertions(+), 7 deletions(-)
hooks/post-receive
--
FreeSWITCH user-contributed scripts, etc
More information about the Freeswitch-trunk
mailing list