summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authordbarisakkurt <dbarisakkurt@gmail.com>2012-02-02 16:12:46 +0000
committerNoel Power <noel.power@novell.com>2012-02-02 16:29:45 +0000
commitdde025efacba24edc700989a357c5fddbb0e4886 (patch)
tree16cb0950a6a1cba8b336eb36c17a5a754f534484 /cui
parente52c70e051c41a1832fdc771d3c5fcdc82c96726 (diff)
I added some links and removed the ok button
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/about.cxx43
-rw-r--r--cui/source/dialogs/about.hrc27
-rw-r--r--cui/source/dialogs/about.src34
-rw-r--r--cui/source/inc/about.hxx5
4 files changed, 75 insertions, 34 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 70648a01a662..0b0ae4ae0e0f 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 fe314232a28a..9e480e9b7111 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 37e5f4d4dc6d..ddbd25e5ac47 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 e7e5227aeefb..684ad66e5310 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: