Permalink
Browse files

add GUI_MSG_SET_TEXT and support it in CGUIEditControl and CGUIDialog…

…Keyboard
  • Loading branch information...
1 parent f128546 commit 99e0bcfd41b7098b319e94b12f01bc841a6bd829 @Montellese committed Jul 8, 2012
Showing with 15 additions and 0 deletions.
  1. +8 −0 xbmc/dialogs/GUIDialogKeyboard.cpp
  2. +5 −0 xbmc/guilib/GUIEditControl.cpp
  3. +2 −0 xbmc/guilib/GUIMessage.h
@@ -255,6 +255,14 @@ bool CGUIDialogKeyboard::OnMessage(CGUIMessage& message)
}
}
break;
+
+ case GUI_MSG_SET_TEXT:
+ SetText(message.GetLabel());
+
+ // close the dialog if requested
+ if (message.GetParam1() > 0)
+ OnOK();
+ break;
}
return true;
@@ -94,6 +94,11 @@ bool CGUIEditControl::OnMessage(CGUIMessage &message)
{
m_smsTimer.Stop();
}
+ else if (message.GetMessage() == GUI_MSG_SET_TEXT)
+ {
+ SetLabel2(message.GetLabel());
+ UpdateText();
+ }
return CGUIButtonControl::OnMessage(message);
}
@@ -130,6 +130,8 @@
*/
#define GUI_MSG_UNFOCUS_ALL 41
+#define GUI_MSG_SET_TEXT 42
+
#define GUI_MSG_USER 1000
/*!

0 comments on commit 99e0bcf

Please sign in to comment.