From: Laszlo T. <ave...@us...> - 2006-12-31 15:18:38
|
Update of /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2 In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23401/bg2 Modified Files: GUIREC.py Log Message: enable export only when the exportable flag was set Index: GUIREC.py =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/GUIScripts/bg2/GUIREC.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** GUIREC.py 31 Dec 2006 14:18:54 -0000 1.28 --- GUIREC.py 31 Dec 2006 15:18:36 -0000 1.29 *************** *** 49,53 **** if CloseOtherWindow (OpenRecordsWindow): if InformationWindow: OpenInformationWindow () ! GemRB.UnloadWindow (RecordsWindow) GemRB.UnloadWindow (OptionsWindow) --- 49,53 ---- if CloseOtherWindow (OpenRecordsWindow): if InformationWindow: OpenInformationWindow () ! GemRB.UnloadWindow (RecordsWindow) GemRB.UnloadWindow (OptionsWindow) *************** *** 63,67 **** OldOptionsWindow = None SetSelectionChangeHandler (None) ! return GemRB.HideGUI () --- 63,67 ---- OldOptionsWindow = None SetSelectionChangeHandler (None) ! return GemRB.HideGUI () *************** *** 124,128 **** def UpdateRecordsWindow (): global stats_overview, alignment_help ! Window = RecordsWindow if not RecordsWindow: --- 124,128 ---- def UpdateRecordsWindow (): global stats_overview, alignment_help ! Window = RecordsWindow if not RecordsWindow: *************** *** 131,135 **** pc = GemRB.GameGetSelectedPCSingle () ! # name Label = GemRB.GetControl (Window, 0x1000000e) --- 131,142 ---- pc = GemRB.GameGetSelectedPCSingle () ! ! # exportable ! Button = GemRB.GetControl (Window, 36) ! if GemRB.GetPlayerStat (pc, IE_MC_FLAGS)&MC_EXPORTABLE: ! GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_ENABLED) ! else: ! GemRB.SetButtonState (Window, Button, IE_GUI_BUTTON_DISABLED) ! # name Label = GemRB.GetControl (Window, 0x1000000e) *************** *** 161,165 **** sstr = GemRB.GetPlayerStat (pc, IE_STR) sstrx = GemRB.GetPlayerStat (pc, IE_STREXTRA) ! if sstrx > 0 and sstr==18: sstr = "%d/%02d" %(sstr, sstrx % 100) --- 168,172 ---- sstr = GemRB.GetPlayerStat (pc, IE_STR) sstrx = GemRB.GetPlayerStat (pc, IE_STREXTRA) ! if sstrx > 0 and sstr==18: sstr = "%d/%02d" %(sstr, sstrx % 100) *************** *** 199,203 **** text = GemRB.GetTableValue (Table, GemRB.GetPlayerStat (pc, IE_RACE) - 1, 0) GemRB.UnloadTable (Table) ! Label = GemRB.GetControl (Window, 0x1000000f) GemRB.SetText (Window, Label, text) --- 206,210 ---- text = GemRB.GetTableValue (Table, GemRB.GetPlayerStat (pc, IE_RACE) - 1, 0) GemRB.UnloadTable (Table) ! Label = GemRB.GetControl (Window, 0x1000000f) GemRB.SetText (Window, Label, text) *************** *** 238,242 **** woff = "" str_None = GemRB.GetString (61560) ! GS = lambda s, pc=pc: GemRB.GetPlayerStat (pc, s) --- 245,249 ---- woff = "" str_None = GemRB.GetString (61560) ! GS = lambda s, pc=pc: GemRB.GetPlayerStat (pc, s) *************** *** 407,411 **** def OpenInformationWindow (): global InformationWindow ! if InformationWindow != None: if BiographyWindow: OpenBiographyWindow () --- 414,418 ---- def OpenInformationWindow (): global InformationWindow ! if InformationWindow != None: if BiographyWindow: OpenBiographyWindow () *************** *** 416,420 **** GemRB.SetVisible (PortraitWindow, 3) InformationWindow = None ! return --- 423,427 ---- GemRB.SetVisible (PortraitWindow, 3) InformationWindow = None ! return *************** *** 547,551 **** GemRB.SetText (Window, TextArea, 39424) ! # Done Button = GemRB.GetControl (Window, 2) --- 554,558 ---- GemRB.SetText (Window, TextArea, 39424) ! # Done Button = GemRB.GetControl (Window, 2) *************** *** 575,579 **** NameField = GemRB.GetControl(ExportWindow,6) ! GemRB.SetEvent(ExportWindow, ExportDoneButton, IE_GUI_BUTTON_ON_PRESS, "ExportDonePress") GemRB.SetEvent(ExportWindow, CancelButton, IE_GUI_BUTTON_ON_PRESS, "ExportCancelPress") --- 582,586 ---- NameField = GemRB.GetControl(ExportWindow,6) ! GemRB.SetEvent(ExportWindow, ExportDoneButton, IE_GUI_BUTTON_ON_PRESS, "ExportDonePress") GemRB.SetEvent(ExportWindow, CancelButton, IE_GUI_BUTTON_ON_PRESS, "ExportCancelPress") |