Debugger: Coding style: normalize naming, some whitespace fixes

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