diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 12:50:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 16:45:24 +0100 |
commit | 70724fc7e0c41a555e6a56ca42f36280e5f81c4c (patch) | |
tree | cc380852e261ee6277936c4400d816234671bf0a /desktop | |
parent | c86f7df94df7f1c555a6d71c919e9bf34a500d87 (diff) |
QueryBox QBX_USERDATALOCKED -> MessageDialog + string
Change-Id: If9256bc2ea23a31a902590ca5379abbaec80f080
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/desktop.hrc | 3 | ||||
-rw-r--r-- | desktop/source/app/desktop.src | 6 | ||||
-rw-r--r-- | desktop/source/app/lockfile2.cxx | 9 |
3 files changed, 8 insertions, 10 deletions
diff --git a/desktop/source/app/desktop.hrc b/desktop/source/app/desktop.hrc index 08ac1a074c74..e3059443b88a 100644 --- a/desktop/source/app/desktop.hrc +++ b/desktop/source/app/desktop.hrc @@ -26,10 +26,9 @@ // RID_FIRSTSTSTART_START 3000 #define RID_DESKTOP_STRING_START 10000 -#define QBX_USERDATALOCKED (RID_DESKTOP_DIALOG_START+100) - #define STR_RECOVER_QUERY (RID_DESKTOP_STRING_START+0) #define STR_RECOVER_TITLE (RID_DESKTOP_STRING_START+1) +#define STR_QUERY_USERDATALOCKED (RID_DESKTOP_STRING_START+2) #define STR_BOOTSTRAP_ERR_CANNOT_START (RID_DESKTOP_STRING_START+100) #define STR_BOOTSTRAP_ERR_DIR_MISSING (RID_DESKTOP_STRING_START+101) diff --git a/desktop/source/app/desktop.src b/desktop/source/app/desktop.src index 988af1b0dfb4..e2e0416ccadd 100644 --- a/desktop/source/app/desktop.src +++ b/desktop/source/app/desktop.src @@ -134,11 +134,9 @@ String STR_LO_MUST_BE_RESTARTED Text [ en-US ] = "%PRODUCTNAME must unfortunately be manually restarted once after installation or update." ; }; -QueryBox QBX_USERDATALOCKED +String STR_QUERY_USERDATALOCKED { - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Either another instance of %PRODUCTNAME is accessing your personal settings or your personal settings are locked.\nSimultaneous access can lead to inconsistencies in your personal settings. Before continuing, you should make sure user '$u' closes %PRODUCTNAME on host '$h'.\n\nDo you really want to continue?"; + Text [ en-US ] = "Either another instance of %PRODUCTNAME is accessing your personal settings or your personal settings are locked.\nSimultaneous access can lead to inconsistencies in your personal settings. Before continuing, you should make sure user '$u' closes %PRODUCTNAME on host '$h'.\n\nDo you really want to continue?"; }; String STR_TITLE_USERDATALOCKED diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx index 39cdce0f1e92..c590ab7cf799 100644 --- a/desktop/source/app/lockfile2.cxx +++ b/desktop/source/app/lockfile2.cxx @@ -18,7 +18,7 @@ */ -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include "desktopresid.hxx" #include "desktop.hrc" #include <tools/config.hxx> @@ -38,19 +38,20 @@ bool Lockfile_execWarning( Lockfile * that ) OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY ); // display warning and return response - QueryBox aBox( NULL, DesktopResId( QBX_USERDATALOCKED ) ); + MessageDialog aBox(NULL, DesktopResId(STR_QUERY_USERDATALOCKED), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); // set box title OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED )); aBox.SetText( aTitle ); // insert values... - OUString aMsgText = aBox.GetMessText( ); + OUString aMsgText = aBox.get_primary_text(); aMsgText = aMsgText.replaceFirst( "$u", OStringToOUString( aUser, RTL_TEXTENCODING_ASCII_US) ); aMsgText = aMsgText.replaceFirst( "$h", OStringToOUString( aHost, RTL_TEXTENCODING_ASCII_US) ); aMsgText = aMsgText.replaceFirst( "$t", OStringToOUString( aTime, RTL_TEXTENCODING_ASCII_US) ); - aBox.SetMessText(aMsgText); + aBox.set_primary_text(aMsgText); // do it return aBox.Execute( ) == RET_YES; } |