B_SAFEMODE_DISABLE_USER_ADD_ONS is also a safe mode we now honor in translation kit

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25332 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2008-05-06 21:39:31 +00:00
parent 09774bc435
commit 5abf416fd0
2 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ if $(TARGET_PLATFORM) != haiku {
UsePublicHeaders translation ;
}
UsePrivateHeaders translation textencoding ;
UsePrivateHeaders kernel translation textencoding ;
SharedLibrary libtranslation.so :
BitmapStream.cpp
+15 -2
View File
@@ -17,12 +17,13 @@
#include "FuncTranslator.h"
#include "TranslatorRosterPrivate.h"
#include <image.h>
#include <safemode.h>
#include <Application.h>
#include <Autolock.h>
#include <Directory.h>
#include <FindDirectory.h>
#include <driver_settings.h>
#include <image.h>
#include <NodeMonitor.h>
#include <Path.h>
#include <String.h>
@@ -152,6 +153,18 @@ BTranslatorRoster::Private::Private()
|| !strcasecmp(parameter, "enable") || !strcmp(parameter, "1"))
fSafeMode = true;
}
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (_kern_get_safemode_option(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, &parameterLength) == B_OK)
#else
if (_kget_safemode_option_(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, &parameterLength) == B_OK)
#endif
{
if (!strcasecmp(parameter, "enabled") || !strcasecmp(parameter, "on")
|| !strcasecmp(parameter, "true") || !strcasecmp(parameter, "yes")
|| !strcasecmp(parameter, "enable") || !strcmp(parameter, "1"))
fSafeMode = true;
}
// we're sneaking us into the BApplication
if (be_app != NULL && be_app->Lock()) {