summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-01 12:34:02 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-01 12:36:07 +0200
commitd4de6b17ae95af88922817d84d7bd16421f2111a (patch)
treeb433461a8efd54a89d99aa685fb0b98e83786459
parentcf2ba4e5e0ff0ed49b4f1271c8acc27cbde4ee2e (diff)
downloadfpGUI-d4de6b17ae95af88922817d84d7bd16421f2111a.tar.xz
uidesigner: Improved the naming of the menu items and tooltips
It seems the previous captions sometimes cause confusion as to what action will be applied.
-rw-r--r--uidesigner/newformdesigner.pas27
-rw-r--r--uidesigner/vfdmain.pas2
2 files changed, 22 insertions, 7 deletions
diff --git a/uidesigner/newformdesigner.pas b/uidesigner/newformdesigner.pas
index c20548e5..a9aca6b8 100644
--- a/uidesigner/newformdesigner.pas
+++ b/uidesigner/newformdesigner.pas
@@ -190,6 +190,7 @@ begin
Name := 'frmAbout';
SetPosition(378, 267, 276, 180);
WindowTitle := 'Product Information...';
+ Hint := '';
Sizeable := False;
WindowPosition := wpScreenCenter;
@@ -221,6 +222,7 @@ begin
SetPosition(194, 148, 75, 24);
Anchors := [anRight,anBottom];
Text := 'Close';
+ Down := False;
FontDesc := '#Label1';
Hint := '';
ImageName := 'stdimg.close';
@@ -285,12 +287,14 @@ var
x, y: integer;
wgc: TVFDWidgetClass;
btn: TwgPaletteButton;
+ mi: TfpgMenuItem;
begin
{%region 'Auto-generated GUI code' -fold}
{@VFD_BODY_BEGIN: frmMain}
Name := 'frmMain';
- SetPosition(84, 123, 754, 92);
+ SetPosition(338, 140, 754, 92);
WindowTitle := 'frmMain';
+ Hint := '';
ShowHint := True;
WindowPosition := wpUser;
MinHeight := 82;
@@ -310,10 +314,12 @@ begin
Name := 'btnNewForm';
SetPosition(4, 28, 25, 24);
Text := '';
+ Down := False;
FontDesc := '#Label1';
- Hint := 'Create a new form';
+ Hint := 'Add New Form to Unit';
ImageMargin := -1;
ImageName := 'vfd.newform';
+ ImageSpacing := 0;
TabOrder := 1;
Focusable := False;
OnClick := @(maindsgn.OnNewForm);
@@ -325,10 +331,12 @@ begin
Name := 'btnOpen';
SetPosition(30, 28, 25, 24);
Text := '';
+ Down := False;
FontDesc := '#Label1';
Hint := 'Open a file';
ImageMargin := -1;
ImageName := 'stdimg.open';
+ ImageSpacing := 0;
TabOrder := 2;
Focusable := False;
OnClick := @(maindsgn.OnLoadFile);
@@ -340,12 +348,15 @@ begin
Name := 'btnSave';
SetPosition(56, 28, 25, 24);
Text := '';
+ Down := False;
FontDesc := '#Label1';
Hint := 'Save the current form design';
ImageMargin := -1;
ImageName := 'stdimg.save';
+ ImageSpacing := 0;
TabOrder := 3;
Focusable := False;
+ Tag := 10;
OnClick := @(maindsgn.OnSaveFile);
end;
@@ -367,6 +378,7 @@ begin
SetPosition(4, 67, 144, 22);
Anchors := [anLeft,anBottom];
FontDesc := '#List';
+ Hint := '';
Items.Add('-');
TabOrder := 5;
FocusItem := 0;
@@ -377,12 +389,15 @@ begin
begin
Name := 'filemenu';
SetPosition(464, 64, 120, 20);
- AddMenuItem('New', '', @(maindsgn.OnNewFile));
- AddMenuItem('Open', '', @(maindsgn.OnLoadFile));
+ AddMenuItem('Create New File...', '', @(maindsgn.OnNewFile));
+ AddMenuItem('Open...', '', @(maindsgn.OnLoadFile));
FFileOpenRecent := AddMenuItem('Open Recent...', '', nil);
- AddMenuItem('Save As...', '', @(maindsgn.OnSaveFile));
AddMenuItem('-', '', nil);
- AddMenuItem('New Form...', '', @(maindsgn.OnNewForm));
+ mi := AddMenuItem('Save', '', @(maindsgn.OnSaveFile));
+ mi.Tag := 10;
+ AddMenuItem('Save As New Template Unit...', '', @(maindsgn.OnSaveFile));
+ AddMenuItem('-', '', nil);
+ AddMenuItem('Add New Form to Unit...', '', @(maindsgn.OnNewForm));
AddMenuItem('-', '', nil);
AddMenuItem('Exit', '', @(maindsgn.OnExit));
end;
diff --git a/uidesigner/vfdmain.pas b/uidesigner/vfdmain.pas
index 234b40df..60837d88 100644
--- a/uidesigner/vfdmain.pas
+++ b/uidesigner/vfdmain.pas
@@ -179,7 +179,7 @@ var
begin
fname := EditedFileName;
- if ((Sender as TComponent).Name = 'btnSave')
+ if ((Sender as TComponent).Tag = 10)
and (EditedFileName <> '') then
fname := EditedFileName
else