Kaydet (Commit) 70724fc7 authored tarafından Caolán McNamara's avatar Caolán McNamara

QueryBox QBX_USERDATALOCKED -> MessageDialog + string

Change-Id: If9256bc2ea23a31a902590ca5379abbaec80f080
üst c86f7df9
......@@ -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)
......
......@@ -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
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment