* Moved loading roster settings to the point after it has been added to the
registrar. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34077 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -141,7 +141,6 @@ TRoster::TRoster()
|
|||||||
fLastToken(0),
|
fLastToken(0),
|
||||||
fShuttingDown(false)
|
fShuttingDown(false)
|
||||||
{
|
{
|
||||||
_LoadRosterSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1189,21 +1188,18 @@ TRoster::ClearRecentApps()
|
|||||||
status_t
|
status_t
|
||||||
TRoster::Init()
|
TRoster::Init()
|
||||||
{
|
{
|
||||||
status_t error = B_OK;
|
|
||||||
|
|
||||||
// check lock initialization
|
// check lock initialization
|
||||||
if (fLock.Sem() < 0)
|
if (fLock.Sem() < 0)
|
||||||
return fLock.Sem();
|
return fLock.Sem();
|
||||||
|
|
||||||
// create the info
|
// create the info
|
||||||
RosterAppInfo* info = new(nothrow) RosterAppInfo;
|
RosterAppInfo* info = new(nothrow) RosterAppInfo;
|
||||||
if (!info)
|
if (info == NULL)
|
||||||
error = B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
// get the app's ref
|
// get the app's ref
|
||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
if (error == B_OK)
|
status_t error = get_app_ref(&ref);
|
||||||
error = get_app_ref(&ref);
|
|
||||||
|
|
||||||
// init and add the info
|
// init and add the info
|
||||||
if (error == B_OK) {
|
if (error == B_OK) {
|
||||||
@@ -1215,8 +1211,11 @@ TRoster::Init()
|
|||||||
error = AddApp(info);
|
error = AddApp(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error == B_OK)
|
||||||
|
_LoadRosterSettings();
|
||||||
|
|
||||||
// cleanup on error
|
// cleanup on error
|
||||||
if (error != B_OK && info)
|
if (error != B_OK)
|
||||||
delete info;
|
delete info;
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
|||||||
Reference in New Issue
Block a user