Debugger: Coding style: normalize naming, some whitespace fixes
* TeamUISettings[Factory] -> TeamUiSettings[Factory] * GUITeamUISettings -> GuiTeamUiSettings * GUISettingsUtils -> GuiSettingsUtils
This commit is contained in:
@@ -145,11 +145,11 @@ Application Debugger :
|
||||
|
||||
# settings
|
||||
BreakpointSetting.cpp
|
||||
GUITeamUISettings.cpp
|
||||
GuiTeamUiSettings.cpp
|
||||
SettingsManager.cpp
|
||||
TeamSettings.cpp
|
||||
TeamUISettings.cpp
|
||||
TeamUISettingsFactory.cpp
|
||||
TeamUiSettings.cpp
|
||||
TeamUiSettingsFactory.cpp
|
||||
|
||||
# settings/generic
|
||||
Setting.cpp
|
||||
@@ -209,7 +209,7 @@ Application Debugger :
|
||||
|
||||
# user_interface/gui/util
|
||||
ActionMenuItem.cpp
|
||||
GUISettingsUtils.cpp
|
||||
GuiSettingsUtils.cpp
|
||||
SettingsMenu.cpp
|
||||
TargetAddressTableColumn.cpp
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "TeamMemoryBlock.h"
|
||||
#include "TeamMemoryBlockManager.h"
|
||||
#include "TeamSettings.h"
|
||||
#include "TeamUISettings.h"
|
||||
#include "TeamUiSettings.h"
|
||||
#include "Tracing.h"
|
||||
#include "ValueNode.h"
|
||||
#include "ValueNodeContainer.h"
|
||||
@@ -1408,7 +1408,7 @@ TeamDebugger::_LoadSettings()
|
||||
breakpointSetting->IsEnabled());
|
||||
}
|
||||
|
||||
const TeamUISettings* uiSettings = fTeamSettings.UISettingFor(
|
||||
const TeamUiSettings* uiSettings = fTeamSettings.UiSettingFor(
|
||||
fUserInterface->ID());
|
||||
if (uiSettings != NULL)
|
||||
fUserInterface->LoadSettings(uiSettings);
|
||||
@@ -1424,19 +1424,19 @@ TeamDebugger::_SaveSettings()
|
||||
if (settings.SetTo(fTeam) != B_OK)
|
||||
return;
|
||||
|
||||
TeamUISettings* uiSettings = NULL;
|
||||
TeamUiSettings* uiSettings = NULL;
|
||||
if (fUserInterface->SaveSettings(uiSettings) != B_OK)
|
||||
return;
|
||||
if (uiSettings != NULL)
|
||||
settings.AddUISettings(uiSettings);
|
||||
settings.AddUiSettings(uiSettings);
|
||||
|
||||
// preserve the UI settings from our cached copy.
|
||||
for (int32 i = 0; i < fTeamSettings.CountUISettings(); i++) {
|
||||
const TeamUISettings* oldUISettings = fTeamSettings.UISettingAt(i);
|
||||
if (strcmp(oldUISettings->ID(), fUserInterface->ID()) != 0) {
|
||||
TeamUISettings* clonedSettings = oldUISettings->Clone();
|
||||
for (int32 i = 0; i < fTeamSettings.CountUiSettings(); i++) {
|
||||
const TeamUiSettings* oldUiSettings = fTeamSettings.UiSettingAt(i);
|
||||
if (strcmp(oldUiSettings->ID(), fUserInterface->ID()) != 0) {
|
||||
TeamUiSettings* clonedSettings = oldUiSettings->Clone();
|
||||
if (clonedSettings != NULL)
|
||||
settings.AddUISettings(clonedSettings);
|
||||
settings.AddUiSettings(clonedSettings);
|
||||
}
|
||||
}
|
||||
locker.Unlock();
|
||||
|
||||
+19
-19
@@ -4,52 +4,52 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "GUITeamUISettings.h"
|
||||
#include "GuiTeamUiSettings.h"
|
||||
|
||||
#include <Message.h>
|
||||
|
||||
|
||||
GUITeamUISettings::GUITeamUISettings()
|
||||
GuiTeamUiSettings::GuiTeamUiSettings()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
GUITeamUISettings::GUITeamUISettings(const char* settingsID)
|
||||
GuiTeamUiSettings::GuiTeamUiSettings(const char* settingsID)
|
||||
:
|
||||
fID(settingsID)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
GUITeamUISettings::GUITeamUISettings(const GUITeamUISettings& other)
|
||||
GuiTeamUiSettings::GuiTeamUiSettings(const GuiTeamUiSettings& other)
|
||||
{
|
||||
if (_SetTo(other) != B_OK)
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
|
||||
|
||||
GUITeamUISettings::~GUITeamUISettings()
|
||||
GuiTeamUiSettings::~GuiTeamUiSettings()
|
||||
{
|
||||
_Unset();
|
||||
}
|
||||
|
||||
|
||||
team_ui_settings_type
|
||||
GUITeamUISettings::Type() const
|
||||
GuiTeamUiSettings::Type() const
|
||||
{
|
||||
return TEAM_UI_SETTINGS_TYPE_GUI;
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
GUITeamUISettings::ID() const
|
||||
GuiTeamUiSettings::ID() const
|
||||
{
|
||||
return fID.String();
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
GUITeamUISettings::SetTo(const BMessage& archive)
|
||||
GuiTeamUiSettings::SetTo(const BMessage& archive)
|
||||
{
|
||||
status_t error = archive.FindString("ID", &fID);
|
||||
if (error != B_OK)
|
||||
@@ -62,7 +62,7 @@ GUITeamUISettings::SetTo(const BMessage& archive)
|
||||
|
||||
|
||||
status_t
|
||||
GUITeamUISettings::WriteTo(BMessage& archive) const
|
||||
GuiTeamUiSettings::WriteTo(BMessage& archive) const
|
||||
{
|
||||
archive.MakeEmpty();
|
||||
status_t error = archive.AddString("ID", fID);
|
||||
@@ -79,10 +79,10 @@ GUITeamUISettings::WriteTo(BMessage& archive) const
|
||||
}
|
||||
|
||||
|
||||
TeamUISettings*
|
||||
GUITeamUISettings::Clone() const
|
||||
TeamUiSettings*
|
||||
GuiTeamUiSettings::Clone() const
|
||||
{
|
||||
GUITeamUISettings* settings = new(std::nothrow) GUITeamUISettings(fID);
|
||||
GuiTeamUiSettings* settings = new(std::nothrow) GuiTeamUiSettings(fID);
|
||||
|
||||
if (settings == NULL)
|
||||
return NULL;
|
||||
@@ -97,7 +97,7 @@ GUITeamUISettings::Clone() const
|
||||
|
||||
|
||||
bool
|
||||
GUITeamUISettings::AddSettings(const char* settingID, const BMessage& data)
|
||||
GuiTeamUiSettings::AddSettings(const char* settingID, const BMessage& data)
|
||||
{
|
||||
fValues.RemoveName(settingID);
|
||||
|
||||
@@ -106,21 +106,21 @@ GUITeamUISettings::AddSettings(const char* settingID, const BMessage& data)
|
||||
|
||||
|
||||
status_t
|
||||
GUITeamUISettings::Settings(const char* settingID, BMessage &data) const
|
||||
GuiTeamUiSettings::Settings(const char* settingID, BMessage &data) const
|
||||
{
|
||||
return fValues.FindMessage(settingID, &data);
|
||||
}
|
||||
|
||||
|
||||
const BMessage&
|
||||
GUITeamUISettings::Values() const
|
||||
GuiTeamUiSettings::Values() const
|
||||
{
|
||||
return fValues;
|
||||
}
|
||||
|
||||
|
||||
GUITeamUISettings&
|
||||
GUITeamUISettings::operator=(const GUITeamUISettings& other)
|
||||
GuiTeamUiSettings&
|
||||
GuiTeamUiSettings::operator=(const GuiTeamUiSettings& other)
|
||||
{
|
||||
if (_SetTo(other) != B_OK)
|
||||
throw std::bad_alloc();
|
||||
@@ -130,7 +130,7 @@ GUITeamUISettings::operator=(const GUITeamUISettings& other)
|
||||
|
||||
|
||||
status_t
|
||||
GUITeamUISettings::_SetTo(const GUITeamUISettings& other)
|
||||
GuiTeamUiSettings::_SetTo(const GuiTeamUiSettings& other)
|
||||
{
|
||||
_Unset();
|
||||
|
||||
@@ -143,7 +143,7 @@ GUITeamUISettings::_SetTo(const GUITeamUISettings& other)
|
||||
|
||||
|
||||
void
|
||||
GUITeamUISettings::_Unset()
|
||||
GuiTeamUiSettings::_Unset()
|
||||
{
|
||||
fID.Truncate(0);
|
||||
|
||||
+9
-9
@@ -12,23 +12,23 @@
|
||||
#include <ObjectList.h>
|
||||
|
||||
#include "Setting.h"
|
||||
#include "TeamUISettings.h"
|
||||
#include "TeamUiSettings.h"
|
||||
|
||||
|
||||
class GUITeamUISettings : public TeamUISettings {
|
||||
class GuiTeamUiSettings : public TeamUiSettings {
|
||||
public:
|
||||
GUITeamUISettings();
|
||||
GUITeamUISettings(const char* settingsID);
|
||||
GUITeamUISettings(const GUITeamUISettings&
|
||||
GuiTeamUiSettings();
|
||||
GuiTeamUiSettings(const char* settingsID);
|
||||
GuiTeamUiSettings(const GuiTeamUiSettings&
|
||||
other);
|
||||
// throws std::bad_alloc
|
||||
~GUITeamUISettings();
|
||||
~GuiTeamUiSettings();
|
||||
|
||||
virtual team_ui_settings_type Type() const;
|
||||
virtual const char* ID() const;
|
||||
virtual status_t SetTo(const BMessage& archive);
|
||||
virtual status_t WriteTo(BMessage& archive) const;
|
||||
virtual TeamUISettings* Clone() const;
|
||||
virtual TeamUiSettings* Clone() const;
|
||||
|
||||
bool AddSettings(const char* settingID,
|
||||
const BMessage& data);
|
||||
@@ -37,12 +37,12 @@ public:
|
||||
|
||||
const BMessage& Values() const;
|
||||
|
||||
GUITeamUISettings& operator=(const GUITeamUISettings& other);
|
||||
GuiTeamUiSettings& operator=(const GuiTeamUiSettings& other);
|
||||
// throws std::bad_alloc
|
||||
|
||||
private:
|
||||
|
||||
status_t _SetTo(const GUITeamUISettings& other);
|
||||
status_t _SetTo(const GuiTeamUiSettings& other);
|
||||
void _Unset();
|
||||
|
||||
BMessage fValues;
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "ArchivingUtils.h"
|
||||
#include "BreakpointSetting.h"
|
||||
#include "Team.h"
|
||||
#include "TeamUISettings.h"
|
||||
#include "TeamUISettingsFactory.h"
|
||||
#include "TeamUiSettings.h"
|
||||
#include "TeamUiSettingsFactory.h"
|
||||
#include "UserBreakpoint.h"
|
||||
|
||||
|
||||
@@ -104,9 +104,9 @@ TeamSettings::SetTo(const BMessage& archive)
|
||||
// add UI settings
|
||||
for (int32 i = 0; archive.FindMessage("uisettings", i, &childArchive)
|
||||
== B_OK; i++) {
|
||||
TeamUISettings* setting = NULL;
|
||||
error = TeamUISettingsFactory::Create(childArchive, setting);
|
||||
if (error == B_OK && !fUISettings.AddItem(setting))
|
||||
TeamUiSettings* setting = NULL;
|
||||
error = TeamUiSettingsFactory::Create(childArchive, setting);
|
||||
if (error == B_OK && !fUiSettings.AddItem(setting))
|
||||
error = B_NO_MEMORY;
|
||||
if (error != B_OK) {
|
||||
delete setting;
|
||||
@@ -137,7 +137,7 @@ TeamSettings::WriteTo(BMessage& archive) const
|
||||
return error;
|
||||
}
|
||||
|
||||
for (int32 i = 0; TeamUISettings* uiSetting = fUISettings.ItemAt(i);
|
||||
for (int32 i = 0; TeamUiSettings* uiSetting = fUiSettings.ItemAt(i);
|
||||
i++) {
|
||||
error = uiSetting->WriteTo(childArchive);
|
||||
if (error != B_OK)
|
||||
@@ -167,24 +167,24 @@ TeamSettings::BreakpointAt(int32 index) const
|
||||
|
||||
|
||||
int32
|
||||
TeamSettings::CountUISettings() const
|
||||
TeamSettings::CountUiSettings() const
|
||||
{
|
||||
return fUISettings.CountItems();
|
||||
return fUiSettings.CountItems();
|
||||
}
|
||||
|
||||
|
||||
const TeamUISettings*
|
||||
TeamSettings::UISettingAt(int32 index) const
|
||||
const TeamUiSettings*
|
||||
TeamSettings::UiSettingAt(int32 index) const
|
||||
{
|
||||
return fUISettings.ItemAt(index);
|
||||
return fUiSettings.ItemAt(index);
|
||||
}
|
||||
|
||||
|
||||
const TeamUISettings*
|
||||
TeamSettings::UISettingFor(const char* id) const
|
||||
const TeamUiSettings*
|
||||
TeamSettings::UiSettingFor(const char* id) const
|
||||
{
|
||||
for (int32 i = 0; i < fUISettings.CountItems(); i++) {
|
||||
TeamUISettings* settings = fUISettings.ItemAt(i);
|
||||
for (int32 i = 0; i < fUiSettings.CountItems(); i++) {
|
||||
TeamUiSettings* settings = fUiSettings.ItemAt(i);
|
||||
if (strcmp(settings->ID(), id) == 0)
|
||||
return settings;
|
||||
}
|
||||
@@ -194,9 +194,9 @@ TeamSettings::UISettingFor(const char* id) const
|
||||
|
||||
|
||||
status_t
|
||||
TeamSettings::AddUISettings(TeamUISettings* settings)
|
||||
TeamSettings::AddUiSettings(TeamUiSettings* settings)
|
||||
{
|
||||
if (!fUISettings.AddItem(settings))
|
||||
if (!fUiSettings.AddItem(settings))
|
||||
return B_NO_MEMORY;
|
||||
|
||||
return B_OK;
|
||||
@@ -223,11 +223,11 @@ TeamSettings::operator=(const TeamSettings& other)
|
||||
}
|
||||
}
|
||||
|
||||
for (int32 i = 0; TeamUISettings* uiSetting
|
||||
= other.fUISettings.ItemAt(i); i++) {
|
||||
TeamUISettings* clonedSetting
|
||||
for (int32 i = 0; TeamUiSettings* uiSetting
|
||||
= other.fUiSettings.ItemAt(i); i++) {
|
||||
TeamUiSettings* clonedSetting
|
||||
= uiSetting->Clone();
|
||||
if (!fUISettings.AddItem(clonedSetting)) {
|
||||
if (!fUiSettings.AddItem(clonedSetting)) {
|
||||
delete clonedSetting;
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
@@ -245,11 +245,11 @@ TeamSettings::_Unset()
|
||||
delete breakpoint;
|
||||
}
|
||||
|
||||
for (int32 i = 0; TeamUISettings* uiSetting = fUISettings.ItemAt(i); i++)
|
||||
for (int32 i = 0; TeamUiSettings* uiSetting = fUiSettings.ItemAt(i); i++)
|
||||
delete uiSetting;
|
||||
|
||||
fBreakpoints.MakeEmpty();
|
||||
fUISettings.MakeEmpty();
|
||||
fUiSettings.MakeEmpty();
|
||||
|
||||
fTeamName.Truncate(0);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
class BMessage;
|
||||
class Team;
|
||||
class BreakpointSetting;
|
||||
class TeamUISettings;
|
||||
class TeamUiSettings;
|
||||
|
||||
|
||||
class TeamSettings {
|
||||
@@ -33,24 +33,24 @@ public:
|
||||
int32 CountBreakpoints() const;
|
||||
const BreakpointSetting* BreakpointAt(int32 index) const;
|
||||
|
||||
int32 CountUISettings() const;
|
||||
const TeamUISettings* UISettingAt(int32 index) const;
|
||||
const TeamUISettings* UISettingFor(const char* id) const;
|
||||
status_t AddUISettings(TeamUISettings* settings);
|
||||
int32 CountUiSettings() const;
|
||||
const TeamUiSettings* UiSettingAt(int32 index) const;
|
||||
const TeamUiSettings* UiSettingFor(const char* id) const;
|
||||
status_t AddUiSettings(TeamUiSettings* settings);
|
||||
|
||||
TeamSettings& operator=(const TeamSettings& other);
|
||||
// throws std::bad_alloc
|
||||
|
||||
private:
|
||||
typedef BObjectList<BreakpointSetting> BreakpointList;
|
||||
typedef BObjectList<TeamUISettings> UISettingsList;
|
||||
typedef BObjectList<TeamUiSettings> UiSettingsList;
|
||||
|
||||
private:
|
||||
void _Unset();
|
||||
|
||||
private:
|
||||
BreakpointList fBreakpoints;
|
||||
UISettingsList fUISettings;
|
||||
UiSettingsList fUiSettings;
|
||||
BString fTeamName;
|
||||
};
|
||||
|
||||
|
||||
+3
-3
@@ -4,14 +4,14 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "TeamUISettings.h"
|
||||
#include "TeamUiSettings.h"
|
||||
|
||||
|
||||
TeamUISettings::TeamUISettings()
|
||||
TeamUiSettings::TeamUiSettings()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
TeamUISettings::~TeamUISettings()
|
||||
TeamUiSettings::~TeamUiSettings()
|
||||
{
|
||||
}
|
||||
+4
-4
@@ -18,17 +18,17 @@ enum team_ui_settings_type {
|
||||
};
|
||||
|
||||
|
||||
class TeamUISettings {
|
||||
class TeamUiSettings {
|
||||
public:
|
||||
TeamUISettings();
|
||||
virtual ~TeamUISettings();
|
||||
TeamUiSettings();
|
||||
virtual ~TeamUiSettings();
|
||||
|
||||
virtual team_ui_settings_type Type() const = 0;
|
||||
virtual const char* ID() const = 0;
|
||||
virtual status_t SetTo(const BMessage& archive) = 0;
|
||||
virtual status_t WriteTo(BMessage& archive) const = 0;
|
||||
|
||||
virtual TeamUISettings* Clone() const = 0;
|
||||
virtual TeamUiSettings* Clone() const = 0;
|
||||
// throws std::bad_alloc
|
||||
|
||||
};
|
||||
+12
-11
@@ -2,36 +2,37 @@
|
||||
* Copyright 2011, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include "TeamUISettingsFactory.h"
|
||||
|
||||
|
||||
#include "TeamUiSettingsFactory.h"
|
||||
|
||||
#include <Message.h>
|
||||
|
||||
#include "GUITeamUISettings.h"
|
||||
#include "GuiTeamUiSettings.h"
|
||||
|
||||
|
||||
TeamUISettingsFactory::TeamUISettingsFactory()
|
||||
TeamUiSettingsFactory::TeamUiSettingsFactory()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
TeamUISettingsFactory::~TeamUISettingsFactory()
|
||||
TeamUiSettingsFactory::~TeamUiSettingsFactory()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
TeamUISettingsFactory::Create(const BMessage& archive, TeamUISettings*&
|
||||
settings)
|
||||
TeamUiSettingsFactory::Create(const BMessage& archive,
|
||||
TeamUiSettings*& settings)
|
||||
{
|
||||
int32 type;
|
||||
status_t error = archive.FindInt32("type", &type);
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
|
||||
switch (type) {
|
||||
case TEAM_UI_SETTINGS_TYPE_GUI:
|
||||
settings = new(std::nothrow) GUITeamUISettings();
|
||||
settings = new(std::nothrow) GuiTeamUiSettings();
|
||||
if (settings == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
@@ -42,7 +43,7 @@ TeamUISettingsFactory::Create(const BMessage& archive, TeamUISettings*&
|
||||
return error;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case TEAM_UI_SETTINGS_TYPE_CLI:
|
||||
// TODO: implement once we have a CLI interface
|
||||
// (and corresponding settings)
|
||||
@@ -51,6 +52,6 @@ TeamUISettingsFactory::Create(const BMessage& archive, TeamUISettings*&
|
||||
default:
|
||||
return B_BAD_DATA;
|
||||
}
|
||||
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
+5
-5
@@ -10,15 +10,15 @@
|
||||
|
||||
|
||||
class BMessage;
|
||||
class TeamUISettings;
|
||||
class TeamUiSettings;
|
||||
|
||||
class TeamUISettingsFactory {
|
||||
class TeamUiSettingsFactory {
|
||||
public:
|
||||
TeamUISettingsFactory();
|
||||
~TeamUISettingsFactory();
|
||||
TeamUiSettingsFactory();
|
||||
~TeamUiSettingsFactory();
|
||||
|
||||
static status_t Create(const BMessage& archive,
|
||||
TeamUISettings*& settings);
|
||||
TeamUiSettings*& settings);
|
||||
};
|
||||
|
||||
#endif // TEAM_UI_SETTINGS_FACTORY_H
|
||||
@@ -19,7 +19,7 @@ class FunctionInstance;
|
||||
class Image;
|
||||
class StackFrame;
|
||||
class Team;
|
||||
class TeamUISettings;
|
||||
class TeamUiSettings;
|
||||
class Thread;
|
||||
class TypeComponentPath;
|
||||
class UserBreakpoint;
|
||||
@@ -49,9 +49,9 @@ public:
|
||||
// shut down the UI *now* -- no more user
|
||||
// feedback
|
||||
|
||||
virtual status_t LoadSettings(const TeamUISettings* settings)
|
||||
virtual status_t LoadSettings(const TeamUiSettings* settings)
|
||||
= 0;
|
||||
virtual status_t SaveSettings(TeamUISettings*& settings)
|
||||
virtual status_t SaveSettings(TeamUiSettings*& settings)
|
||||
const = 0;
|
||||
|
||||
virtual void NotifyUser(const char* title,
|
||||
|
||||
@@ -145,14 +145,14 @@ CommandLineUserInterface::Terminate()
|
||||
|
||||
|
||||
status_t
|
||||
CommandLineUserInterface::LoadSettings(const TeamUISettings* settings)
|
||||
CommandLineUserInterface::LoadSettings(const TeamUiSettings* settings)
|
||||
{
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
CommandLineUserInterface::SaveSettings(TeamUISettings*& settings) const
|
||||
CommandLineUserInterface::SaveSettings(TeamUiSettings*& settings) const
|
||||
{
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ public:
|
||||
// shut down the UI *now* -- no more user
|
||||
// feedback
|
||||
|
||||
virtual status_t LoadSettings(const TeamUISettings* settings);
|
||||
virtual status_t SaveSettings(TeamUISettings*& settings) const;
|
||||
virtual status_t LoadSettings(const TeamUiSettings* settings);
|
||||
virtual status_t SaveSettings(TeamUiSettings*& settings) const;
|
||||
|
||||
virtual void NotifyUser(const char* title,
|
||||
const char* message,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <Alert.h>
|
||||
|
||||
#include "GUITeamUISettings.h"
|
||||
#include "GuiTeamUiSettings.h"
|
||||
#include "TeamWindow.h"
|
||||
#include "Tracing.h"
|
||||
|
||||
@@ -72,22 +72,22 @@ GraphicalUserInterface::Terminate()
|
||||
|
||||
|
||||
status_t
|
||||
GraphicalUserInterface::LoadSettings(const TeamUISettings* settings)
|
||||
GraphicalUserInterface::LoadSettings(const TeamUiSettings* settings)
|
||||
{
|
||||
status_t result = fTeamWindow->LoadSettings((GUITeamUISettings*)settings);
|
||||
status_t result = fTeamWindow->LoadSettings((GuiTeamUiSettings*)settings);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
GraphicalUserInterface::SaveSettings(TeamUISettings*& settings) const
|
||||
GraphicalUserInterface::SaveSettings(TeamUiSettings*& settings) const
|
||||
{
|
||||
settings = new(std::nothrow) GUITeamUISettings(ID());
|
||||
settings = new(std::nothrow) GuiTeamUiSettings(ID());
|
||||
if (settings == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
fTeamWindow->SaveSettings((GUITeamUISettings*)settings);
|
||||
fTeamWindow->SaveSettings((GuiTeamUiSettings*)settings);
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ public:
|
||||
// shut down the UI *now* -- no more user
|
||||
// feedback
|
||||
|
||||
virtual status_t LoadSettings(const TeamUISettings* settings);
|
||||
virtual status_t SaveSettings(TeamUISettings*& settings) const;
|
||||
virtual status_t LoadSettings(const TeamUiSettings* settings);
|
||||
virtual status_t SaveSettings(TeamUiSettings*& settings) const;
|
||||
|
||||
virtual void NotifyUser(const char* title,
|
||||
const char* message,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <ExpressionParser.h>
|
||||
|
||||
#include "Architecture.h"
|
||||
#include "GUITeamUISettings.h"
|
||||
#include "GuiTeamUiSettings.h"
|
||||
#include "MemoryView.h"
|
||||
#include "MessageCodes.h"
|
||||
#include "Team.h"
|
||||
@@ -285,7 +285,7 @@ InspectorWindow::MemoryBlockRetrieved(TeamMemoryBlock* block)
|
||||
|
||||
|
||||
status_t
|
||||
InspectorWindow::LoadSettings(const GUITeamUISettings& settings)
|
||||
InspectorWindow::LoadSettings(const GuiTeamUiSettings& settings)
|
||||
{
|
||||
AutoLocker<BLooper> lock(this);
|
||||
if (!lock.IsLocked())
|
||||
|
||||
@@ -16,7 +16,7 @@ class BButton;
|
||||
class BMenuField;
|
||||
class BMessenger;
|
||||
class BTextControl;
|
||||
class GUITeamUISettings;
|
||||
class GuiTeamUiSettings;
|
||||
class MemoryView;
|
||||
class Team;
|
||||
class UserInterfaceListener;
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
virtual void MemoryBlockRetrieved(TeamMemoryBlock* block);
|
||||
|
||||
status_t LoadSettings(
|
||||
const GUITeamUISettings& settings);
|
||||
const GuiTeamUiSettings& settings);
|
||||
status_t SaveSettings(
|
||||
BMessage& settings);
|
||||
private:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <ObjectList.h>
|
||||
|
||||
#include "FunctionID.h"
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "LocatableFile.h"
|
||||
#include "table/TableColumns.h"
|
||||
#include "Team.h"
|
||||
@@ -241,7 +241,7 @@ BreakpointListView::LoadSettings(const BMessage& settings)
|
||||
{
|
||||
BMessage tableSettings;
|
||||
if (settings.FindMessage("breakpointsTable", &tableSettings) == B_OK) {
|
||||
GUISettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
fBreakpointsTable);
|
||||
}
|
||||
}
|
||||
@@ -253,7 +253,7 @@ BreakpointListView::SaveSettings(BMessage& settings)
|
||||
settings.MakeEmpty();
|
||||
|
||||
BMessage tableSettings;
|
||||
status_t result = GUISettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
status_t result = GuiSettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
fBreakpointsTable);
|
||||
if (result == B_OK)
|
||||
result = settings.AddMessage("breakpointsTable", &tableSettings);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "table/TableColumns.h"
|
||||
|
||||
#include "FunctionInstance.h"
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "Image.h"
|
||||
#include "ImageDebugInfo.h"
|
||||
#include "LocatableFile.h"
|
||||
@@ -398,7 +398,7 @@ ImageFunctionsView::LoadSettings(const BMessage& settings)
|
||||
{
|
||||
BMessage tableSettings;
|
||||
if (settings.FindMessage("functionsTable", &tableSettings) == B_OK) {
|
||||
GUISettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
fFunctionsTable);
|
||||
}
|
||||
}
|
||||
@@ -410,7 +410,7 @@ ImageFunctionsView::SaveSettings(BMessage& settings)
|
||||
settings.MakeEmpty();
|
||||
|
||||
BMessage tableSettings;
|
||||
status_t result = GUISettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
status_t result = GuiSettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
fFunctionsTable);
|
||||
if (result == B_OK)
|
||||
result = settings.AddMessage("functionsTable", &tableSettings);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <AutoLocker.h>
|
||||
#include <ObjectList.h>
|
||||
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "table/TableColumns.h"
|
||||
#include "Tracing.h"
|
||||
|
||||
@@ -231,7 +231,7 @@ ImageListView::LoadSettings(const BMessage& settings)
|
||||
{
|
||||
BMessage tableSettings;
|
||||
if (settings.FindMessage("imagesTable", &tableSettings) == B_OK) {
|
||||
GUISettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
fImagesTable);
|
||||
}
|
||||
}
|
||||
@@ -243,7 +243,7 @@ ImageListView::SaveSettings(BMessage& settings)
|
||||
settings.MakeEmpty();
|
||||
|
||||
BMessage tableSettings;
|
||||
status_t result = GUISettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
status_t result = GuiSettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
fImagesTable);
|
||||
if (result == B_OK)
|
||||
result = settings.AddMessage("imagesTable", &tableSettings);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "Architecture.h"
|
||||
#include "CpuState.h"
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "Register.h"
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ RegistersView::LoadSettings(const BMessage& settings)
|
||||
{
|
||||
BMessage tableSettings;
|
||||
if (settings.FindMessage("registerTable", &tableSettings) == B_OK) {
|
||||
GUISettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
fRegisterTable);
|
||||
}
|
||||
}
|
||||
@@ -245,7 +245,7 @@ RegistersView::SaveSettings(BMessage& settings)
|
||||
settings.MakeEmpty();
|
||||
|
||||
BMessage tableSettings;
|
||||
status_t result = GUISettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
status_t result = GuiSettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
fRegisterTable);
|
||||
if (result == B_OK)
|
||||
result = settings.AddMessage("registerTable", &tableSettings);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "table/TableColumns.h"
|
||||
|
||||
#include "FunctionInstance.h"
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "Image.h"
|
||||
#include "StackTrace.h"
|
||||
#include "TargetAddressTableColumn.h"
|
||||
@@ -203,7 +203,7 @@ StackTraceView::LoadSettings(const BMessage& settings)
|
||||
{
|
||||
BMessage tableSettings;
|
||||
if (settings.FindMessage("framesTable", &tableSettings) == B_OK) {
|
||||
GUISettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
fFramesTable);
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ StackTraceView::SaveSettings(BMessage& settings)
|
||||
settings.MakeEmpty();
|
||||
|
||||
BMessage tableSettings;
|
||||
status_t result = GUISettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
status_t result = GuiSettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
fFramesTable);
|
||||
if (result == B_OK)
|
||||
result = settings.AddMessage("framesTable", &tableSettings);
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include "CpuState.h"
|
||||
#include "DisassembledCode.h"
|
||||
#include "FileSourceCode.h"
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GUITeamUISettings.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "GuiTeamUiSettings.h"
|
||||
#include "Image.h"
|
||||
#include "ImageDebugInfo.h"
|
||||
#include "InspectorWindow.h"
|
||||
@@ -224,7 +224,7 @@ TeamWindow::MessageReceived(BMessage* message)
|
||||
fListener, this);
|
||||
if (fInspectorWindow != NULL) {
|
||||
BMessage settings;
|
||||
fInspectorWindow->LoadSettings(fUISettings);
|
||||
fInspectorWindow->LoadSettings(fUiSettings);
|
||||
fInspectorWindow->Show();
|
||||
}
|
||||
} catch (...) {
|
||||
@@ -357,7 +357,7 @@ TeamWindow::QuitRequested()
|
||||
|
||||
|
||||
status_t
|
||||
TeamWindow::LoadSettings(const GUITeamUISettings* settings)
|
||||
TeamWindow::LoadSettings(const GuiTeamUiSettings* settings)
|
||||
{
|
||||
AutoLocker<BWindow> lock(this);
|
||||
if (!lock.IsLocked())
|
||||
@@ -376,16 +376,16 @@ TeamWindow::LoadSettings(const GUITeamUISettings* settings)
|
||||
|
||||
BMessage archive;
|
||||
if (teamWindowSettings.FindMessage("sourceSplit", &archive) == B_OK)
|
||||
GUISettingsUtils::UnarchiveSplitView(archive, fSourceSplitView);
|
||||
GuiSettingsUtils::UnarchiveSplitView(archive, fSourceSplitView);
|
||||
|
||||
if (teamWindowSettings.FindMessage("functionSplit", &archive) == B_OK)
|
||||
GUISettingsUtils::UnarchiveSplitView(archive, fFunctionSplitView);
|
||||
GuiSettingsUtils::UnarchiveSplitView(archive, fFunctionSplitView);
|
||||
|
||||
if (teamWindowSettings.FindMessage("imageSplit", &archive) == B_OK)
|
||||
GUISettingsUtils::UnarchiveSplitView(archive, fImageSplitView);
|
||||
GuiSettingsUtils::UnarchiveSplitView(archive, fImageSplitView);
|
||||
|
||||
if (teamWindowSettings.FindMessage("threadSplit", &archive) == B_OK)
|
||||
GUISettingsUtils::UnarchiveSplitView(archive, fThreadSplitView);
|
||||
GuiSettingsUtils::UnarchiveSplitView(archive, fThreadSplitView);
|
||||
|
||||
if (teamWindowSettings.FindMessage("imageListView", &archive) == B_OK)
|
||||
fImageListView->LoadSettings(archive);
|
||||
@@ -408,21 +408,21 @@ TeamWindow::LoadSettings(const GUITeamUISettings* settings)
|
||||
if (teamWindowSettings.FindMessage("breakpointsView", &archive) == B_OK)
|
||||
fBreakpointsView->LoadSettings(archive);
|
||||
|
||||
fUISettings = *settings;
|
||||
fUiSettings = *settings;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
TeamWindow::SaveSettings(GUITeamUISettings* settings)
|
||||
TeamWindow::SaveSettings(GuiTeamUiSettings* settings)
|
||||
{
|
||||
AutoLocker<BWindow> lock(this);
|
||||
if (!lock.IsLocked())
|
||||
return B_ERROR;
|
||||
|
||||
BMessage inspectorSettings;
|
||||
if (fUISettings.Settings("inspectorWindow", inspectorSettings) == B_OK) {
|
||||
if (fUiSettings.Settings("inspectorWindow", inspectorSettings) == B_OK) {
|
||||
if (!settings->AddSettings("inspectorWindow", inspectorSettings))
|
||||
return B_NO_MEMORY;
|
||||
}
|
||||
@@ -432,22 +432,22 @@ TeamWindow::SaveSettings(GUITeamUISettings* settings)
|
||||
if (teamWindowSettings.AddRect("frame", Frame()) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
if (GUISettingsUtils::ArchiveSplitView(archive, fSourceSplitView) != B_OK)
|
||||
if (GuiSettingsUtils::ArchiveSplitView(archive, fSourceSplitView) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
if (teamWindowSettings.AddMessage("sourceSplit", &archive) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
if (GUISettingsUtils::ArchiveSplitView(archive, fFunctionSplitView) != B_OK)
|
||||
if (GuiSettingsUtils::ArchiveSplitView(archive, fFunctionSplitView) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
if (teamWindowSettings.AddMessage("functionSplit", &archive) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
if (GUISettingsUtils::ArchiveSplitView(archive, fImageSplitView) != B_OK)
|
||||
if (GuiSettingsUtils::ArchiveSplitView(archive, fImageSplitView) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
if (teamWindowSettings.AddMessage("imageSplit", &archive))
|
||||
return B_NO_MEMORY;
|
||||
|
||||
if (GUISettingsUtils::ArchiveSplitView(archive, fThreadSplitView) != B_OK)
|
||||
if (GuiSettingsUtils::ArchiveSplitView(archive, fThreadSplitView) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
if (teamWindowSettings.AddMessage("threadSplit", &archive))
|
||||
return B_NO_MEMORY;
|
||||
@@ -1265,7 +1265,7 @@ TeamWindow::_HandleResolveMissingSourceFile(entry_ref& locatedPath)
|
||||
status_t
|
||||
TeamWindow::_SaveInspectorSettings(const BMessage* settings)
|
||||
{
|
||||
if (fUISettings.AddSettings("inspectorWindow", *settings) != B_OK)
|
||||
if (fUiSettings.AddSettings("inspectorWindow", *settings) != B_OK)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
return B_OK;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "BreakpointsView.h"
|
||||
#include "Function.h"
|
||||
#include "GUITeamUISettings.h"
|
||||
#include "GuiTeamUiSettings.h"
|
||||
#include "ImageFunctionsView.h"
|
||||
#include "ImageListView.h"
|
||||
#include "SourceView.h"
|
||||
@@ -59,9 +59,9 @@ public:
|
||||
virtual bool QuitRequested();
|
||||
|
||||
status_t LoadSettings(
|
||||
const GUITeamUISettings* settings);
|
||||
const GuiTeamUiSettings* settings);
|
||||
status_t SaveSettings(
|
||||
GUITeamUISettings* settings);
|
||||
GuiTeamUiSettings* settings);
|
||||
|
||||
|
||||
private:
|
||||
@@ -179,7 +179,7 @@ private:
|
||||
BSplitView* fImageSplitView;
|
||||
BSplitView* fThreadSplitView;
|
||||
InspectorWindow* fInspectorWindow;
|
||||
GUITeamUISettings fUISettings;
|
||||
GuiTeamUiSettings fUiSettings;
|
||||
BFilePanel* fSourceLocatePanel;
|
||||
};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <ObjectList.h>
|
||||
#include <ToolTip.h>
|
||||
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "table/TableColumns.h"
|
||||
#include "UiUtils.h"
|
||||
|
||||
@@ -289,7 +289,7 @@ ThreadListView::LoadSettings(const BMessage& settings)
|
||||
{
|
||||
BMessage tableSettings;
|
||||
if (settings.FindMessage("threadsTable", &tableSettings) == B_OK) {
|
||||
GUISettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
fThreadsTable);
|
||||
}
|
||||
}
|
||||
@@ -301,7 +301,7 @@ ThreadListView::SaveSettings(BMessage& settings)
|
||||
settings.MakeEmpty();
|
||||
|
||||
BMessage tableSettings;
|
||||
status_t result = GUISettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
status_t result = GuiSettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
fThreadsTable);
|
||||
if (result == B_OK)
|
||||
result = settings.AddMessage("threadsTable", &tableSettings);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "Architecture.h"
|
||||
#include "FunctionID.h"
|
||||
#include "FunctionInstance.h"
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
#include "MessageCodes.h"
|
||||
#include "Register.h"
|
||||
#include "SettingsMenu.h"
|
||||
@@ -1687,7 +1687,7 @@ VariablesView::LoadSettings(const BMessage& settings)
|
||||
{
|
||||
BMessage tableSettings;
|
||||
if (settings.FindMessage("variableTable", &tableSettings) == B_OK) {
|
||||
GUISettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(tableSettings,
|
||||
fVariableTable);
|
||||
}
|
||||
}
|
||||
@@ -1699,7 +1699,7 @@ VariablesView::SaveSettings(BMessage& settings)
|
||||
settings.MakeEmpty();
|
||||
|
||||
BMessage tableSettings;
|
||||
status_t result = GUISettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
status_t result = GuiSettingsUtils::ArchiveTableSettings(tableSettings,
|
||||
fVariableTable);
|
||||
if (result == B_OK)
|
||||
result = settings.AddMessage("variableTable", &tableSettings);
|
||||
|
||||
+5
-5
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "GUISettingsUtils.h"
|
||||
#include "GuiSettingsUtils.h"
|
||||
|
||||
#include <Message.h>
|
||||
#include <SplitView.h>
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
/*static*/ status_t
|
||||
GUISettingsUtils::ArchiveSplitView(BMessage& settings, BSplitView* view)
|
||||
GuiSettingsUtils::ArchiveSplitView(BMessage& settings, BSplitView* view)
|
||||
{
|
||||
settings.MakeEmpty();
|
||||
for (int32 i = 0; i < view->CountItems(); i++) {
|
||||
@@ -29,7 +29,7 @@ GUISettingsUtils::ArchiveSplitView(BMessage& settings, BSplitView* view)
|
||||
|
||||
|
||||
/*static*/ void
|
||||
GUISettingsUtils::UnarchiveSplitView(const BMessage& settings,
|
||||
GuiSettingsUtils::UnarchiveSplitView(const BMessage& settings,
|
||||
BSplitView* view)
|
||||
{
|
||||
for (int32 i = 0; i < view->CountItems(); i++) {
|
||||
@@ -45,7 +45,7 @@ GUISettingsUtils::UnarchiveSplitView(const BMessage& settings,
|
||||
|
||||
|
||||
/*static*/ status_t
|
||||
GUISettingsUtils::ArchiveTableSettings(BMessage& settings,
|
||||
GuiSettingsUtils::ArchiveTableSettings(BMessage& settings,
|
||||
AbstractTable* table)
|
||||
{
|
||||
settings.MakeEmpty();
|
||||
@@ -56,7 +56,7 @@ GUISettingsUtils::ArchiveTableSettings(BMessage& settings,
|
||||
|
||||
|
||||
/*static*/ void
|
||||
GUISettingsUtils::UnarchiveTableSettings(const BMessage& settings,
|
||||
GuiSettingsUtils::UnarchiveTableSettings(const BMessage& settings,
|
||||
AbstractTable* table)
|
||||
{
|
||||
BMessage settingsCopy(settings);
|
||||
+1
-1
@@ -14,7 +14,7 @@ class BMessage;
|
||||
class BSplitView;
|
||||
|
||||
|
||||
class GUISettingsUtils {
|
||||
class GuiSettingsUtils {
|
||||
public:
|
||||
|
||||
static status_t ArchiveSplitView(BMessage& settings,
|
||||
Reference in New Issue
Block a user