Skip to content

Octa 24115 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: release-12.6.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions adeshar/_gen4gl.p
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,14 @@ FIND _C WHERE RECID(_C) = _U._x-recid.
/* take hold. But, only if the window is in a 'normal' state. */
IF _U._LAYOUT-NAME = "Master Layout" AND _U._TYPE NE "DIALOG-BOX" AND
_h_win:WINDOW-STATE EQ WINDOW-NORMAL THEN
ASSIGN _L._ROW = _h_win:ROW
_L._COL = _h_win:COLUMN
.
// This is a bit questionable... _L._ROW and _L._COL is used to manage window col and row
// and then it is just assigned from the handle here...
// As for now at least avoid this for oeideservice and _C._EXPLICIT_POSITION
// as we deliberately keep window and _L row and col separate om PDS
if OEIDEIsRunning = false or _C._EXPLICIT_POSITION = false then
ASSIGN _L._ROW = _h_win:ROW
_L._COL = _h_win:COLUMN
.
IF wndw AND p_status NE "EXPORT" THEN DO:
PUT STREAM P_4GL UNFORMATTED SKIP (1)
"/* ************************* Create Window ************************** */"
Expand Down
45 changes: 39 additions & 6 deletions adeuib/_prpobj.p
Original file line number Diff line number Diff line change
Expand Up @@ -1338,14 +1338,26 @@ PROCEDURE complete_the_transaction:
(_L._COL - 1) * _L._COL-MULT + 1. /* care of elsewhere. */

IF h_self:COLUMN > new-rc-value THEN DO:
IF _L._COL NE ? AND _U._TYPE NE "DIALOG-BOX" THEN
h_self:COLUMN = new-rc-value.
IF _L._COL NE ? AND _U._TYPE NE "DIALOG-BOX" THEN
do:
// don't set widget pos in pdsoe
&if DEFINED(IDE-IS-RUNNING) <> 0 &then
if h_self:type <> "window" then
&endif
h_self:COLUMN = new-rc-value.
end.
h_self:WIDTH = _L._WIDTH * _L._COL-MULT NO-ERROR.
END.
ELSE DO: /* Width then column */
h_self:WIDTH = _L._WIDTH * _L._COL-MULT NO-ERROR.
IF _L._COL NE ? AND _U._TYPE NE "DIALOG-BOX" THEN
h_self:COLUMN = new-rc-value.
do:
// don't set widget pos in pdsoe
&if DEFINED(IDE-IS-RUNNING) <> 0 &then
if h_self:type <> "window" then
&endif
h_self:COLUMN = new-rc-value.
end.
END.

/* Adjust the Height & Row combination: If new row is less than old */
Expand All @@ -1355,15 +1367,27 @@ PROCEDURE complete_the_transaction:
(_L._ROW - 1) * _L._ROW-MULT + 1.
IF h_self:ROW > new-rc-value THEN DO:
IF _L._ROW NE ? AND _U._TYPE NE "DIALOG-BOX":U THEN
h_self:ROW = new-rc-value.
do:
// don't set widget pos in pdsoe
&if DEFINED(IDE-IS-RUNNING) <> 0 &then
if h_self:type <> "window" then
&endif
h_self:ROW = new-rc-value.
end.
IF _U._TYPE NE "COMBO-BOX" THEN
h_self:HEIGHT = _L._HEIGHT * _L._ROW-MULT.
END.
ELSE DO: /* Height then row */
IF _U._TYPE NE "COMBO-BOX":U THEN
h_self:HEIGHT = _L._HEIGHT * _L._ROW-MULT.
IF _L._ROW NE ? AND _U._TYPE NE "DIALOG-BOX":U THEN
h_self:ROW = new-rc-value.
do:
// don't set widget pos in pdsoe
&if DEFINED(IDE-IS-RUNNING) <> 0 &then
if h_self:type <> "window" then
&endif
h_self:ROW = new-rc-value.
end.
END.

