SGITranslator: style fixes for SGIView
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
#include "SGIView.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -46,13 +49,14 @@
|
||||
|
||||
#include "SGIImage.h"
|
||||
#include "SGITranslator.h"
|
||||
#include "SGIView.h"
|
||||
|
||||
|
||||
const char* author = "Stephan Aßmus, <[email protected]>";
|
||||
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "SGIView"
|
||||
|
||||
|
||||
// add_menu_item
|
||||
void
|
||||
add_menu_item(BMenu* menu,
|
||||
@@ -67,19 +71,7 @@ add_menu_item(BMenu* menu,
|
||||
menu->AddItem(item);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Constructor
|
||||
//
|
||||
// Sets up the view settings
|
||||
//
|
||||
// Preconditions:
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// Postconditions:
|
||||
//
|
||||
// Returns:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings)
|
||||
:
|
||||
BView(name, flags, new BGroupLayout(B_VERTICAL)),
|
||||
@@ -144,8 +136,8 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings)
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(
|
||||
BSize((font.Size() * 390) / 12, (font.Size() * 180) / 12));
|
||||
SetExplicitPreferredSize(BSize((font.Size() * 390) / 12,
|
||||
(font.Size() * 180) / 12));
|
||||
|
||||
// TODO: remove this workaround for ticket #4217
|
||||
infoView->SetExplicitPreferredSize(
|
||||
@@ -155,37 +147,19 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings)
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Destructor
|
||||
//
|
||||
// Does nothing
|
||||
//
|
||||
// Preconditions:
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// Postconditions:
|
||||
//
|
||||
// Returns:
|
||||
// ---------------------------------------------------------------
|
||||
SGIView::~SGIView()
|
||||
{
|
||||
fSettings->Release();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// MessageReceived
|
||||
//
|
||||
// Handles state changes of the Compression menu field
|
||||
//
|
||||
// Preconditions:
|
||||
//
|
||||
// Parameters: area, not used
|
||||
//
|
||||
// Postconditions:
|
||||
//
|
||||
// Returns:
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
void
|
||||
SGIView::AllAttached()
|
||||
{
|
||||
fCompressionMF->Menu()->SetTargetForItems(this);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SGIView::MessageReceived(BMessage* message)
|
||||
{
|
||||
@@ -203,23 +177,3 @@ SGIView::MessageReceived(BMessage* message)
|
||||
BView::MessageReceived(message);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// AllAttached
|
||||
//
|
||||
// sets the target for the controls controlling the configuration
|
||||
//
|
||||
// Preconditions:
|
||||
//
|
||||
// Parameters: area, not used
|
||||
//
|
||||
// Postconditions:
|
||||
//
|
||||
// Returns:
|
||||
// ---------------------------------------------------------------
|
||||
void
|
||||
SGIView::AllAttached()
|
||||
{
|
||||
fCompressionMF->Menu()->SetTargetForItems(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,15 +29,17 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef SGIVIEW_H
|
||||
#define SGIVIEW_H
|
||||
|
||||
|
||||
#include <View.h>
|
||||
#include "TranslatorSettings.h"
|
||||
|
||||
|
||||
class BMenuField;
|
||||
|
||||
|
||||
class SGIView : public BView {
|
||||
public:
|
||||
SGIView(const char* name, uint32 flags, TranslatorSettings* settings);
|
||||
@@ -57,8 +59,8 @@ private:
|
||||
BMenuField* fCompressionMF;
|
||||
|
||||
TranslatorSettings* fSettings;
|
||||
// the actual settings for the translator,
|
||||
// shared with the translator
|
||||
// the actual settings for the translator, shared with the translator
|
||||
};
|
||||
|
||||
|
||||
#endif // #ifndef SGIVIEW_H
|
||||
|
||||
Reference in New Issue
Block a user