ProGUI V1.38 UI Library (Small Bug Fix)

Developed or developing a new product in PureBasic? Tell the world about it.
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: ProGUI V1.38b UI Library (5.11 compliant)

Post by GoodNPlenty »

Poshu wrote:just press Y and return when you get the message, should work like a charm.
(I did not check the crc, cause I suspect progui's source to be watermarked, but it should not be a problem with the diff patch)

*Edit*
I uploaded a new version, you don't even need to press Y and return anymore (Winmerge give me reversed diff file somehow...). Just run Patch proGUI.bat and there you go :D
Thank You for the new version, but I'm still having some issues.
My ProGUI.pb source file is 39139 lines long and your diff file addresses lines that are past that line number.
These must be built on an individual basis resulting in each having a different line length.
The line offsets line up at first and then they start to be off by a few lines until it hits the eof.

Code: Select all

patch.exe -b -R ProGUI.pb proGuidiff
patching file ProGUI.pb
Hunk #5 succeeded at 2068 (offset 204 lines).
Hunk #6 FAILED at 23400.
Hunk #8 FAILED at 23268.
Hunk #9 FAILED at 23270.
Hunk #11 FAILED at 23290.
Hunk #13 FAILED at 23312.
Hunk #14 FAILED at 23319.
Hunk #15 FAILED at 23327.
Hunk #17 FAILED at 23366.
Hunk #18 FAILED at 23373.
Hunk #20 FAILED at 23649.
Hunk #22 FAILED at 23794.
Hunk #27 FAILED at 23911.
Hunk #28 FAILED at 23934.
Hunk #29 FAILED at 23947.
Hunk #31 FAILED at 35762.
Hunk #33 FAILED at 35845.
Hunk #35 succeeded at 35976 (offset 112 lines).
Hunk #37 succeeded at 37484 (offset 8 lines).
Hunk #38 FAILED at 37492.
Hunk #39 succeeded at 37686 (offset 8 lines).
Hunk #40 FAILED at 39174.
Hunk #41 FAILED at 39188.
Hunk #42 FAILED at 39196.
20 out of 42 hunks FAILED -- saving rejects to file ProGUI.pb.rej


I will try to manually patch or adjust the line numbers in your diff file to match my source since you've done all the hard work of updating the source.

Thanks for all your help.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Poshu »

Mine is 39141 + the invisible lines at the end of each pb file added by the IDE. I'll pm you to try to fix that.
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Zach »

I get worried when I start seeing user hacks to maintain a library :|
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Poshu »

So yeah, proGUI's sources are watermarked and this watermark make it impossible to patch it through diff patch :/
GoodNPlenty successfully patched it manually though, so anyone could give a try while I look for a better solution.
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Zach »

Watermarked? In what way?

I always assumed if you had a license that included the source code, you could modify it in any way you wanted. I've never looked at my source distributions though, as I wouldn't understand them anyway :|
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by GoodNPlenty »

Zach wrote:Watermarked? In what way?

I always assumed if you had a license that included the source code, you could modify it in any way you wanted. I've never looked at my source distributions though, as I wouldn't understand them anyway :|
The ProGUI gold and platinum versions include the source code in a zip file with a unique password. When trying to patch my source code with Poshu's patch I noticed that some lines matched and some were off a few lines which could indicate each users source code is unique in some way (watermarking). The license allows you to modify the source code which is why some of us purchased the gold or platinum license. PrincieD has some amazing features coming in 2.0 and while waiting we wanted to update the 1.x branch so it would compile in 5.11 so we did not have to use the older version dll or wait for a new library.
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Poshu »

Zach wrote:I always assumed if you had a license that included the source code, you could modify it in any way you wanted. I've never looked at my source distributions though, as I wouldn't understand them anyway :|
Indeed you can modify it any way you want, the tricky part is redistributing any modification: as GoodNPlenty explained, each proGUI source is slightly different from the others. So I can't use a diff patch, neither can I release a DLL or a tailbited version because it would break the anti-piracy system...
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Zach »

Hrmm, well that sucks..

In any case, hope Chris is alright and returns soon.

Have you thought about a batch modification script? like, using AutoIT and Find / Replace ? as opposed to line numbers
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Poshu »

that's what I'm testing right now :3
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Zach »

I just noticed a weird bug I don't think I had before..

I have a menu, with a single dropdown, the typical "File" that every program has. If I click on the File dropdown, the menu expands but then the title "File" dissapears.
However if I use ALT + F to expand the menu the word stays intact :shock:

I went back and tested with different versions 1.34, 1.35, and 1.38 and they all show the same thing... :?

Can anyone confirm this behavior?
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Poshu »

Can't reproduce with this code (windows 8 x64 bit, pb5.11 x64, progui 1.38b):

Code: Select all

IncludeFile "ProGUI.pb"
ProGUI_Init()
StartProGUI("",0,0,0,0,0,0,0)

OpenWindow(0,100,100,300,300,"nyoron",#PB_Window_SystemMenu)
CreateMenuEx(0,WindowID(0),#UISTYLE_WHIDBEY)
MenuTitleEx("File")
MenuItemEx(1,"mugyu",0,0,0,0)
MenuItemEx(2,"mugyu",0,0,0,0)
MenuItemEx(3,"mugyu",0,0,0,0)

Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
is your menu part of a rebar, what style does it uses?

BTW do you have any expertise with AutoIT?
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Zach »

I haven't used AutoIT in quite a while unfortunately :(

I am using a rebar for my menu though. It used to work fine, so I'm not sure what has changed. I also haven't touched a lot of this code in forever...

This likely will not compile without modification, but it is my main GUI drawing function that executes when the program starts.

Code: Select all

 Procedure GUI_Open_Main_Window()
  Global menu, Explore_Bar, PanelMaster
  
  OpenWindow(#MAIN_WINDOW, 0, 0, 1024, 600, "MWEdit 1.0", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_Invisible)
  ;// Main Window is created Invisible so that any drawing action by ProGUI is not seen.
  
  CreateRebar(#FMENU_REBAR,WindowID(#MAIN_WINDOW),0,#RBS_BANDBORDERS,1)
  
  menu=CreateMenuEx(#FILE_MENU, WindowID(#MAIN_WINDOW), #UISTYLE_EXPLORER)
  MenuTitleEx("&File")
  MenuItemEx(#FMENU_NEW_PROJECT, "&New Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_OPEN, "&Open Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_SAVE, "&Save Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_SAVE_AS, "Save Project &As..", 0, 0, 0, 0)
  MenuItemEx(#FMENU_CLOSE, "&Close Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_EXIT, "&Quit", 0, 0, 0, 0)
  MenuTitleEx("&Help")
  AddRebarGadget(menu, "", 240, 0, 0, 0, #RBBS_BREAK | #RBBS_NOGRIPPER)
  
  CreateExplorerBar(WindowID(#MAIN_WINDOW), #ProGUI_Any, 0, 35, 250, 555,0)
  
    AddExplorerBarGroup("Design Managers", 0)
      ExplorerBarItem(#FMENU_ROOM_MANAGER,  "Room Manager")
      ExplorerBarItem(#FMENU_NPC_MANAGER,   "NPC Manager")
      ExplorerBarItem(#FMENU_ITEM_MANAGER,  "Item Manager")
      ExplorerBarItem(#FMENU_QUEST_MANAGER, "Quest Manager")
      

  
  
  PanelMaster=CreatePanelEx(#ProGUI_Any, WindowID(#MAIN_WINDOW), 265, 35, 747, 555,0)
  AddPanelExPage(0)   ;// Dummy Page to fix black rectangle on startup
                      ;// Page 0
                      
                      
  ;// Call Procedures to Build all Pages Callable by the Sidebar Menu

  Room_Manager()      ;// Page 1

  
  SetActiveWindow(#MAIN_WINDOW)     ;// Set Main Program Window as Active.
  HideWindow(#MAIN_WINDOW, #False)  ;// Show the Main Program Window now that drawing is complete.
EndProcedure
I even added another menu item, and the same problem plagues it.. No matter what style I change the Rebar and/or Menu to. It seems to have to do with the position of the mouse over the menu text as well. If I call it with ALT + f and the mouse is lined up with the menu in some way, it will also blank out the name.

edit: I'm convinced there is something funky with my code. Maybe I was doing something and forgot about it and ended up with a botched modification of something. I'll probably end up rewriting it.
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by GoodNPlenty »

Zach wrote:I haven't used AutoIT in quite a while unfortunately :(

I am using a rebar for my menu though. It used to work fine, so I'm not sure what has changed. I also haven't touched a lot of this code in forever...

This likely will not compile without modification, but it is my main GUI drawing function that executes when the program starts.
I even added another menu item, and the same problem plagues it.. No matter what style I change the Rebar and/or Menu to. It seems to have to do with the position of the mouse over the menu text as well. If I call it with ALT + f and the mouse is lined up with the menu in some way, it will also blank out the name.

edit: I'm convinced there is something funky with my code. Maybe I was doing something and forgot about it and ended up with a botched modification of something. I'll probably end up rewriting it.
The file menu works fine for me using your code modified to create a working example, hopefully it will work on your system and you can find the problem.
I'm compiling under x86 and x64 with the below configurations:
Windows 7 x64 PB 5.00 ProGUI 1.38
Windows 7 x64 PB 5.11 ProGUI 1.38 with Poshu's modifications

Code: Select all

IncludeFile "ProGUI.pb"
ProGUI_Init()
StartProGUI("",0,0,0,0,0,0,0)

Enumeration
  #MAIN_WINDOW
  #FMENU_REBAR
  #FILE_MENU
  #FMENU_NEW_PROJECT
  #FMENU_OPEN
  #FMENU_SAVE
  #FMENU_SAVE_AS
  #FMENU_CLOSE
  #FMENU_EXIT
  #FMENU_ROOM_MANAGER
  #FMENU_NPC_MANAGER
  #FMENU_ITEM_MANAGER
  #FMENU_QUEST_MANAGER
EndEnumeration

Procedure GUI_Open_Main_Window()
  Global menu, Explore_Bar, PanelMaster
  
  OpenWindow(#MAIN_WINDOW, 0, 0, 1024, 600, "MWEdit 1.0", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_Invisible)
  ;// Main Window is created Invisible so that any drawing action by ProGUI is not seen.
  
  CreateRebar(#FMENU_REBAR,WindowID(#MAIN_WINDOW),0,#RBS_BANDBORDERS,1)
 
  menu=CreateMenuEx(#FILE_MENU, WindowID(#MAIN_WINDOW), #UISTYLE_EXPLORER)
  MenuTitleEx("&File")
  MenuItemEx(#FMENU_NEW_PROJECT, "&New Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_OPEN, "&Open Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_SAVE, "&Save Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_SAVE_AS, "Save Project &As..", 0, 0, 0, 0)
  MenuItemEx(#FMENU_CLOSE, "&Close Project", 0, 0, 0, 0)
  MenuItemEx(#FMENU_EXIT, "&Quit", 0, 0, 0, 0)
  MenuTitleEx("&Help")
  AddRebarGadget(menu, "", 240, 0, 0, 0, #RBBS_BREAK | #RBBS_NOGRIPPER)
  
  CreateExplorerBar(WindowID(#MAIN_WINDOW), #ProGUI_Any, 0, 35, 250, 555,0)
    AddExplorerBarGroup("Design Managers", 0)
      ExplorerBarItem(#FMENU_ROOM_MANAGER,  "Room Manager")
      ExplorerBarItem(#FMENU_NPC_MANAGER,   "NPC Manager")
      ExplorerBarItem(#FMENU_ITEM_MANAGER,  "Item Manager")
      ExplorerBarItem(#FMENU_QUEST_MANAGER, "Quest Manager")
  PanelMaster=CreatePanelEx(#ProGUI_Any, WindowID(#MAIN_WINDOW), 265, 35, 747, 555,0)
  AddPanelExPage(0)   ;// Dummy Page to fix black rectangle on startup
                      ;// Page 0
                      
  ;// Call Procedures to Build all Pages Callable by the Sidebar Menu
  ;Room_Manager()      ;// Page 1
  SetActiveWindow(#MAIN_WINDOW)     ;// Set Main Program Window as Active.
  HideWindow(#MAIN_WINDOW, #False)  ;// Show the Main Program Window now that drawing is complete.
  
  Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
  ProGUI_End()
EndProcedure

GUI_Open_Main_Window()
Zach
Addict
Addict
Posts: 1675
Joined: Sun Dec 12, 2010 12:36 am
Location: Somewhere in the midwest
Contact:

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by Zach »

Your modified code works for me.

So its something in my original, I'll have to study it when I have some free time later.

Thanks for fixing it - whatever you did!
GoodNPlenty
Enthusiast
Enthusiast
Posts: 112
Joined: Wed May 13, 2009 8:38 am
Location: Arizona, USA

Re: ProGUI V1.38 UI Library (Small Bug Fix)

Post by GoodNPlenty »

Zach wrote:Your modified code works for me.

So its something in my original, I'll have to study it when I have some free time later.

Thanks for fixing it - whatever you did!

It might have something to do with the Room_Manager() procedure that I commented out.
Locked