added a "Save as default" menu item in Terminal, helps on bug #42
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16495 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -94,6 +94,8 @@ const uint32 ONETHREETWOTWENTYFIVE = 'hunv';
|
||||
|
||||
const uint32 MSG_FONT_CHANGED = 'fntc';
|
||||
|
||||
const uint32 SAVE_AS_DEFAULT = 'sadf';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Preference Read/Write Keys
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -5,38 +5,37 @@
|
||||
*
|
||||
* Distributed unter the terms of the MIT license.
|
||||
*/
|
||||
#include <app/Application.h>
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
#include <Menu.h>
|
||||
#include <MenuBar.h>
|
||||
#include <MenuItem.h>
|
||||
#include <Path.h>
|
||||
#include <PrintJob.h>
|
||||
#include <PropertyInfo.h>
|
||||
#include <ScrollBar.h>
|
||||
#include <TextControl.h>
|
||||
#include <PrintJob.h>
|
||||
#include <Alert.h>
|
||||
#include <float.h>
|
||||
#include <WindowScreen.h>
|
||||
#include <PropertyInfo.h>
|
||||
|
||||
#include <float.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/time.h>
|
||||
#include <string>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#include "TermApp.h"
|
||||
#include "TermParse.h"
|
||||
#include "TermWindow.h"
|
||||
#include "TermView.h"
|
||||
#include "TermBuffer.h"
|
||||
#include "TermBaseView.h"
|
||||
#include "CodeConv.h"
|
||||
#include "TermConst.h"
|
||||
#include "ColorWindow.h"
|
||||
#include "MenuUtil.h"
|
||||
#include "PrefDlg.h"
|
||||
#include "PrefView.h"
|
||||
#include "PrefHandler.h"
|
||||
#include "MenuUtil.h"
|
||||
#include "TermApp.h"
|
||||
#include "TermBaseView.h"
|
||||
#include "TermBuffer.h"
|
||||
#include "TermParse.h"
|
||||
#include "TermView.h"
|
||||
#include "TermWindow.h"
|
||||
#include "TermConst.h"
|
||||
#include "spawn.h"
|
||||
#include "ColorWindow.h"
|
||||
|
||||
|
||||
// Global Preference Handler
|
||||
@@ -260,6 +259,8 @@ TermWindow::SetupMenu(void)
|
||||
// fHelpmenu->AddItem(fNewFontMenu);
|
||||
fHelpmenu->AddSeparatorItem();
|
||||
fHelpmenu->AddItem(new BMenuItem("Preferences", new BMessage(MENU_PREF_OPEN)));
|
||||
fHelpmenu->AddSeparatorItem();
|
||||
fHelpmenu->AddItem(new BMenuItem("Save as default", new BMessage(SAVE_AS_DEFAULT)));
|
||||
fMenubar->AddItem(fHelpmenu);
|
||||
|
||||
AddChild(fMenubar);
|
||||
@@ -442,7 +443,13 @@ TermWindow::MessageReceived(BMessage *message)
|
||||
fBaseView->Invalidate();
|
||||
fTermView->Invalidate();
|
||||
break;
|
||||
|
||||
case SAVE_AS_DEFAULT:
|
||||
{
|
||||
BPath path;
|
||||
if (PrefHandler::GetDefaultPath(path) == B_OK)
|
||||
gTermPref->SaveAsText(path.Path(), PREFFILE_MIMETYPE);
|
||||
}
|
||||
break;
|
||||
case MENU_PAGE_SETUP:
|
||||
DoPageSetup ();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user