diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-07-19 15:16:08 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-07-19 15:16:58 +0100 |
commit | 9b0ba41906f69b2364b11621ba2397f6a15a57e7 (patch) | |
tree | fe6c0c2084a91f6ff039073c58fd8928674faa07 | |
parent | 2dc7af1f7a3925f2435cbd5d402a4c9fd0ee7bda (diff) |
fdo#67045 - cleanup slideshow / screen string usage for 4.2.
Change-Id: If71567e2b6c6cfed8860677254d60fce60f63e14
-rw-r--r-- | sd/source/ui/dlg/present.cxx | 36 | ||||
-rw-r--r-- | sd/source/ui/inc/present.hxx | 11 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/presentationdialog.ui | 12 |
3 files changed, 47 insertions, 12 deletions
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index 6aec2896a4e8..8264101a614d 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -67,7 +67,9 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow, get( maFtMonitor, "presdisplay_label" ); get( maLBMonitor, "presdisplay_cb" ); - get( msExternalMonitor, "externalmonitor_str" ); + get( msMonitor, "monitor_str" ); + get( msMonitorExternal, "externalmonitor_str" ); + get( msExternal, "external_str" ); get( msMonitor, "monitor_str" ); get( msAllMonitors, "allmonitors_str" ); @@ -149,12 +151,27 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow, ChangePauseHdl( NULL ); } -String SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay, bool bExternal ) +String SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay, + DisplayType eType ) { - String aName( bExternal ? msExternalMonitor->GetText() : - msMonitor->GetText() ); + String aName; + + switch ( eType ) + { + case EXTERNAL_IS_NUMBER: + aName = msExternal->GetText(); + break; + case MONITOR_IS_EXTERNAL: + aName = msMonitorExternal->GetText(); + break; + default: + case MONITOR_NORMAL: + aName = msMonitor->GetText(); + break; + } const String aNumber( OUString::number( nDisplay ) ); aName.SearchAndReplace( String("%1"), aNumber ); + return aName; } @@ -196,8 +213,8 @@ void SdStartPresentationDlg::InitMonitorSettings() // Un-conditionally add a version for '0' the default external display sal_Int32 nInsertedEntry; - // FIXME: string-freeze this should really be 'External (display %)' - String aName = GetDisplayName( nExternalIndex + 1, true); + // Initial entry - the auto-detected external monitor + String aName = GetDisplayName( nExternalIndex + 1, EXTERNAL_IS_NUMBER); nInsertedEntry = InsertDisplayEntry( aName, 0 ); if( nDefaultSelectedDisplay == 0) nSelectedIndex = nInsertedEntry; @@ -205,10 +222,9 @@ void SdStartPresentationDlg::InitMonitorSettings() // The user data contains the real setting for( sal_Int32 nDisplay = 0; nDisplay < mnMonitors; nDisplay++ ) { - bool bIsExternal = nDisplay == nExternalIndex; - // FIXME: string-freeze, use true to denote external for now - bIsExternal = false; - aName = GetDisplayName( nDisplay + 1, bIsExternal ); + aName = GetDisplayName( nDisplay + 1, + nDisplay == nExternalIndex ? + MONITOR_IS_EXTERNAL : MONITOR_NORMAL ); nInsertedEntry = InsertDisplayEntry( aName, nDisplay + 1 ); // Remember the index of the default selection. diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx index ef27bfbe5da3..c49aab9a2983 100644 --- a/sd/source/ui/inc/present.hxx +++ b/sd/source/ui/inc/present.hxx @@ -65,18 +65,25 @@ private: const SfxItemSet& rOutAttrs; sal_Int32 mnMonitors; - FixedText* msExternalMonitor; FixedText* msMonitor; FixedText* msAllMonitors; + FixedText* msMonitorExternal; + FixedText* msExternal; DECL_LINK( ChangeRangeHdl, void * ); DECL_LINK( ClickWindowPresentationHdl, void * ); DECL_LINK( ChangePauseHdl, void * ); void InitMonitorSettings(); + enum DisplayType { + EXTERNAL_IS_NUMBER, + MONITOR_NORMAL, + MONITOR_IS_EXTERNAL, + }; sal_Int32 InsertDisplayEntry(const rtl::OUString &aName, sal_Int32 nDisplay); - String GetDisplayName( sal_Int32 nDisplay, bool bExternal ); + String GetDisplayName( sal_Int32 nDisplay, + DisplayType eType ); public: SdStartPresentationDlg( Window* pWindow, const SfxItemSet& rInAttrs, diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui b/sd/uiconfig/simpress/ui/presentationdialog.ui index a71bcd639446..ce1a847bb02f 100644 --- a/sd/uiconfig/simpress/ui/presentationdialog.ui +++ b/sd/uiconfig/simpress/ui/presentationdialog.ui @@ -275,6 +275,18 @@ <property name="height">1</property> </packing> </child> + <child> + <object class="GtkLabel" id="external_str"> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Auto External (Display %1)</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> </object> <packing> <property name="left_attach">0</property> |