Automatic whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35597 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -164,8 +164,8 @@ TermWindow::TermWindow(BRect frame, const char* title, Arguments *args)
|
|||||||
TermWindow::~TermWindow()
|
TermWindow::~TermWindow()
|
||||||
{
|
{
|
||||||
if (fPrefWindow)
|
if (fPrefWindow)
|
||||||
fPrefWindow->PostMessage(B_QUIT_REQUESTED);
|
fPrefWindow->PostMessage(B_QUIT_REQUESTED);
|
||||||
|
|
||||||
if (fFindPanel && fFindPanel->Lock()) {
|
if (fFindPanel && fFindPanel->Lock()) {
|
||||||
fFindPanel->Quit();
|
fFindPanel->Quit();
|
||||||
fFindPanel = NULL;
|
fFindPanel = NULL;
|
||||||
@@ -230,7 +230,7 @@ void
|
|||||||
TermWindow::MenusBeginning()
|
TermWindow::MenusBeginning()
|
||||||
{
|
{
|
||||||
TermView *view = _ActiveTermView();
|
TermView *view = _ActiveTermView();
|
||||||
|
|
||||||
// Syncronize Encode Menu Pop-up menu and Preference.
|
// Syncronize Encode Menu Pop-up menu and Preference.
|
||||||
BMenuItem *item = fEncodingmenu->FindItem(
|
BMenuItem *item = fEncodingmenu->FindItem(
|
||||||
EncodingAsString(view->Encoding()));
|
EncodingAsString(view->Encoding()));
|
||||||
@@ -256,7 +256,7 @@ TermWindow::_MakeEncodingMenu()
|
|||||||
BMenu *menu = new (std::nothrow) BMenu("Text encoding");
|
BMenu *menu = new (std::nothrow) BMenu("Text encoding");
|
||||||
if (menu == NULL)
|
if (menu == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
int encoding;
|
int encoding;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (get_next_encoding(i, &encoding) == B_OK) {
|
while (get_next_encoding(i, &encoding) == B_OK) {
|
||||||
@@ -268,9 +268,9 @@ TermWindow::_MakeEncodingMenu()
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->SetRadioMode(true);
|
menu->SetRadioMode(true);
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,12 +363,12 @@ TermWindow::_GetPreferredFont(BFont &font)
|
|||||||
{
|
{
|
||||||
// Default to be_fixed_font
|
// Default to be_fixed_font
|
||||||
font = be_fixed_font;
|
font = be_fixed_font;
|
||||||
|
|
||||||
const char *family = PrefHandler::Default()->getString(PREF_HALF_FONT_FAMILY);
|
const char *family = PrefHandler::Default()->getString(PREF_HALF_FONT_FAMILY);
|
||||||
const char *style = PrefHandler::Default()->getString(PREF_HALF_FONT_STYLE);
|
const char *style = PrefHandler::Default()->getString(PREF_HALF_FONT_STYLE);
|
||||||
|
|
||||||
font.SetFamilyAndStyle(family, style);
|
font.SetFamilyAndStyle(family, style);
|
||||||
|
|
||||||
float size = PrefHandler::Default()->getFloat(PREF_HALF_FONT_SIZE);
|
float size = PrefHandler::Default()->getFloat(PREF_HALF_FONT_SIZE);
|
||||||
if (size < 6.0f)
|
if (size < 6.0f)
|
||||||
size = 6.0f;
|
size = 6.0f;
|
||||||
@@ -633,10 +633,10 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
index = _IndexOfTermView(termView);
|
index = _IndexOfTermView(termView);
|
||||||
else
|
else
|
||||||
index = _IndexOfTermView(_ActiveTermView());
|
index = _IndexOfTermView(_ActiveTermView());
|
||||||
|
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
_RemoveTab(index);
|
_RemoveTab(index);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,7 +835,7 @@ TermWindow::_AddTab(Arguments *args)
|
|||||||
} catch (...) {
|
} catch (...) {
|
||||||
// most probably out of memory. That's bad.
|
// most probably out of memory. That's bad.
|
||||||
// TODO: Should cleanup, I guess
|
// TODO: Should cleanup, I guess
|
||||||
|
|
||||||
// Quit the application if we don't have a shell already
|
// Quit the application if we don't have a shell already
|
||||||
if (fTabView->CountTabs() == 0) {
|
if (fTabView->CountTabs() == 0) {
|
||||||
fprintf(stderr, "Terminal couldn't open a shell\n");
|
fprintf(stderr, "Terminal couldn't open a shell\n");
|
||||||
@@ -936,7 +936,7 @@ void
|
|||||||
TermWindow::FrameResized(float newWidth, float newHeight)
|
TermWindow::FrameResized(float newWidth, float newHeight)
|
||||||
{
|
{
|
||||||
BWindow::FrameResized(newWidth, newHeight);
|
BWindow::FrameResized(newWidth, newHeight);
|
||||||
|
|
||||||
TermView *view = _ActiveTermView();
|
TermView *view = _ActiveTermView();
|
||||||
PrefHandler::Default()->setInt32(PREF_COLS, view->Columns());
|
PrefHandler::Default()->setInt32(PREF_COLS, view->Columns());
|
||||||
PrefHandler::Default()->setInt32(PREF_ROWS, view->Rows());
|
PrefHandler::Default()->setInt32(PREF_ROWS, view->Rows());
|
||||||
@@ -979,14 +979,14 @@ TermWindow::_MakeWindowSizeMenu()
|
|||||||
BMenu *menu = new (std::nothrow) BMenu("Window size");
|
BMenu *menu = new (std::nothrow) BMenu("Window size");
|
||||||
if (menu == NULL)
|
if (menu == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
const int32 windowSizes[4][2] = {
|
const int32 windowSizes[4][2] = {
|
||||||
{ 80, 25 },
|
{ 80, 25 },
|
||||||
{ 80, 40 },
|
{ 80, 40 },
|
||||||
{ 132, 25 },
|
{ 132, 25 },
|
||||||
{ 132, 40 }
|
{ 132, 40 }
|
||||||
};
|
};
|
||||||
|
|
||||||
const int32 sizeNum = sizeof(windowSizes) / sizeof(windowSizes[0]);
|
const int32 sizeNum = sizeof(windowSizes) / sizeof(windowSizes[0]);
|
||||||
for (int32 i = 0; i < sizeNum; i++) {
|
for (int32 i = 0; i < sizeNum; i++) {
|
||||||
char label[32];
|
char label[32];
|
||||||
@@ -1002,7 +1002,7 @@ TermWindow::_MakeWindowSizeMenu()
|
|||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
menu->AddItem(new BMenuItem("Full screen", new BMessage(FULLSCREEN),
|
menu->AddItem(new BMenuItem("Full screen", new BMessage(FULLSCREEN),
|
||||||
B_ENTER));
|
B_ENTER));
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user