Skip to content

Commit

Permalink
Added option in Extra Settings to enable/disable menu "Edited" and co…
Browse files Browse the repository at this point in the history
…mpilers commands for edited source only (the Geany way). Option is disable by default.
  • Loading branch information
fredvs committed Dec 25, 2022
1 parent 0b944d7 commit 69b8e20
Show file tree
Hide file tree
Showing 6 changed files with 966 additions and 899 deletions.
25 changes: 22 additions & 3 deletions src/confideu.mfm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ object confideufo: tconfideufo
taborder = 1
hint = 'Use the mse universal directory layout'
bounds_x = 8
bounds_y = 30
bounds_y = 21
bounds_cx = 170
bounds_cy = 17
statfile = mainfo.mainstatfile
Expand Down Expand Up @@ -390,7 +390,7 @@ object confideufo: tconfideufo
)
taborder = 9
hint = 'Blinking caret on-off'
bounds_x = 7
bounds_x = 8
bounds_y = 85
bounds_cx = 99
bounds_cy = 17
Expand Down Expand Up @@ -431,7 +431,7 @@ object confideufo: tconfideufo
)
taborder = 11
hint = 'Add space after comma when auto-parsing MSEgui code from designer'
bounds_x = 11
bounds_x = 8
bounds_y = 322
bounds_cx = 255
bounds_cy = 17
Expand Down Expand Up @@ -460,6 +460,25 @@ object confideufo: tconfideufo
value = True
valuedefault = True
end
object enableedited: tbooleanedit
frame.caption = 'Edited source only compilable'
frame.localprops = []
frame.localprops1 = []
frame.template = mainfo.menuitemframe
frame.outerframe = (
0
2
184
2
)
taborder = 13
hint = 'Enable compilation only of edited sourced'
bounds_x = 8
bounds_y = 42
bounds_cx = 197
bounds_cy = 17
statfile = mainfo.mainstatfile
end
end
object group_sourceeditor: tgroupbox
optionswidget1 = []
Expand Down
46 changes: 36 additions & 10 deletions src/confideu.pas
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ tconfideufo = class(tmseform)
editfontheightsrc: tintegeredit;
editfontnamesrc: tdropdownlistedit;
autoheight: tbooleanedit;
enableedited: tbooleanedit;
procedure zorderhandle(const Sender: TObject);
procedure epandfilenamemacro(const Sender: TObject; var avalue: msestring; var accept: Boolean);

Expand All @@ -75,7 +76,8 @@ tconfideufo = class(tmseform)
procedure oncreated(const Sender: TObject);
procedure setlangextrasettings();
procedure confideuresize ;
procedure onshow(const sender: TObject);
procedure onshow(const sender: TObject);
procedure seteditedenable();
end;

var
Expand Down Expand Up @@ -278,7 +280,10 @@ procedure tconfideufo.confideuresize ;
group_file_change.Height + 10;

universal_path.top := universal_path.Height + 2;
doubleclic.top := universal_path.top + universal_path.Height + 2;

enableedited.top := universal_path.top + universal_path.Height + 2;

doubleclic.top := enableedited.top + enableedited.Height + 2;
blinkcaret.top := doubleclic.top + doubleclic.Height + 2;

fullpath.top := blinkcaret.top + blinkcaret.Height + 2;
Expand Down Expand Up @@ -374,13 +379,36 @@ procedure tconfideufo.confideuresize ;

Width := group_sourceeditor.left + group_assistive.Width + round(40 * ratio);

//dialogfilesfo.selected_file.frame.font.height := fontsize.value;
//group_file_change.width := group_sourceeditor.width;

invalidate;

left := (rect1.cx - Width) div 2;
end;

procedure tconfideufo.seteditedenable();
begin
debuggerfo.edit_compiler.visible := enableedited.value;

debuggerfo.edit_compilernum.visible := enableedited.value;

debuggerfo.edit_options.visible := enableedited.value;

debuggerfo.edited_make.visible := enableedited.value;

debuggerfo.edited_abort.visible := enableedited.value;

debuggerfo.edited_run.visible := enableedited.value;

if enableedited.value then
begin
debuggerfo.paneledited.Width := debuggerfo.edited_run.right + 4;
mainfo.mainmenu1.menu.itembynames(['edited']).visible := true;
end else
begin
debuggerfo.paneledited.Width := debuggerfo.procedure_list.right + 4;
mainfo.mainmenu1.menu.itembynames(['edited']).visible := false;
end;

end;

procedure tconfideufo.scalecommander(ratio : double);
begin
Expand Down Expand Up @@ -497,7 +525,6 @@ procedure tconfideufo.scalecommander(ratio : double);

debuggerfo.panelproject.Width := debuggerfo.project_reset.right + 4;


debuggerfo.paneledited.Height := debuggerfo.panelmain.Height;
debuggerfo.paneledited.left := debuggerfo.panelproject.right + 2;

Expand Down Expand Up @@ -552,13 +579,12 @@ procedure tconfideufo.scalecommander(ratio : double);
debuggerfo.edited_run.Height := debuggerfo.assistive.Height;
debuggerfo.edited_run.Width := debuggerfo.assistive.Height;
debuggerfo.edited_run.left := debuggerfo.edited_abort.right + 2;


seteditedenable();

debuggerfo.panelproject.Height := debuggerfo.panelmain.Height;
debuggerfo.panelproject.left := debuggerfo.panelmain.right + 2;

debuggerfo.paneledited.Width := debuggerfo.edited_run.right + 4;


debuggerfo.Height := debuggerfo.statdisp.bottom + 2;


Expand Down
Loading

0 comments on commit 69b8e20

Please sign in to comment.