[Libreoffice-commits] .: cui/source
Noel Power
noelp at kemper.freedesktop.org
Thu Feb 2 08:28:52 PST 2012
cui/source/dialogs/about.cxx | 43 ++++++++++++++++++++++++++++++-------------
cui/source/dialogs/about.hrc | 27 +++++++++++++++------------
cui/source/dialogs/about.src | 34 ++++++++++++++++++++++++++--------
cui/source/inc/about.hxx | 5 ++++-
4 files changed, 75 insertions(+), 34 deletions(-)
New commits:
commit dde025efacba24edc700989a357c5fddbb0e4886
Author: dbarisakkurt <dbarisakkurt at gmail.com>
Date: Thu Feb 2 16:12:46 2012 +0000
I added some links and removed the ok button
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 70648a0..0b0ae4a 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -101,16 +101,18 @@ GetBuildId()
AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
SfxModalDialog ( pParent, rId ),
-
- aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ),
aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ),
+ aTdfLink ( this, ResId( ABOUT_TDFSTR_LINK, *rId.GetResMgr() ) ),
+ aFeaturesLink ( this, ResId( ABOUT_FEATURES_LINK, *rId.GetResMgr() ) ),
aVersionTextStr(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())),
m_aVendorTextStr(ResId(ABOUT_STR_VENDOR, *rId.GetResMgr())),
m_aOracleCopyrightTextStr(ResId(ABOUT_STR_COPYRIGHT_ORACLE_DERIVED, *rId.GetResMgr())),
m_aAcknowledgementTextStr(ResId(ABOUT_STR_ACKNOWLEDGEMENT, *rId.GetResMgr())),
m_aLinkStr(ResId( ABOUT_STR_LINK, *rId.GetResMgr())),
+ m_aTdfLinkStr(ResId( ABOUT_TDF_LINK, *rId.GetResMgr())),
+ m_aFeaturesLinkStr(ResId( ABOUT_FEATURESSTR_LINK, *rId.GetResMgr())),
m_sBuildStr(ResId(ABOUT_STR_BUILD, *rId.GetResMgr()))
{
// load image from module path
@@ -152,12 +154,19 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aInfoLink.SetBackground();
aInfoLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) );
+ aTdfLink.SetURL(m_aTdfLinkStr);
+ aTdfLink.SetBackground();
+ aTdfLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) );
+
+ aFeaturesLink.SetURL(m_aFeaturesLinkStr);
+ aFeaturesLink.SetBackground();
+ aFeaturesLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) );
+
Color aTextColor( rSettings.GetWindowTextColor() );
aVersionText.SetControlForeground( aTextColor );
aCopyrightText.SetControlForeground( aTextColor );
rtl::OUStringBuffer sText(m_aVendorTextStr);
- sText.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\n"));
sal_uInt32 nCopyrightId =
utl::ConfigManager::getProductName().equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM("LibreOffice"))
@@ -223,23 +232,31 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
nY += aCTSize.Height() + nCtrlMargin;
+ const int nLineSpace = 4;
// FixedHyperlink with more info link
- Size aLTSize = aInfoLink.CalcMinimumSize();
+ Size aLTSize = aTdfLink.CalcMinimumSize();
Point aLTPnt;
aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2;
aLTPnt.Y() = nY;
- aInfoLink.SetPosSizePixel( aLTPnt, aLTSize );
+ aTdfLink.SetPosSizePixel( aLTPnt, aLTSize );
+
+ nY += aLTSize.Height();
- nY += aLTSize.Height() + nCtrlMargin;
+ aLTSize = aFeaturesLink.CalcMinimumSize();
+ aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2;
+ aLTPnt.Y() = aLTPnt.Y() + aLTSize.Height() + nLineSpace;
+ aFeaturesLink.SetPosSizePixel( aLTPnt, aLTSize );
+
+ nY += aLTSize.Height() + nLineSpace;
+
+ aLTSize = aInfoLink.CalcMinimumSize();
+ aLTPnt.X() = ( aOutSiz.Width() - aLTSize.Width() ) / 2;
+ aLTPnt.Y() = aLTPnt.Y() + aLTSize.Height() + nSpace;
+ aInfoLink.SetPosSizePixel( aLTPnt, aLTSize );
- // OK-Button-Position (at the bottom and centered)
- Size aOKSiz = aOKButton.GetSizePixel();
- Point aOKPnt;
- aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2;
- aOKPnt.Y() = nY;
- aOKButton.SetPosPixel( aOKPnt );
+ nY += aLTSize.Height() + nLineSpace;
- nY += aOKSiz.Height() + nCtrlMargin;
+ nY += nCtrlMargin;
aOutSiz.Height() = nY;
diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc
index fe31423..9e480e9 100644
--- a/cui/source/dialogs/about.hrc
+++ b/cui/source/dialogs/about.hrc
@@ -27,15 +27,18 @@
#include <sfx2/sfx.hrc>
-#define ABOUT_BTN_OK 1
-#define ABOUT_FTXT_VERSION 2
-#define ABOUT_FTXT_COPYRIGHT 3
-#define ABOUT_FTXT_LINK 4
-#define ABOUT_STR_BUILD 5
-#define ABOUT_STR_VERSION 6
-#define ABOUT_STR_VENDOR 7
-#define ABOUT_STR_COPYRIGHT 8
-#define ABOUT_STR_COPYRIGHT_DERIVED 9
-#define ABOUT_STR_COPYRIGHT_ORACLE_DERIVED 10
-#define ABOUT_STR_ACKNOWLEDGEMENT 11
-#define ABOUT_STR_LINK 12
+#define ABOUT_FTXT_VERSION 1
+#define ABOUT_FTXT_COPYRIGHT 2
+#define ABOUT_FTXT_LINK 3
+#define ABOUT_TDFSTR_LINK 4
+#define ABOUT_FEATURES_LINK 5
+#define ABOUT_STR_BUILD 6
+#define ABOUT_STR_VERSION 7
+#define ABOUT_STR_VENDOR 8
+#define ABOUT_STR_COPYRIGHT 9
+#define ABOUT_STR_COPYRIGHT_DERIVED 10
+#define ABOUT_STR_COPYRIGHT_ORACLE_DERIVED 11
+#define ABOUT_STR_ACKNOWLEDGEMENT 12
+#define ABOUT_STR_LINK 13
+#define ABOUT_TDF_LINK 14
+#define ABOUT_FEATURESSTR_LINK 15
diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index 37e5f4d..ddbd25e 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -33,12 +33,6 @@ ModalDialog RID_DEFAULTABOUT
Size = MAP_APPFONT ( 245 , 280 ) ;
Moveable = TRUE ;
SVLook = TRUE ;
- OKButton ABOUT_BTN_OK
- {
- DefButton = TRUE ;
- Pos = MAP_APPFONT ( 174 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
MultiLineEdit ABOUT_FTXT_VERSION
{
Border = FALSE ;
@@ -68,13 +62,29 @@ ModalDialog RID_DEFAULTABOUT
Pos = MAP_APPFONT ( 54 , 100 ) ;
Size = MAP_APPFONT ( 168 , 10 ) ;
};
+ FixedText ABOUT_TDFSTR_LINK
+ {
+ NoLabel = TRUE;
+ TabStop = TRUE;
+ Text [ en-US ] = "The Document Foundation";
+ Pos = MAP_APPFONT ( 54 , 100 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ };
+ FixedText ABOUT_FEATURES_LINK
+ {
+ NoLabel = TRUE;
+ TabStop = TRUE;
+ Text [ en-US ] = "Features";
+ Pos = MAP_APPFONT ( 54 , 100 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ };
String ABOUT_STR_VERSION
{
Text = "%PRODUCTNAME %ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX %PRODUCTEXTENSION";
};
String ABOUT_STR_VENDOR
{
- Text[ en-US ] = "This product was supplied by %OOOVENDOR.";
+ Text[ en-US ] = "%PRODUCTNAME is a free and open source office suite developed by %OOOVENDOR. ";
};
String ABOUT_STR_COPYRIGHT
{
@@ -90,7 +100,7 @@ ModalDialog RID_DEFAULTABOUT
};
String ABOUT_STR_ACKNOWLEDGEMENT
{
- Text[ en-US ] = "%OOOVENDOR acknowledges all community members, please find more info at the link below:";
+ Text[ en-US ] = "%OOOVENDOR acknowledges all community members, please find more information at the links below:";
};
String ABOUT_STR_LINK
{
@@ -100,4 +110,12 @@ ModalDialog RID_DEFAULTABOUT
{
Text[ en-US ] = "Build ID:";
};
+ String ABOUT_TDF_LINK
+ {
+ Text[ en-US ] = "http://http://www.documentfoundation.org/";
+ };
+ String ABOUT_FEATURESSTR_LINK
+ {
+ Text[ en-US ] = "http://www.libreoffice.org/features/";
+ };
};
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index e7e5227..684ad66 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -45,12 +45,13 @@ typedef ::std::vector< Accelerator* > AccelList;
class AboutDialog : public SfxModalDialog
{
private:
- OKButton aOKButton;
Image aAppLogo;
MultiLineEdit aVersionText;
MultiLineEdit aCopyrightText;
svt::FixedHyperlink aInfoLink;
+ svt::FixedHyperlink aTdfLink;
+ svt::FixedHyperlink aFeaturesLink;
String aVersionData;
String aVersionTextStr;
@@ -58,6 +59,8 @@ private:
String m_aOracleCopyrightTextStr;
String m_aAcknowledgementTextStr;
String m_aLinkStr;
+ String m_aTdfLinkStr;
+ String m_aFeaturesLinkStr;
String m_sBuildStr;
protected:
More information about the Libreoffice-commits
mailing list