[dasher: 48/217] Fixed compile error - missing pure virtual function on CDasherControl GetAllContextLength. The text
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 48/217] Fixed compile error - missing pure virtual function on CDasherControl GetAllContextLength. The text
- Date: Sat, 27 Feb 2016 12:04:22 +0000 (UTC)
commit 5675e4c65713eedc6783db74511c2bf5dc046a55
Author: ron <ron debian>
Date: Sat Oct 3 02:12:08 2015 -0400
Fixed compile error - missing pure virtual function on CDasherControl
GetAllContextLength. The text in the buffer is UTF-8 so use g_utf8_strlen(..) on the text.
Src/Gtk2/DasherControl.cpp | 6 ++++++
Src/Gtk2/DasherControl.h | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/Src/Gtk2/DasherControl.cpp b/Src/Gtk2/DasherControl.cpp
index 9bae820..1f897ca 100644
--- a/Src/Gtk2/DasherControl.cpp
+++ b/Src/Gtk2/DasherControl.cpp
@@ -152,6 +152,12 @@ std::string CDasherControl::GetAllContext() {
return text;
}
+int CDasherControl::GetAllContextLenght()
+{
+ const gchar *text = gtk_dasher_control_get_all_text(m_pDasherControl);
+ return g_utf8_strlen(text,-1);
+}
+
std::string CDasherControl::GetContext(unsigned int iStart, unsigned int iLength) {
const gchar *text = gtk_dasher_control_get_context(m_pDasherControl, iStart, iLength);
return text;
diff --git a/Src/Gtk2/DasherControl.h b/Src/Gtk2/DasherControl.h
index bf9d106..2183c0b 100644
--- a/Src/Gtk2/DasherControl.h
+++ b/Src/Gtk2/DasherControl.h
@@ -138,6 +138,7 @@ public:
virtual void ClearAllContext();
virtual std::string GetAllContext();
+ virtual int GetAllContextLenght();
std::string GetContext(unsigned int iStart, unsigned int iLength);
virtual bool SupportsClipboard();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]