[Igarden-commit] Garden/source/Reports RGReport.h, 1.3, 1.3.2.1 PurchaseReport.cpp, 1.1.2.1, 1.1.2.
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-11-17 13:24:58
|
Update of /cvsroot/igarden/Garden/source/Reports In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7565 Modified Files: Tag: Release_branch_v1 RGReport.h PurchaseReport.cpp RGReport.cpp Log Message: Add message when Print button is disabled Index: PurchaseReport.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/Attic/PurchaseReport.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** PurchaseReport.cpp 15 Nov 2006 03:56:32 -0000 1.1.2.1 --- PurchaseReport.cpp 17 Nov 2006 13:24:53 -0000 1.1.2.2 *************** *** 120,124 **** XGPopControl *pop; long count, n, numLayers; - XGCheckButton *btn; XGUUID nilID; GardenPlot *plot; --- 120,123 ---- *************** *** 198,207 **** } ! XGCommandButton *printBtn = dynamic_cast<XGCommandButton*>(dlog->FindViewByID(10001)); ! MyAssert(printBtn != NULL); ! if(AllowPrint()) ! printBtn->EnableView(); ! else ! printBtn->DisableView(); } --- 197,201 ---- } ! EnableFindButton(AllowPrint(), dlog); } *************** *** 384,393 **** RGReportHypertextCell *cell; Point cellSize; ! UInt32 n, numRows, index, numPlots, count, numLayers; Material *mat; String text; GardenDate date; char output[1024]; ! const char *comments, *namePtr; ShopTemplate_t format; Layout *layout; --- 378,387 ---- RGReportHypertextCell *cell; Point cellSize; ! UInt32 n, numRows, index, numPlots; Material *mat; String text; GardenDate date; char output[1024]; ! const char *namePtr; ShopTemplate_t format; Layout *layout; Index: RGReport.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/RGReport.h,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** RGReport.h 16 May 2005 23:06:28 -0000 1.3 --- RGReport.h 17 Nov 2006 13:24:53 -0000 1.3.2.1 *************** *** 108,111 **** --- 108,112 ---- // void PrintPreview(XGView *view); void DrawPage(XGDraw &draw, Rect *r, UInt32 page); + void EnableFindButton(bool show, XGDialog *dlog); // The report name is displayed at the top of the dialogs, and by default Index: RGReport.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Reports/RGReport.cpp,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** RGReport.cpp 13 Jan 2006 23:32:00 -0000 1.7 --- RGReport.cpp 17 Nov 2006 13:24:53 -0000 1.7.2.1 *************** *** 23,26 **** --- 23,28 ---- #include <XGGroupBox.h> #include <XGCheckButton.h> + #include <XGStaticText.h> + #include <XGCommandButton.h> using yaaf::XGView; *************** *** 450,452 **** --- 452,470 ---- } + void RGReport::EnableFindButton(bool show, XGDialog *dlog) + { + XGCommandButton *printBtn = dynamic_cast<XGCommandButton*>(dlog->FindViewByID(10001)); + XGStaticText *warning = dynamic_cast<XGStaticText*>(dlog->FindViewByID(10007)); + if(show) + { + printBtn->EnableView(); + warning->HideView(); + } + else + { + printBtn->DisableView(); + warning->ShowView(); + } + } + extern short GetResourceMessage(short res, short index, char *smsg, char *lmsg); |