Skip to content

Commit

Permalink
Merge pull request #58 from patrickTingen/develop
Browse files Browse the repository at this point in the history
Small post-delivery fixes
  • Loading branch information
patrickTingen authored Dec 29, 2020
2 parents c010ad2 + 4cfd6e0 commit 719719d
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 77 deletions.
2 changes: 1 addition & 1 deletion build.i
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20201218
20201229
24 changes: 23 additions & 1 deletion getDataserver.p
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ DEFINE VARIABLE cDontShow AS CHARACTER NO-UNDO.
DEFINE VARIABLE lDontShowSchemaHr AS LOGICAL NO-UNDO.
DEFINE VARIABLE iStartTime AS INTEGER NO-UNDO.
DEFINE VARIABLE hWindow AS HANDLE NO-UNDO.
DEFINE VARIABLE iItem AS INTEGER NO-UNDO.
DEFINE VARIABLE cConnectedDatabases AS CHARACTER NO-UNDO.

DEFINE BUFFER bDb FOR dictdb._db.

Expand Down Expand Up @@ -158,7 +160,13 @@ FOR EACH ttDataserver BY ttDataserver.iServerNr:

CONNECT VALUE(ttDataserver.cConnectString) NO-ERROR.

IF ERROR-STATUS:GET-MESSAGE(1) <> ? AND ERROR-STATUS:GET-MESSAGE(1) <> "" THEN
IF ERROR-STATUS:GET-MESSAGE(1) <> ?
AND ERROR-STATUS:GET-MESSAGE(1) <> ""
AND (IF ERROR-STATUS:GET-NUMBER(1) = 43 AND program-name(3) BEGINS "btnDisconnectChoose " THEN
NO
ELSE
YES)
THEN
DO:
MESSAGE
SUBSTITUTE( TRIM(
Expand All @@ -185,6 +193,20 @@ FOR EACH ttDataserver BY ttDataserver.iServerNr:
ttDataserver.lConnected = CONNECTED(ttDataserver.cLDbNameDataserver).
END. /* FOR EACH */

if program-name(3) begins "btnDisconnectChoose " then
do:
do iItem = 1 to num-dbs:
cConnectedDatabases = trim(cConnectedDatabases + "," + ldbname(iItem), ",").
end.

for each ttDataserver by ttDataserver.iServerNr:
if not can-do(cConnectedDatabases, ttDataserver.cLDbNameSchema) then
do:
piDataserverNr = piDataserverNr - 1.
delete ttDataserver.
end.
end.
end.

PROCEDURE removeParameter:
DEFINE INPUT PARAMETER pcParam AS CHARACTER NO-UNDO.
Expand Down
154 changes: 79 additions & 75 deletions wDataDigger.w
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,15 @@ DEFINE VARIABLE glUseColorsFavouriteTable AS LOGICAL NO-UNDO.
~{&OPEN-QUERY-brIndexes}

/* Standard List Definitions */
&Scoped-Define ENABLED-OBJECTS rctQuery rctEdit fiTableFilter ~
cbDatabaseFilter btnFavourite tgSelAll fiIndexNameFilter fiFlagsFilter ~
fiFieldsFilter btnClearIndexFilter brTables brFields brIndexes tgDebugMode ~
btnClearTableFilter btnTableFilter btnAddFavGroup fiTableDesc ~
cbFavouriteGroup btnWhere ficWhere btnQueries btnView btnTools btnTabTables ~
btnClear btnClearFieldFilter btnClipboard btnMoveBottom btnMoveDown ~
btnMoveTop btnMoveUp btnReset btnTabFavourites btnTabFields btnTabIndexes ~
btnNextQuery btnPrevQuery btnDump btnLoad btnDelete btnResizeVer btnClone ~
btnAdd btnEdit fiFeedback
&Scoped-Define ENABLED-OBJECTS rctQuery rctEdit btnFavourite fiTableFilter ~
cbDatabaseFilter tgSelAll fiIndexNameFilter fiFlagsFilter fiFieldsFilter ~
btnClearIndexFilter btnClearTableFilter brTables brFields brIndexes ~
tgDebugMode btnTableFilter fiTableDesc cbFavouriteGroup ficWhere ~
btnAddFavGroup btnWhere btnQueries btnView btnTools btnTabTables btnClear ~
btnClearFieldFilter btnClipboard btnMoveBottom btnMoveDown btnMoveTop ~
btnMoveUp btnReset btnTabFavourites btnTabFields btnTabIndexes btnNextQuery ~
btnPrevQuery btnDump btnLoad btnDelete btnResizeVer btnClone btnAdd btnEdit ~
fiFeedback
&Scoped-Define DISPLAYED-OBJECTS fiTableFilter cbDatabaseFilter tgSelAll ~
fiIndexNameFilter fiFlagsFilter fiFieldsFilter fiTableDesc cbFavouriteGroup ~
ficWhere fiFeedback
Expand Down Expand Up @@ -988,29 +988,29 @@ ttTable.iNumQueries
/* ************************ Frame Definitions *********************** */

DEFINE FRAME frMain
btnFavourite AT Y 236 X 269 WIDGET-ID 310
fiTableFilter AT Y 3 X 56 NO-LABEL
cbDatabaseFilter AT Y 3 X 117 COLON-ALIGNED NO-LABEL
btnFavourite AT Y 236 X 269 WIDGET-ID 310
tgSelAll AT Y 5 X 345 WIDGET-ID 6
fiIndexNameFilter AT Y 5 X 815 COLON-ALIGNED NO-LABEL WIDGET-ID 168
fiFlagsFilter AT Y 5 X 890 COLON-ALIGNED NO-LABEL WIDGET-ID 164
fiFieldsFilter AT Y 5 X 945 COLON-ALIGNED NO-LABEL WIDGET-ID 166
btnClearIndexFilter AT Y 5 X 1095 WIDGET-ID 160
btnClearTableFilter AT Y 3 X 237 WIDGET-ID 222
brTables AT Y 27 X 56 WIDGET-ID 300
brFields AT Y 27 X 325 WIDGET-ID 100
brIndexes AT Y 28 X 829 WIDGET-ID 200
tgDebugMode AT Y 29 X 38 WIDGET-ID 238 NO-TAB-STOP
btnClearTableFilter AT Y 3 X 237 WIDGET-ID 222
btnTableFilter AT Y 3 X 257 WIDGET-ID 38
btnAddFavGroup AT Y 236 X 248 WIDGET-ID 318
fiTableDesc AT Y 236 X 57 NO-LABEL WIDGET-ID 90
cbFavouriteGroup AT Y 236 X 75 COLON-ALIGNED NO-LABEL WIDGET-ID 316
btnWhere AT Y 265 X 683 WIDGET-ID 236
ficWhere AT Y 266 X 80 NO-LABEL
btnAddFavGroup AT Y 236 X 248 WIDGET-ID 318
fiWarning AT Y 520 X 480 COLON-ALIGNED NO-LABEL WIDGET-ID 172
btnWhere AT Y 265 X 683 WIDGET-ID 236
btnQueries AT Y 265 X 745 WIDGET-ID 190
btnView AT Y 520 X 200 WIDGET-ID 4
btnTools AT Y 0 X 1 WIDGET-ID 264
fiWarning AT Y 520 X 480 COLON-ALIGNED NO-LABEL WIDGET-ID 172
btnTabTables AT Y 45 X 34 WIDGET-ID 300
btnClear AT Y 265 X 725 WIDGET-ID 30
btnClearFieldFilter AT Y 5 X 765 WIDGET-ID 232
Expand Down Expand Up @@ -1044,46 +1044,17 @@ DEFINE FRAME frMain
AT X 0 Y 0
SIZE-PIXELS 1498 BY 560 DROP-TARGET.

DEFINE FRAME frSettings
btnQueries-txt AT Y 175 X 37 WIDGET-ID 294
btnDataDigger AT Y 35 X 1 WIDGET-ID 126
btnSettings AT Y 70 X 1 WIDGET-ID 210
btnDict AT Y 105 X 1 WIDGET-ID 224
btnDataAdmin AT Y 140 X 1 WIDGET-ID 214
btnQueries-3 AT Y 175 X 1 WIDGET-ID 190
btnQueryTester AT Y 210 X 1 WIDGET-ID 232
btnConnections AT Y 245 X 1 WIDGET-ID 212
btnEditor AT Y 280 X 1 WIDGET-ID 228
btnHelp AT Y 315 X 1 WIDGET-ID 260
btnAbout AT Y 350 X 1 WIDGET-ID 196
btnExpand AT Y 485 X 1 WIDGET-ID 306
btnExpand-txt AT Y 485 X 35 WIDGET-ID 308
btnEditor-txt AT Y 280 X 37 WIDGET-ID 290
btnQueryTester-txt AT Y 210 X 37 WIDGET-ID 298
btnAbout-txt AT Y 350 X 37 WIDGET-ID 266
btnConnections-txt AT Y 245 X 37 WIDGET-ID 270
btnDataAdmin-txt AT Y 140 X 37 WIDGET-ID 274
btnDataDigger-txt AT Y 35 X 37 WIDGET-ID 278
btnHelp-txt AT Y 315 X 37 WIDGET-ID 286
btnSettings-txt AT Y 70 X 37 WIDGET-ID 302
btnTools-2 AT Y 0 X 1 WIDGET-ID 264
btnDict-txt AT Y 105 X 37 WIDGET-ID 282
btnTools-txt AT Y 0 X 35 WIDGET-ID 304
DEFINE FRAME frData
btnClearDataFilter AT Y 5 X 761 WIDGET-ID 76
btnDataSort AT Y 4 X 5 WIDGET-ID 300
fiNumSelected AT Y 198 X 636 COLON-ALIGNED NO-LABEL WIDGET-ID 298
fiNumRecords AT Y 198 X 665 COLON-ALIGNED NO-LABEL WIDGET-ID 210
rctData AT Y 0 X 0 WIDGET-ID 272
rctDataFilter AT Y 1 X 0 WIDGET-ID 296
WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE
AT COL 1 ROW 2.43
SIZE 28 BY 24.76
BGCOLOR 15 WIDGET-ID 500.

DEFINE FRAME frHint
edHint AT Y 4 X 35 NO-LABEL WIDGET-ID 2
btGotIt AT Y 110 X 104 WIDGET-ID 4
imgArrow AT Y 0 X 0 WIDGET-ID 10
WITH 1 DOWN KEEP-TAB-ORDER OVERLAY
SIDE-LABELS TOP-ONLY NO-UNDERLINE THREE-D
AT X 1150 Y 15
SIZE-PIXELS 285 BY 140
BGCOLOR 14 WIDGET-ID 600.
SIDE-LABELS NO-UNDERLINE THREE-D
AT COL 7 ROW 15.05
SIZE 158 BY 10.24 WIDGET-ID 700.

DEFINE FRAME frWhere
btnBegins AT Y 123 X 17 WIDGET-ID 74
Expand Down Expand Up @@ -1121,17 +1092,46 @@ DEFINE FRAME frWhere
TITLE "Query Editor"
DEFAULT-BUTTON btnOK WIDGET-ID 400.

DEFINE FRAME frData
btnClearDataFilter AT Y 5 X 761 WIDGET-ID 76
btnDataSort AT Y 4 X 5 WIDGET-ID 300
fiNumSelected AT Y 198 X 636 COLON-ALIGNED NO-LABEL WIDGET-ID 298
fiNumRecords AT Y 198 X 665 COLON-ALIGNED NO-LABEL WIDGET-ID 210
rctData AT Y 0 X 0 WIDGET-ID 272
rctDataFilter AT Y 1 X 0 WIDGET-ID 296
DEFINE FRAME frHint
edHint AT Y 4 X 35 NO-LABEL WIDGET-ID 2
btGotIt AT Y 110 X 104 WIDGET-ID 4
imgArrow AT Y 0 X 0 WIDGET-ID 10
WITH 1 DOWN KEEP-TAB-ORDER OVERLAY
SIDE-LABELS TOP-ONLY NO-UNDERLINE THREE-D
AT X 1150 Y 15
SIZE-PIXELS 285 BY 140
BGCOLOR 14 WIDGET-ID 600.

DEFINE FRAME frSettings
btnQueries-txt AT Y 175 X 37 WIDGET-ID 294
btnDataDigger AT Y 35 X 1 WIDGET-ID 126
btnSettings AT Y 70 X 1 WIDGET-ID 210
btnDict AT Y 105 X 1 WIDGET-ID 224
btnDataAdmin AT Y 140 X 1 WIDGET-ID 214
btnQueries-3 AT Y 175 X 1 WIDGET-ID 190
btnQueryTester AT Y 210 X 1 WIDGET-ID 232
btnConnections AT Y 245 X 1 WIDGET-ID 212
btnEditor AT Y 280 X 1 WIDGET-ID 228
btnHelp AT Y 315 X 1 WIDGET-ID 260
btnAbout AT Y 350 X 1 WIDGET-ID 196
btnExpand AT Y 485 X 1 WIDGET-ID 306
btnExpand-txt AT Y 485 X 35 WIDGET-ID 308
btnEditor-txt AT Y 280 X 37 WIDGET-ID 290
btnQueryTester-txt AT Y 210 X 37 WIDGET-ID 298
btnAbout-txt AT Y 350 X 37 WIDGET-ID 266
btnConnections-txt AT Y 245 X 37 WIDGET-ID 270
btnDataAdmin-txt AT Y 140 X 37 WIDGET-ID 274
btnDataDigger-txt AT Y 35 X 37 WIDGET-ID 278
btnHelp-txt AT Y 315 X 37 WIDGET-ID 286
btnSettings-txt AT Y 70 X 37 WIDGET-ID 302
btnTools-2 AT Y 0 X 1 WIDGET-ID 264
btnDict-txt AT Y 105 X 37 WIDGET-ID 282
btnTools-txt AT Y 0 X 35 WIDGET-ID 304
WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT COL 7 ROW 15.05
SIZE 158 BY 10.24 WIDGET-ID 700.
SIDE-LABELS NO-UNDERLINE
AT COL 1 ROW 2.43
SIZE 28 BY 24.76
BGCOLOR 15 WIDGET-ID 500.


/* *********************** Procedure Settings ************************ */
Expand Down Expand Up @@ -1409,15 +1409,15 @@ OPEN QUERY {&SELF-NAME} FOR EACH ttTable.

CREATE CONTROL-FRAME CtrlFrame ASSIGN
FRAME = FRAME frMain:HANDLE
ROW = 25.52
COLUMN = 91
HEIGHT = 1.43
WIDTH = 6
ROW = 1.29
COLUMN = 43
HEIGHT = .81
WIDTH = 4
WIDGET-ID = 292
HIDDEN = yes
SENSITIVE = yes.
/* CtrlFrame OCXINFO:CREATE-CONTROL from: {F0B88A90-F5DA-11CF-B545-0020AF6ED35A} type: PSTimer */
CtrlFrame:MOVE-AFTER(FRAME frData:HANDLE).
CtrlFrame:MOVE-AFTER(btnClearIndexFilter:HANDLE IN FRAME frMain).

&ENDIF

Expand Down Expand Up @@ -6769,11 +6769,11 @@ PROCEDURE enable_UI :
fiFlagsFilter fiFieldsFilter fiTableDesc cbFavouriteGroup ficWhere
fiFeedback
WITH FRAME frMain IN WINDOW C-Win.
ENABLE rctQuery rctEdit fiTableFilter cbDatabaseFilter btnFavourite tgSelAll
ENABLE rctQuery rctEdit btnFavourite fiTableFilter cbDatabaseFilter tgSelAll
fiIndexNameFilter fiFlagsFilter fiFieldsFilter btnClearIndexFilter
brTables brFields brIndexes tgDebugMode btnClearTableFilter
btnTableFilter btnAddFavGroup fiTableDesc cbFavouriteGroup btnWhere
ficWhere btnQueries btnView btnTools btnTabTables btnClear
btnClearTableFilter brTables brFields brIndexes tgDebugMode
btnTableFilter fiTableDesc cbFavouriteGroup ficWhere btnAddFavGroup
btnWhere btnQueries btnView btnTools btnTabTables btnClear
btnClearFieldFilter btnClipboard btnMoveBottom btnMoveDown btnMoveTop
btnMoveUp btnReset btnTabFavourites btnTabFields btnTabIndexes
btnNextQuery btnPrevQuery btnDump btnLoad btnDelete btnResizeVer
Expand Down Expand Up @@ -8333,6 +8333,7 @@ PROCEDURE initObjects :

/* Set Table or Favourites view */
cSetting = getRegistry("DataDigger","TableView").
IF cSetting = ? THEN cSetting = 'T'.
glShowFavourites = (cSetting BEGINS "F").
IF glShowFavourites THEN RUN setPage({&PAGE-FAVOURITES}).
RUN setTableView(glShowFavourites,YES).
Expand Down Expand Up @@ -8433,6 +8434,9 @@ PROCEDURE initSettingsFile :
/* Position of resize bar */
IF getRegistry("DataDigger", "ResizeBar:Y" ) = ? THEN setRegistry("DataDigger", "ResizeBar:Y", "260" ).

/* Initial tab to show (tables) */
IF getRegistry("DataDigger","TableView") = ? THEN setRegistry("DataDigger","TableView","T").

/* Add column for recid / rowid */
IF getRegistry("DataDigger","AddDataColumnForRecid") = ? THEN setRegistry("DataDigger","AddDataColumnForRecid","yes").
IF getRegistry("DataDigger","AddDataColumnForRowid") = ? THEN setRegistry("DataDigger","AddDataColumnForRowid","no").
Expand Down Expand Up @@ -8802,10 +8806,10 @@ PROCEDURE initVisuals :
btnSettings:LOAD-IMAGE (getImagePath("Settings.gif")).
btnConnections:LOAD-IMAGE (getImagePath("Connections.gif")).
btnDict:LOAD-IMAGE (getImagePath("Dictionary.gif")).
btnEditor:LOAD-IMAGE (getImagePath("Editor.gif")).
btnEditor:LOAD-IMAGE (getImagePath("Editor.gif")).
btnQueries-3:LOAD-IMAGE (getImagePath("SavedQueries.gif")).
btnQueryTester:LOAD-IMAGE (getImagePath("QTester.gif")).
btnDataAdmin:LOAD-IMAGE(getImagePath("Administration.gif")).
btnDataAdmin:LOAD-IMAGE (getImagePath("Administration.gif")).
btnAbout:LOAD-IMAGE (getImagePath("About.gif")).
btnResizeVer:LOAD-IMAGE (getImagePath("ResizeVer.gif")).
btnDataDigger:LOAD-IMAGE (getImagePath("DataDigger24x24.gif")).
Expand All @@ -8817,7 +8821,7 @@ PROCEDURE initVisuals :
btnSettings-txt:FONT = giDefaultFont.
btnConnections-txt:FONT = giDefaultFont.
btnDict-txt:FONT = giDefaultFont.
btnEditor-txt:FONT = giDefaultFont.
btnEditor-txt:FONT = giDefaultFont.
btnQueries-txt:FONT = giDefaultFont.
btnQueryTester-txt:FONT = giDefaultFont.
btnDataAdmin-txt:FONT = giDefaultFont.
Expand Down
Binary file modified wDataDigger.wrx
Binary file not shown.

0 comments on commit 719719d

Please sign in to comment.