/* Don't save the name for text widgets. For db fields, don't save
Expand Down Expand Up @@ -5895,8 +5919,13 @@ END PROCEDURE. /* save_off */
PROCEDURE save_parent_info:
/* If parent is a window, then update position in case it was moved. */
IF parent_U._TYPE EQ "WINDOW":U AND _h_win:WINDOW-STATE EQ WINDOW-NORMAL THEN
ASSIGN parent_L._ROW = _h_win:ROW
ASSIGN
// don't set data from ui in pdsoe -
// fixed widget pos is set in oeideservice.positionDesignWindow
&if DEFINED(IDE-IS-RUNNING) = 0 &then
parent_L._ROW = _h_win:ROW
parent_L._COL = _h_win:COLUMN
&endif
/* Also, store virtual dimensions for easy comparisons, later */
v-wdth = parent_L._VIRTUAL-WIDTH
v-hgt = parent_L._VIRTUAL-HEIGHT.
Expand Down Expand Up @@ -5957,8 +5986,12 @@ PROCEDURE setup_for_window.
/* Only update the Row&Col if the window is in a normal state (not minimized).
* Otherwise, we end up with odd values. */
IF _h_win:WINDOW-STATE EQ WINDOW-NORMAL AND _L._LO-NAME = "Master Layout" THEN DO:
// don't set data from ui in pdsoe -
// fixed widget pos is set in oeideservice.positionDesignWindow
&if DEFINED(IDE-IS-RUNNING) = 0 &then
ASSIGN _L._ROW = _h_win:ROW
_L._COL = _h_win:COLUMN.
&ENDIF
/* Keep other layout in sync with master -important for stupid multi-layout */
/* runtime tricks */
FOR EACH x_L WHERE x_L._u-recid = _L._u-recid AND x_L._LO-NAME NE "Master Layout":
Expand Down
12 changes: 10 additions & 2 deletions adeuib/_rdwind.p
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,10 @@ IF OEIDEIsRunning THEN
DO:
if valid-handle( h_TreeProc) then
RUN createTree IN h_TreeProc (RECID(_P)).

run positionDesignWindow in hOEIDEService (_h_win).
// don't do this for explicit yet. wait sfter the _l._col and _l._row is set
// could probably wait for all cases, but this is a late version change
IF not _C._EXPLICIT_POSITION then
run positionDesignWindow in hOEIDEService (_h_win).
END. /* oeide */
ELSE DO:
/* Test the case where the window is off the screen. Perhaps this is
Expand Down Expand Up @@ -517,6 +519,12 @@ IF not OEIDEIsRunning THEN
do i = 1 to error-status:num-messages:
message error-status:get-message(i) view-as alert-box warning.
end.
else do:
// for explicit pos we must wait sfter the _l._col and _l._row is set
// could probably wait for all cases, but this is a late version change
IF _C._EXPLICIT_POSITION then
run positionDesignWindow in hOEIDEService (_h_win).
end.

/* If we need to, restore current window settings. */
IF set-code-win THEN
Expand Down
10 changes: 10 additions & 0 deletions adeuib/vrfyimp.i
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,16 @@ IF AbortImport NE yes THEN DO:
IF err_msgs <> "":U THEN
DO:
RUN adecomm/_setcurs.p ("").

if oeideisrunning and OEIDE_CanShowMessage() then
run ShowOKMessage in hOEIDEService(subst("&1 analyzed &2by the &3 &4.~nPlease check these problems in your file or environment:~n&5",
IF import_mode EQ "IMPORT":U THEN "The contents of this file cannot be" ELSE "This file cannot be",
IF web_file THEN "remotely " else "",
"{&UIB_NAME}",
IF web_file THEN ' on ' + _brokerURL ELSE '':U,
err_msgs)
,"Error":u,? ).
else
MESSAGE (IF import_mode EQ "IMPORT":U
THEN "The contents of this file cannot be"
ELSE "This file cannot be")
Expand Down