summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-18 14:38:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:32 +0100
commit90b4587de53164158d3ad94f981e9ce9f310842d (patch)
treec68ad6ae31b14d6fc2bd66d34da2e62ae3057e12 /vcl
parenta27550dc9a7622e105aa87bb3ffff2036cfd52b9 (diff)
hook up tooltips
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/builder/demo.ui1
-rw-r--r--vcl/source/uipreviewer/previewer.cxx4
-rw-r--r--vcl/source/window/window.cxx4
3 files changed, 9 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/builder/demo.ui b/vcl/qa/cppunit/builder/demo.ui
index 681212e97c03..f1517baf27c0 100644
--- a/vcl/qa/cppunit/builder/demo.ui
+++ b/vcl/qa/cppunit/builder/demo.ui
@@ -177,6 +177,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">A tooltip example</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx
index 5a099749cc4d..e18730bc3156 100644
--- a/vcl/source/uipreviewer/previewer.cxx
+++ b/vcl/source/uipreviewer/previewer.cxx
@@ -36,6 +36,7 @@
#include <ucbhelper/contentbroker.hxx>
#include <vcl/builder.hxx>
#include <vcl/dialog.hxx>
+#include <vcl/help.hxx>
#include <vcl/svapp.hxx>
class UIPreviewApp : public Application
@@ -76,6 +77,9 @@ int UIPreviewApp::Main()
aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY2_OFFICE));
::ucbhelper::ContentBroker::initialize(xSFactory, aArgs);
+ // turn on tooltips
+ Help::EnableQuickHelp();
+
try
{
Dialog *pDialog = new Dialog(NULL, WB_STDDIALOG);
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ade0df0d6e0b..909a2dbe885e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -9927,6 +9927,10 @@ bool Window::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
set_halign(toAlign(rValue));
else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("valign")))
set_valign(toAlign(rValue));
+ else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("tooltip-markup")))
+ SetQuickHelpText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("tooltip-text")))
+ SetQuickHelpText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else
{
fprintf(stderr, "unhandled property %s\n", rKey.getStr());