Terminal: Added "Save as defaults" back.
* It's still convenient to have. * Furthermore, the distinction between when settings are stored is hard to grasp otherwise. * Plus, adopting the current window size is now much more straight forward.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2013, Haiku.
|
* Copyright 2001-2015, Haiku.
|
||||||
* Copyright (c) 2003-4 Kian Duffy <[email protected]>
|
* Copyright (c) 2003-4 Kian Duffy <[email protected]>
|
||||||
* Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
* Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
||||||
*
|
*
|
||||||
@@ -71,6 +71,7 @@ static const uint32 ONETHREETWOTWENTYFIVE = 'hunv';
|
|||||||
static const uint32 FULLSCREEN = 'fscr';
|
static const uint32 FULLSCREEN = 'fscr';
|
||||||
|
|
||||||
static const uint32 MSG_FONT_CHANGED = 'fntc';
|
static const uint32 MSG_FONT_CHANGED = 'fntc';
|
||||||
|
static const uint32 MSG_SAVE_AS_DEFAULT = 'sadf';
|
||||||
static const uint32 MSG_CHECK_CHILDREN = 'ckch';
|
static const uint32 MSG_CHECK_CHILDREN = 'ckch';
|
||||||
static const uint32 MSG_REMOVE_RESIZE_VIEW_IF_NEEDED = 'rmrv';
|
static const uint32 MSG_REMOVE_RESIZE_VIEW_IF_NEEDED = 'rmrv';
|
||||||
static const uint32 MSG_TERMINAL_BUFFER_CHANGED = 'bufc';
|
static const uint32 MSG_TERMINAL_BUFFER_CHANGED = 'bufc';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2007-2013, Haiku, Inc. All rights reserved.
|
* Copyright 2007-2015, Haiku, Inc. All rights reserved.
|
||||||
* Copyright (c) 2004 Daniel Furrer <[email protected]>
|
* Copyright (c) 2004 Daniel Furrer <[email protected]>
|
||||||
* Copyright (c) 2003-2004 Kian Duffy <[email protected]>
|
* Copyright (c) 2003-2004 Kian Duffy <[email protected]>
|
||||||
* Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
* Copyright (C) 1998,99 Kazuho Okui and Takashi Murai.
|
||||||
@@ -523,10 +523,10 @@ TermWindow::_SetupMenu()
|
|||||||
.AddItem(windowSize)
|
.AddItem(windowSize)
|
||||||
.AddItem(fEncodingMenu)
|
.AddItem(fEncodingMenu)
|
||||||
.AddItem(fFontSizeMenu)
|
.AddItem(fFontSizeMenu)
|
||||||
|
.AddItem(B_TRANSLATE("Save as default"), MSG_SAVE_AS_DEFAULT)
|
||||||
.AddSeparator()
|
.AddSeparator()
|
||||||
.AddItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS), MENU_PREF_OPEN)
|
.AddItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS), MENU_PREF_OPEN)
|
||||||
.End()
|
.End();
|
||||||
;
|
|
||||||
|
|
||||||
AddChild(fMenuBar);
|
AddChild(fMenuBar);
|
||||||
|
|
||||||
@@ -935,6 +935,15 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
_ActiveTermView()->Invalidate();
|
_ActiveTermView()->Invalidate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MSG_SAVE_AS_DEFAULT:
|
||||||
|
{
|
||||||
|
BPath path;
|
||||||
|
if (PrefHandler::GetDefaultPath(path) == B_OK) {
|
||||||
|
PrefHandler::Default()->SaveAsText(path.Path(),
|
||||||
|
PREFFILE_MIMETYPE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case MENU_PAGE_SETUP:
|
case MENU_PAGE_SETUP:
|
||||||
_DoPageSetup();
|
_DoPageSetup();
|
||||||
|
|||||||
Reference in New Issue
Block a user