From a75a222b35d17cd83bc75253f3cd8e24a6a911f4 Mon Sep 17 00:00:00 2001 From: Zardshard <0azrune6@zard.anonaddy.com> Date: Tue, 11 Jul 2023 13:09:29 -0400 Subject: [PATCH] Icon-O-Matic: Remove dead homebrew translation system Icon-O-Matic uses Locale.h now. Change-Id: I9722ee76fda47821bf27e6195f8f6ec3d3e1b43e Reviewed-on: https://review.haiku-os.org/c/haiku/+/6700 Reviewed-by: waddlesplash --- .../icon-o-matic/generic/command/Command.cpp | 11 --- .../icon-o-matic/generic/command/Command.h | 3 - .../generic/command/CompoundCommand.cpp | 2 +- .../shape/commands/NudgePointsCommand.cpp | 4 +- .../shape/commands/TransformPointsCommand.cpp | 6 +- .../shape/commands/TransformPointsCommand.h | 3 +- .../transformable/TransformBox.cpp | 7 +- .../icon-o-matic/transformable/TransformBox.h | 3 +- .../transformable/TransformBoxStates.cpp | 89 ++----------------- .../transformable/TransformBoxStates.h | 28 ++---- .../transformable/TransformCommand.cpp | 18 ++-- .../transformable/TransformCommand.h | 10 +-- .../transformable/TransformGradientBox.cpp | 4 +- .../transformable/TransformGradientBox.h | 3 +- .../TransformGradientCommand.cpp | 5 +- .../transformable/TransformGradientCommand.h | 3 +- .../transformable/TransformObjectsCommand.cpp | 6 +- .../transformable/TransformObjectsCommand.h | 3 +- .../transformable/TransformPointsBox.cpp | 6 +- .../transformable/TransformPointsBox.h | 3 +- .../transformable/TransformShapesBox.cpp | 5 +- .../transformable/TransformShapesBox.h | 3 +- 22 files changed, 44 insertions(+), 181 deletions(-) diff --git a/src/apps/icon-o-matic/generic/command/Command.cpp b/src/apps/icon-o-matic/generic/command/Command.cpp index 5728d5142f..eafbf68774 100644 --- a/src/apps/icon-o-matic/generic/command/Command.cpp +++ b/src/apps/icon-o-matic/generic/command/Command.cpp @@ -78,14 +78,3 @@ Command::CombineWithPrevious(const Command* previous) { return false; } - - -// _GetString -const char* -Command::_GetString(uint32 key, const char* defaultString) const -{ -// if (LanguageManager* manager = LanguageManager::Default()) -// return manager->GetString(key, defaultString); -// else - return defaultString; -} diff --git a/src/apps/icon-o-matic/generic/command/Command.h b/src/apps/icon-o-matic/generic/command/Command.h index d43c19dc8a..0800850510 100644 --- a/src/apps/icon-o-matic/generic/command/Command.h +++ b/src/apps/icon-o-matic/generic/command/Command.h @@ -32,9 +32,6 @@ class Command { virtual bool CombineWithPrevious(const Command* previous); protected: - const char* _GetString(uint32 key, - const char* defaultString) const; - bigtime_t fTimeStamp; }; diff --git a/src/apps/icon-o-matic/generic/command/CompoundCommand.cpp b/src/apps/icon-o-matic/generic/command/CompoundCommand.cpp index 5b9e0bd7f5..be861e91f0 100644 --- a/src/apps/icon-o-matic/generic/command/CompoundCommand.cpp +++ b/src/apps/icon-o-matic/generic/command/CompoundCommand.cpp @@ -92,5 +92,5 @@ CompoundCommand::Redo() void CompoundCommand::GetName(BString& name) { - name << _GetString(fNameIndex, fName.String()); + name << fName.String(); } diff --git a/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.cpp b/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.cpp index 5115cc13db..f37b9272e5 100644 --- a/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.cpp +++ b/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.cpp @@ -34,9 +34,7 @@ NudgePointsCommand::NudgePointsCommand(VectorPath* path, 1.0, 1.0, count > 1 ? B_TRANSLATE("Nudge Control Points") : - B_TRANSLATE("Nudge Control Point"), -// count > 1 ? NUDGE_CONTROL_POINTS : NUDGE_CONTROL_POINT), - -1), + B_TRANSLATE("Nudge Control Point")), fPath(path), fIndices(NULL), fPoints(NULL), diff --git a/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.cpp b/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.cpp index db5a9562f2..6094a34d53 100644 --- a/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.cpp +++ b/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.cpp @@ -31,15 +31,13 @@ TransformPointsCommand::TransformPointsCommand( double xScale, double yScale, - const char* name, - int32 nameIndex) + const char* name) : TransformCommand(pivot, translation, rotation, xScale, yScale, - name, - nameIndex), + name), fTransformBox(box), fPath(path), fIndices(indices && count > 0 ? diff --git a/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.h b/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.h index 33ee32a65c..4254648733 100644 --- a/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.h +++ b/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.h @@ -40,8 +40,7 @@ class TransformPointsCommand : public TransformCommand, double xScale, double yScale, - const char* name, - int32 nameIndex); + const char* name); virtual ~TransformPointsCommand(); // Command interface diff --git a/src/apps/icon-o-matic/transformable/TransformBox.cpp b/src/apps/icon-o-matic/transformable/TransformBox.cpp index 1f0925fc8e..bd955e1b7f 100644 --- a/src/apps/icon-o-matic/transformable/TransformBox.cpp +++ b/src/apps/icon-o-matic/transformable/TransformBox.cpp @@ -160,8 +160,7 @@ TransformBox::MouseDown(BPoint where) fCurrentState->SetOrigin(where); delete fCurrentCommand; - fCurrentCommand = MakeCommand(fCurrentState->ActionName(), - fCurrentState->ActionNameIndex()); + fCurrentCommand = MakeCommand(fCurrentState->ActionName()); } return true; @@ -302,7 +301,7 @@ TransformBox::HandleKeyDown(uint32 key, uint32 modifiers, Command** _command) return false; if (!fCurrentCommand) { - fCurrentCommand = MakeCommand("Translate", -1); + fCurrentCommand = MakeCommand("Translate"); } TranslateBy(translation); @@ -431,7 +430,7 @@ void TransformBox::NudgeBy(BPoint offset) { if (!fNudging && !fCurrentCommand) { - fCurrentCommand = MakeCommand("Move", 0/*MOVE*/); + fCurrentCommand = MakeCommand("Move"); fNudging = true; } if (fNudging) { diff --git a/src/apps/icon-o-matic/transformable/TransformBox.h b/src/apps/icon-o-matic/transformable/TransformBox.h index 3af867be45..107dc227d5 100644 --- a/src/apps/icon-o-matic/transformable/TransformBox.h +++ b/src/apps/icon-o-matic/transformable/TransformBox.h @@ -80,8 +80,7 @@ class TransformBox : public ChannelTransform, virtual float ZoomLevel() const; - virtual TransformCommand* MakeCommand(const char* actionName, - uint32 nameIndex) = 0; + virtual TransformCommand* MakeCommand(const char* actionName) = 0; bool IsRotating() const { return fCurrentState == fRotateState; } diff --git a/src/apps/icon-o-matic/transformable/TransformBoxStates.cpp b/src/apps/icon-o-matic/transformable/TransformBoxStates.cpp index b98b548ebb..0f9d88dca1 100644 --- a/src/apps/icon-o-matic/transformable/TransformBoxStates.cpp +++ b/src/apps/icon-o-matic/transformable/TransformBoxStates.cpp @@ -1,9 +1,10 @@ /* - * Copyright 2006-2009, Haiku. + * Copyright 2006-2009, 2023, Haiku. * Distributed under the terms of the MIT License. * * Authors: * Stephan Aßmus + * Zardshard */ #include "TransformBoxStates.h" @@ -27,7 +28,6 @@ #define B_TRANSLATION_CONTEXT "Icon-O-Matic-TransformationBoxStates" -// constructor DragState::DragState(TransformBox* parent) : fOrigin(0.0, 0.0), @@ -36,7 +36,6 @@ DragState::DragState(TransformBox* parent) } -// SetOrigin void DragState::SetOrigin(BPoint origin) { @@ -44,7 +43,6 @@ DragState::SetOrigin(BPoint origin) } -// ActionName const char* DragState::ActionName() const { @@ -52,15 +50,6 @@ DragState::ActionName() const } -// ActionNameIndex -uint32 -DragState::ActionNameIndex() const -{ - return TRANSFORMATION; -} - - -// _SetViewCursor void DragState::_SetViewCursor(BView* view, const uchar* cursorData) const { @@ -72,7 +61,6 @@ DragState::_SetViewCursor(BView* view, const uchar* cursorData) const // #pragma mark - DragCornerState -// constructor DragCornerState::DragCornerState(TransformBox* parent, uint32 corner) : DragState(parent), @@ -81,7 +69,6 @@ DragCornerState::DragCornerState(TransformBox* parent, uint32 corner) } -// SetOrigin void DragCornerState::SetOrigin(BPoint origin) { @@ -93,8 +80,7 @@ DragCornerState::SetOrigin(BPoint origin) // copy the matrix at the start of the drag procedure fMatrix.reset(); fMatrix.multiply(agg::trans_affine_scaling(fOldXScale, fOldYScale)); - fMatrix.multiply(agg::trans_affine_rotation(fParent->LocalRotation() - * M_PI / 180.0)); + fMatrix.multiply(agg::trans_affine_rotation(fParent->LocalRotation() * M_PI / 180.0)); fMatrix.multiply(agg::trans_affine_translation(fParent->Translation().x, fParent->Translation().y)); @@ -143,7 +129,6 @@ DragCornerState::SetOrigin(BPoint origin) } -// DragTo void DragCornerState::DragTo(BPoint current, uint32 modifiers) { @@ -182,12 +167,10 @@ DragCornerState::DragTo(BPoint current, uint32 modifiers) translation.x = x; translation.y = y; - fParent->SetTranslationAndScale(translation, xScale * fOldXScale, - yScale * fOldYScale); + fParent->SetTranslationAndScale(translation, xScale * fOldXScale, yScale * fOldYScale); } -// UpdateViewCursor void DragCornerState::UpdateViewCursor(BView* view, BPoint current) const { @@ -290,7 +273,6 @@ DragCornerState::UpdateViewCursor(BView* view, BPoint current) const } -// ActionName const char* DragCornerState::ActionName() const { @@ -298,14 +280,6 @@ DragCornerState::ActionName() const } -// ActionNameIndex -uint32 -DragCornerState::ActionNameIndex() const -{ - return SCALE; -} - - // #pragma mark - DragSideState @@ -317,7 +291,6 @@ DragSideState::DragSideState(TransformBox* parent, uint32 side) } -// SetOrigin void DragSideState::SetOrigin(BPoint origin) { @@ -329,8 +302,7 @@ DragSideState::SetOrigin(BPoint origin) // copy the matrix at the start of the drag procedure fMatrix.reset(); fMatrix.multiply(agg::trans_affine_scaling(fOldXScale, fOldYScale)); - fMatrix.multiply(agg::trans_affine_rotation(fParent->LocalRotation() - * M_PI / 180.0)); + fMatrix.multiply(agg::trans_affine_rotation(fParent->LocalRotation() * M_PI / 180.0)); fMatrix.multiply(agg::trans_affine_translation(fParent->Translation().x, fParent->Translation().y)); @@ -367,7 +339,6 @@ DragSideState::SetOrigin(BPoint origin) } -// DragTo void DragSideState::DragTo(BPoint current, uint32 modifiers) { @@ -400,12 +371,10 @@ DragSideState::DragTo(BPoint current, uint32 modifiers) translation.x = x; translation.y = y; - fParent->SetTranslationAndScale(translation, xScale * fOldXScale, - yScale * fOldYScale); + fParent->SetTranslationAndScale(translation, xScale * fOldXScale, yScale * fOldYScale); } -// UpdateViewCursor void DragSideState::UpdateViewCursor(BView* view, BPoint current) const { @@ -458,7 +427,6 @@ DragSideState::UpdateViewCursor(BView* view, BPoint current) const } -// ActionName const char* DragSideState::ActionName() const { @@ -466,18 +434,9 @@ DragSideState::ActionName() const } -// ActionNameIndex -uint32 -DragSideState::ActionNameIndex() const -{ - return SCALE; -} - - // #pragma mark - DragBoxState -// SetOrigin void DragBoxState::SetOrigin(BPoint origin) { @@ -486,7 +445,6 @@ DragBoxState::SetOrigin(BPoint origin) } -// DragTo void DragBoxState::DragTo(BPoint current, uint32 modifiers) { @@ -502,7 +460,6 @@ DragBoxState::DragTo(BPoint current, uint32 modifiers) } -// UpdateViewCursor void DragBoxState::UpdateViewCursor(BView* view, BPoint current) const { @@ -510,7 +467,6 @@ DragBoxState::UpdateViewCursor(BView* view, BPoint current) const } -// ActionName const char* DragBoxState::ActionName() const { @@ -518,18 +474,9 @@ DragBoxState::ActionName() const } -// ActionNameIndex -uint32 -DragBoxState::ActionNameIndex() const -{ - return MOVE; -} - - // #pragma mark - RotateBoxState -// constructor RotateBoxState::RotateBoxState(TransformBox* parent) : DragState(parent), @@ -538,7 +485,6 @@ RotateBoxState::RotateBoxState(TransformBox* parent) } -// SetOrigin void RotateBoxState::SetOrigin(BPoint origin) { @@ -547,7 +493,6 @@ RotateBoxState::SetOrigin(BPoint origin) } -// DragTo void RotateBoxState::DragTo(BPoint current, uint32 modifiers) { @@ -567,7 +512,6 @@ RotateBoxState::DragTo(BPoint current, uint32 modifiers) } -// UpdateViewCursor void RotateBoxState::UpdateViewCursor(BView* view, BPoint current) const { @@ -599,7 +543,6 @@ RotateBoxState::UpdateViewCursor(BView* view, BPoint current) const } -// ActionName const char* RotateBoxState::ActionName() const { @@ -607,18 +550,9 @@ RotateBoxState::ActionName() const } -// ActionNameIndex -uint32 -RotateBoxState::ActionNameIndex() const -{ - return ROTATE; -} - - // #pragma mark - OffsetCenterState -// SetOrigin void OffsetCenterState::SetOrigin(BPoint origin) { @@ -627,7 +561,6 @@ OffsetCenterState::SetOrigin(BPoint origin) } -// DragTo void OffsetCenterState::DragTo(BPoint current, uint32 modifiers) { @@ -637,7 +570,6 @@ OffsetCenterState::DragTo(BPoint current, uint32 modifiers) } -// UpdateViewCursor void OffsetCenterState::UpdateViewCursor(BView* view, BPoint current) const { @@ -645,17 +577,8 @@ OffsetCenterState::UpdateViewCursor(BView* view, BPoint current) const } -// ActionName const char* OffsetCenterState::ActionName() const { return B_TRANSLATE("Move Pivot"); } - - -// ActionNameIndex -uint32 -OffsetCenterState::ActionNameIndex() const -{ - return MOVE_PIVOT; -} diff --git a/src/apps/icon-o-matic/transformable/TransformBoxStates.h b/src/apps/icon-o-matic/transformable/TransformBoxStates.h index bf26d4b5aa..ff4cdf1e73 100644 --- a/src/apps/icon-o-matic/transformable/TransformBoxStates.h +++ b/src/apps/icon-o-matic/transformable/TransformBoxStates.h @@ -1,9 +1,10 @@ /* - * Copyright 2006, Haiku. + * Copyright 2006, 2023, Haiku. * Distributed under the terms of the MIT License. * * Authors: * Stephan Aßmus + * Zardshard */ #ifndef TRANSFORM_BOX_STATES_H @@ -16,15 +17,6 @@ class BView; class TransformBox; -// TODO: remove and replace with translation string indices once multiple -// languages are supported -#define TRANSFORMATION 0 -#define ROTATE 0 -#define MOVE 0 -#define SCALE 0 -#define MOVE_PIVOT 0 -// - // base class class DragState { public: @@ -36,11 +28,9 @@ class DragState { virtual void UpdateViewCursor(BView* view, BPoint current) const = 0; virtual const char* ActionName() const; - virtual uint32 ActionNameIndex() const; protected: - void _SetViewCursor(BView* view, - const uchar* cursorData) const; + void _SetViewCursor(BView* view, const uchar* cursorData) const; BPoint fOrigin; TransformBox* fParent; @@ -55,8 +45,7 @@ class DragCornerState : public DragState { LEFT_BOTTOM_CORNER, RIGHT_BOTTOM_CORNER, }; - DragCornerState(TransformBox* parent, - uint32 corner); + DragCornerState(TransformBox* parent, uint32 corner); virtual ~DragCornerState() {} virtual void SetOrigin(BPoint origin); @@ -64,7 +53,6 @@ class DragCornerState : public DragState { virtual void UpdateViewCursor(BView* view, BPoint current) const; virtual const char* ActionName() const; - virtual uint32 ActionNameIndex() const; private: uint32 fCorner; @@ -87,8 +75,7 @@ class DragSideState : public DragState { RIGHT_SIDE, BOTTOM_SIDE, }; - DragSideState(TransformBox* parent, - uint32 side); + DragSideState(TransformBox* parent, uint32 side); virtual ~DragSideState() {} virtual void SetOrigin(BPoint origin); @@ -96,7 +83,6 @@ class DragSideState : public DragState { virtual void UpdateViewCursor(BView* view, BPoint current) const; virtual const char* ActionName() const; - virtual uint32 ActionNameIndex() const; private: uint32 fSide; @@ -121,7 +107,6 @@ class DragBoxState : public DragState { virtual void UpdateViewCursor(BView* view, BPoint current) const; virtual const char* ActionName() const; - virtual uint32 ActionNameIndex() const; private: BPoint fOldTranslation; @@ -138,7 +123,6 @@ class RotateBoxState : public DragState { virtual void UpdateViewCursor(BView* view, BPoint current) const; virtual const char* ActionName() const; - virtual uint32 ActionNameIndex() const; private: double fOldAngle; @@ -156,8 +140,6 @@ class OffsetCenterState : public DragState { virtual void UpdateViewCursor(BView* view, BPoint current) const; virtual const char* ActionName() const; - virtual uint32 ActionNameIndex() const; - }; #endif // TRANSFORM_BOX_STATES_H diff --git a/src/apps/icon-o-matic/transformable/TransformCommand.cpp b/src/apps/icon-o-matic/transformable/TransformCommand.cpp index f4fe01deb6..7fab0de804 100644 --- a/src/apps/icon-o-matic/transformable/TransformCommand.cpp +++ b/src/apps/icon-o-matic/transformable/TransformCommand.cpp @@ -16,8 +16,7 @@ TransformCommand::TransformCommand(BPoint pivot, double rotation, double xScale, double yScale, - const char* actionName, - uint32 nameIndex) + const char* actionName) : Command(), fOldPivot(pivot), fOldTranslation(translation), @@ -31,14 +30,12 @@ TransformCommand::TransformCommand(BPoint pivot, fNewXScale(xScale), fNewYScale(yScale), - fName(actionName), - fNameIndex(nameIndex) + fName(actionName) { } // constructor -TransformCommand::TransformCommand(const char* actionName, - uint32 nameIndex) +TransformCommand::TransformCommand(const char* actionName) : Command(), fOldPivot(B_ORIGIN), fOldTranslation(B_ORIGIN), @@ -52,8 +49,7 @@ TransformCommand::TransformCommand(const char* actionName, fNewXScale(1.0), fNewYScale(1.0), - fName(actionName), - fNameIndex(nameIndex) + fName(actionName) { } @@ -112,7 +108,7 @@ TransformCommand::Redo() void TransformCommand::GetName(BString& name) { - name << _GetString(fNameIndex, fName.String()); + name << fName.String(); } // SetNewTransformation @@ -140,9 +136,7 @@ TransformCommand::SetNewTranslation(BPoint translation) // SetName void -TransformCommand::SetName(const char* actionName, uint32 nameIndex) +TransformCommand::SetName(const char* actionName) { fName.SetTo(actionName); - fNameIndex = nameIndex; } - diff --git a/src/apps/icon-o-matic/transformable/TransformCommand.h b/src/apps/icon-o-matic/transformable/TransformCommand.h index 067267dece..3b500e6557 100644 --- a/src/apps/icon-o-matic/transformable/TransformCommand.h +++ b/src/apps/icon-o-matic/transformable/TransformCommand.h @@ -22,11 +22,9 @@ class TransformCommand : public Command { double xScale, double yScale, - const char* actionName, - uint32 nameIndex); + const char* actionName); - TransformCommand(const char* actionName, - uint32 nameIndex); + TransformCommand(const char* actionName); virtual ~TransformCommand(); @@ -49,8 +47,7 @@ class TransformCommand : public Command { void SetNewTranslation(BPoint translation); // convinience for "nudging" - void SetName(const char* actionName, - uint32 nameIndex); + void SetName(const char* actionName); protected: virtual status_t _SetTransformation(BPoint pivot, @@ -72,7 +69,6 @@ class TransformCommand : public Command { double fNewYScale; BString fName; - uint32 fNameIndex; }; #endif // TRANSFORM_COMMAND_H diff --git a/src/apps/icon-o-matic/transformable/TransformGradientBox.cpp b/src/apps/icon-o-matic/transformable/TransformGradientBox.cpp index d7fdb18cc5..63903f512b 100644 --- a/src/apps/icon-o-matic/transformable/TransformGradientBox.cpp +++ b/src/apps/icon-o-matic/transformable/TransformGradientBox.cpp @@ -178,10 +178,10 @@ TransformGradientBox::ViewSpaceRotation() const // MakeCommand TransformCommand* -TransformGradientBox::MakeCommand(const char* commandName, uint32 nameIndex) +TransformGradientBox::MakeCommand(const char* commandName) { return new TransformGradientCommand(this, fGradient, Pivot(), Translation(), LocalRotation(), LocalXScale(), LocalYScale(), - commandName, nameIndex); + commandName); } diff --git a/src/apps/icon-o-matic/transformable/TransformGradientBox.h b/src/apps/icon-o-matic/transformable/TransformGradientBox.h index 8c8e973512..1a81e880f9 100644 --- a/src/apps/icon-o-matic/transformable/TransformGradientBox.h +++ b/src/apps/icon-o-matic/transformable/TransformGradientBox.h @@ -42,8 +42,7 @@ class TransformGradientBox : public TransformBox { virtual float ZoomLevel() const; virtual double ViewSpaceRotation() const; - virtual TransformCommand* MakeCommand(const char* actionName, - uint32 nameIndex); + virtual TransformCommand* MakeCommand(const char* actionName); // TransformGradientBox Command* Perform(); diff --git a/src/apps/icon-o-matic/transformable/TransformGradientCommand.cpp b/src/apps/icon-o-matic/transformable/TransformGradientCommand.cpp index b01611ed82..3c5e2498dd 100644 --- a/src/apps/icon-o-matic/transformable/TransformGradientCommand.cpp +++ b/src/apps/icon-o-matic/transformable/TransformGradientCommand.cpp @@ -17,10 +17,9 @@ using std::nothrow; TransformGradientCommand::TransformGradientCommand(TransformBox* box, Gradient* gradient, BPoint pivot, BPoint translation, double rotation, - double xScale, double yScale, const char* name, int32 nameIndex) + double xScale, double yScale, const char* name) : - TransformCommand(pivot, translation, rotation, xScale, yScale, name, - nameIndex), + TransformCommand(pivot, translation, rotation, xScale, yScale, name), fTransformBox(box), fGradient(gradient) { diff --git a/src/apps/icon-o-matic/transformable/TransformGradientCommand.h b/src/apps/icon-o-matic/transformable/TransformGradientCommand.h index 85d68f99ee..eccfe41954 100644 --- a/src/apps/icon-o-matic/transformable/TransformGradientCommand.h +++ b/src/apps/icon-o-matic/transformable/TransformGradientCommand.h @@ -25,8 +25,7 @@ public: TransformBox* box, Gradient* gradient, BPoint pivot, BPoint translation, double rotation, double xScale, - double yScale, const char* name, - int32 nameIndex); + double yScale, const char* name); virtual ~TransformGradientCommand(); // Command interface diff --git a/src/apps/icon-o-matic/transformable/TransformObjectsCommand.cpp b/src/apps/icon-o-matic/transformable/TransformObjectsCommand.cpp index 0e2d19e247..a07ca30947 100644 --- a/src/apps/icon-o-matic/transformable/TransformObjectsCommand.cpp +++ b/src/apps/icon-o-matic/transformable/TransformObjectsCommand.cpp @@ -28,15 +28,13 @@ TransformObjectsCommand::TransformObjectsCommand( double xScale, double yScale, - const char* name, - int32 nameIndex) + const char* name) : TransformCommand(pivot, translation, rotation, xScale, yScale, - name, - nameIndex), + name), fTransformBox(box), fObjects(objects && count > 0 ? new (nothrow) Transformable*[count] : NULL), diff --git a/src/apps/icon-o-matic/transformable/TransformObjectsCommand.h b/src/apps/icon-o-matic/transformable/TransformObjectsCommand.h index 46725a9cb0..c9bdab8608 100644 --- a/src/apps/icon-o-matic/transformable/TransformObjectsCommand.h +++ b/src/apps/icon-o-matic/transformable/TransformObjectsCommand.h @@ -36,8 +36,7 @@ class TransformObjectsCommand : public TransformCommand, double xScale, double yScale, - const char* name, - int32 nameIndex); + const char* name); virtual ~TransformObjectsCommand(); // Command interface diff --git a/src/apps/icon-o-matic/transformable/TransformPointsBox.cpp b/src/apps/icon-o-matic/transformable/TransformPointsBox.cpp index bb262dc1df..da24dee007 100644 --- a/src/apps/icon-o-matic/transformable/TransformPointsBox.cpp +++ b/src/apps/icon-o-matic/transformable/TransformPointsBox.cpp @@ -117,8 +117,7 @@ TransformPointsBox::Update(bool deep) // MakeCommand TransformCommand* -TransformPointsBox::MakeCommand(const char* commandName, - uint32 nameIndex) +TransformPointsBox::MakeCommand(const char* commandName) { return new TransformPointsCommand(this, fPath, @@ -132,8 +131,7 @@ TransformPointsBox::MakeCommand(const char* commandName, LocalXScale(), LocalYScale(), - commandName, - nameIndex); + commandName); } // #pragma mark - diff --git a/src/apps/icon-o-matic/transformable/TransformPointsBox.h b/src/apps/icon-o-matic/transformable/TransformPointsBox.h index 022c290eb6..bb9f0f0bfe 100644 --- a/src/apps/icon-o-matic/transformable/TransformPointsBox.h +++ b/src/apps/icon-o-matic/transformable/TransformPointsBox.h @@ -40,8 +40,7 @@ class TransformPointsBox : public CanvasTransformBox { // TransformBox interface virtual void Update(bool deep = true); - virtual TransformCommand* MakeCommand(const char* commandName, - uint32 nameIndex); + virtual TransformCommand* MakeCommand(const char* commandName); // TransformPointsBox void Cancel(); diff --git a/src/apps/icon-o-matic/transformable/TransformShapesBox.cpp b/src/apps/icon-o-matic/transformable/TransformShapesBox.cpp index 43ce1c50ac..de14df9a48 100644 --- a/src/apps/icon-o-matic/transformable/TransformShapesBox.cpp +++ b/src/apps/icon-o-matic/transformable/TransformShapesBox.cpp @@ -129,7 +129,7 @@ TransformShapesBox::ObjectChanged(const Observable* object) // MakeCommand TransformCommand* -TransformShapesBox::MakeCommand(const char* commandName, uint32 nameIndex) +TransformShapesBox::MakeCommand(const char* commandName) { Transformable* objects[fCount]; for (int32 i = 0; i < fCount; i++) @@ -143,7 +143,6 @@ TransformShapesBox::MakeCommand(const char* commandName, uint32 nameIndex) LocalXScale(), LocalYScale(), - commandName, - nameIndex); + commandName); } diff --git a/src/apps/icon-o-matic/transformable/TransformShapesBox.h b/src/apps/icon-o-matic/transformable/TransformShapesBox.h index 5544cc9633..bfd0fe57a7 100644 --- a/src/apps/icon-o-matic/transformable/TransformShapesBox.h +++ b/src/apps/icon-o-matic/transformable/TransformShapesBox.h @@ -33,8 +33,7 @@ class TransformShapesBox : public CanvasTransformBox { // TransformBox interface virtual void Update(bool deep = true); - virtual TransformCommand* MakeCommand(const char* actionName, - uint32 nameIndex); + virtual TransformCommand* MakeCommand(const char* actionName); // TransformShapesBox Shape** Shapes() const