mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Package menu now has got New File option
git-svn-id: svn://ultimatepp.org/upp/trunk@9889 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
79c2705672
commit
11d4fad8b6
4 changed files with 28 additions and 7 deletions
|
|
@ -341,7 +341,9 @@ struct WorkspaceWork {
|
|||
|
||||
void DnDInsert(int line, PasteClip& d);
|
||||
void Drag();
|
||||
|
||||
|
||||
void NewPackageFile();
|
||||
|
||||
enum ADDFILE { PACKAGE_FILE, OUTPUT_FILE, HOME_FILE, LOCAL_FILE, CONFIG_FILE, ANY_FILE };
|
||||
void AddFile(ADDFILE type);
|
||||
void AddItem(const String& name, bool separator, bool readonly);
|
||||
|
|
@ -375,6 +377,7 @@ struct WorkspaceWork {
|
|||
|
||||
void PackageMenu(Bar& bar);
|
||||
void FileMenu(Bar& bar);
|
||||
void NewMenu(Bar& bar);
|
||||
void SpecialFileMenu(Bar& bar);
|
||||
void InsertSpecialMenu(Bar& menu);
|
||||
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ void WorkspaceWork::AddSeparator()
|
|||
String active = GetActivePackage();
|
||||
if(active.IsEmpty()) return;
|
||||
String name;
|
||||
if(!EditText(name, "Insert separator", "Name"))
|
||||
if(!EditText(name, "Add separator", "Name"))
|
||||
return;
|
||||
AddItem(~name, true, true);
|
||||
}
|
||||
|
|
@ -858,6 +858,10 @@ void WorkspaceWork::OpenPackageFolder()
|
|||
void WorkspaceWork::FileMenu(Bar& menu)
|
||||
{
|
||||
bool sel = filelist.IsCursor() && filelist[filelist.GetCursor()].isdir;
|
||||
|
||||
menu.Add("New", THISBACK(NewMenu));
|
||||
menu.Separator();
|
||||
|
||||
bool isaux = IsAux();
|
||||
if(isaux)
|
||||
InsertSpecialMenu(menu);
|
||||
|
|
@ -868,8 +872,6 @@ void WorkspaceWork::FileMenu(Bar& menu)
|
|||
menu.Add("Special", THISBACK(SpecialFileMenu))
|
||||
.Help("Less frequently used methods of adding files to the package");
|
||||
}
|
||||
menu.Add("Insert separator", THISBACK(AddSeparator))
|
||||
.Help("Insert text separator line");
|
||||
menu.Separator();
|
||||
if(!organizer) {
|
||||
if(sel)
|
||||
|
|
@ -918,6 +920,13 @@ void WorkspaceWork::FileMenu(Bar& menu)
|
|||
FilePropertiesMenu(menu);
|
||||
}
|
||||
|
||||
void WorkspaceWork::NewMenu(Bar& bar)
|
||||
{
|
||||
bar.Add("File", CtrlImg::File(), THISBACK(NewPackageFile));
|
||||
bar.Add("Separator", THISBACK(AddSeparator))
|
||||
.Help("Add text separator line");
|
||||
}
|
||||
|
||||
void WorkspaceWork::TogglePCH()
|
||||
{
|
||||
if(IsActiveFile()) {
|
||||
|
|
|
|||
|
|
@ -779,10 +779,10 @@ LAYOUT(SelectAndroidDeviceLayout, 432, 228)
|
|||
ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(72, 64).BottomPosZ(4, 24))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(RenamePackageLayout, 228, 100)
|
||||
LAYOUT(RenamePackageLayout, 236, 120)
|
||||
ITEM(Label, dv___0, SetLabel(t_("Package name")).LeftPosZ(4, 84).TopPosZ(4, 21))
|
||||
ITEM(Label, dv___1, SetLabel(t_("\001[g [/ Warning:] [* Package will only be renamed&in packages of current workspace!")).LeftPosZ(4, 216).TopPosZ(28, 32))
|
||||
ITEM(EditString, name, LeftPosZ(92, 128).TopPosZ(4, 19))
|
||||
ITEM(Label, dv___1, SetLabel(t_("\001[g [/ Warning:] [* Package will only be renamed&in packages of current workspace!")).HSizePosZ(4, 8).VSizePosZ(28, 40))
|
||||
ITEM(EditString, name, HSizePosZ(92, 8).TopPosZ(4, 19))
|
||||
ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(76, 64).BottomPosZ(8, 24))
|
||||
ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(8, 64).BottomPosZ(8, 24))
|
||||
END_LAYOUT
|
||||
|
|
@ -795,3 +795,11 @@ LAYOUT(RenamePackage2Layout, 228, 100)
|
|||
ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(8, 64).BottomPosZ(8, 24))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(NewPackageFileLayout, 372, 108)
|
||||
ITEM(Label, dv___0, SetLabel(t_("File name:")).LeftPosZ(4, 68).TopPosZ(4, 21))
|
||||
ITEM(EditString, fileName, HSizePosZ(80, 4).TopPosZ(4, 19))
|
||||
ITEM(RichTextView, info, Background(Null).AutoHideSb(true).SetFrame(TopSeparatorFrame()).HSizePosZ(4, 4).VSizePosZ(32, 40))
|
||||
ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(76, 64).BottomPosZ(8, 24))
|
||||
ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(8, 64).BottomPosZ(8, 24))
|
||||
END_LAYOUT
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ file
|
|||
BaseDlg.cpp,
|
||||
SelectPkg.cpp,
|
||||
UppWspc.cpp,
|
||||
NewPackageFile.cpp,
|
||||
UppDlg.cpp,
|
||||
Template.cpp,
|
||||
ide.key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue