patch from [Beta]

additionally: corner debug output removed unless DEBUG is defined


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13116 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2005-06-14 13:47:14 +00:00
parent 494301a5aa
commit aa486def43
2 changed files with 16 additions and 15 deletions

View File

@ -5,6 +5,7 @@
*/ */
#include <Application.h> #include <Application.h>
#include <Debug.h>
#include <FindDirectory.h> #include <FindDirectory.h>
#include <File.h> #include <File.h>
#include <Path.h> #include <Path.h>
@ -54,7 +55,7 @@ DataTranslationsSettings::~DataTranslationsSettings()
if (file.InitCheck() == B_OK) { if (file.InitCheck() == B_OK) {
file.Seek(-8,SEEK_END); // Skip over the first 497 bytes to just the window file.Seek(-8,SEEK_END); // Skip over the first 497 bytes to just the window
// position. // position.
fCorner.PrintToStream(); PRINT_OBJECT(fCorner);
file.Write(&fCorner, sizeof(BPoint)); file.Write(&fCorner, sizeof(BPoint));
} }
} }

View File

@ -16,7 +16,7 @@
DataTranslationsWindow::DataTranslationsWindow() DataTranslationsWindow::DataTranslationsWindow()
: BWindow(BRect(0, 0, DTW_RIGHT, DTW_BOTTOM), : BWindow(BRect(0, 0, DTW_RIGHT, DTW_BOTTOM),
"DataTranslations", B_TITLED_WINDOW, B_NOT_ZOOMABLE) "DataTranslations", B_TITLED_WINDOW, B_NOT_ZOOMABLE|B_NOT_RESIZABLE)
{ {
MoveTo(dynamic_cast<DataTranslationsApplication *>(be_app)->WindowCorner()); MoveTo(dynamic_cast<DataTranslationsApplication *>(be_app)->WindowCorner());
@ -163,8 +163,8 @@ void
DataTranslationsWindow::SetupViews() DataTranslationsWindow::SetupViews()
{ {
fConfigView = NULL; fConfigView = NULL;
// This is NULL until a translator is // This is NULL until a translator is
// selected from the listview // selected from the listview
// Window box // Window box
BBox *mainBox = new BBox(BRect(0, 0, DTW_RIGHT, DTW_BOTTOM), BBox *mainBox = new BBox(BRect(0, 0, DTW_RIGHT, DTW_BOTTOM),
@ -194,11 +194,11 @@ DataTranslationsWindow::SetupViews()
B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE); B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);
fRightBox->AddChild(button); fRightBox->AddChild(button);
// Add the translator name view // Add the translator name view
BRect tranNameRect(iconRect.right + 5, iconRect.top, BRect tranNameRect(iconRect.right + 5, iconRect.top,
infoRect.left - 5, iconRect.bottom); infoRect.left - 5, iconRect.bottom);
fTranNameView = new BStringView(tranNameRect, "TranName", "None", fTranNameView = new BStringView(tranNameRect, "TranName", "None",
B_FOLLOW_LEFT | B_FOLLOW_BOTTOM); B_FOLLOW_LEFT | B_FOLLOW_V_CENTER);
fRightBox->AddChild(fTranNameView); fRightBox->AddChild(fTranNameView);
// Add the translators list view // Add the translators list view
@ -206,19 +206,19 @@ DataTranslationsWindow::SetupViews()
"TransList", B_SINGLE_SELECTION_LIST); "TransList", B_SINGLE_SELECTION_LIST);
fTranListView->SetSelectionMessage(new BMessage(SEL_CHANGE)); fTranListView->SetSelectionMessage(new BMessage(SEL_CHANGE));
BScrollView *scrollView = new BScrollView("scroll_trans", fTranListView, BScrollView *scrollView = new BScrollView("scroll_trans", fTranListView,
B_FOLLOW_LEFT | B_FOLLOW_TOP_BOTTOM, B_WILL_DRAW | B_FRAME_EVENTS, B_FOLLOW_LEFT | B_FOLLOW_TOP_BOTTOM, B_WILL_DRAW | B_FRAME_EVENTS,
false, true, B_FANCY_BORDER); false, true, B_FANCY_BORDER);
mainBox->AddChild(scrollView); mainBox->AddChild(scrollView);
// Populate the translators list view // Populate the translators list view
PopulateListView(); PopulateListView();
// Set the focus // Set the focus
fTranListView->MakeFocus(); fTranListView->MakeFocus();
// Select the first Translator in list // Select the first Translator in list
fTranListView->Select(0, false); fTranListView->Select(0, false);
} }
bool bool
@ -246,7 +246,7 @@ DataTranslationsWindow::MessageReceived(BMessage *message)
if (selected < 0) { if (selected < 0) {
// If no translator is selected, show a message explaining // If no translator is selected, show a message explaining
// what the config panel is for // what the config panel is for
(new BAlert("yo!", (new BAlert("Panel Info",
"Translation Settings\n\n" "Translation Settings\n\n"
"Use this control panel to set values that various\n" "Use this control panel to set values that various\n"
"translators use when no other settings are specified\n" "translators use when no other settings are specified\n"
@ -271,7 +271,7 @@ DataTranslationsWindow::MessageReceived(BMessage *message)
strInfoMsg << "\nInfo: " << tranInfo << strInfoMsg << "\nInfo: " << tranInfo <<
"\nPath: " << tranPath.Path() << "\n"; "\nPath: " << tranPath.Path() << "\n";
(new BAlert("yo!", strInfoMsg.String(), "OK"))->Go(); (new BAlert("Panel Info", strInfoMsg.String(), "OK"))->Go();
break; break;
case SEL_CHANGE: case SEL_CHANGE: