Replacing 'This'

Organizing tasks to work on, New Features Ideas, Building LCS & LCB Libraries & Widgets, Redecorating and Modifying the IDE, Hacking / Editing Tools, Compiling the Engine from Source, etc.
Post Reply
User avatar
richmond62
Posts: 2851
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Replacing 'This'

Post by richmond62 »

Any bright ideas?
-
SShot 2021-09-19 at 21.15.58.png
SShot 2021-09-19 at 21.15.58.png (82.38 KiB) Viewed 3041 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2851
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Replacing 'This'

Post by richmond62 »

ResEdit.jpeg
ResEdit.jpeg (8.81 KiB) Viewed 3039 times
-
Aah, those were the days. 8-)
https://richmondmathewson.owlstown.net/
User avatar
SethMorrow
Posts: 29
Joined: Sat Sep 11, 2021 4:39 pm
Location: New York
Contact:

Re: Replacing 'This'

Post by SethMorrow »

richmond62 wrote: Sun Sep 19, 2021 6:17 pm Any bright ideas?
I'm not sure about Mac OS, but I was able to change the title on a windows installation in the setMenuProperties handler of revMenuBar.livecodescript.( I just commented out the old code)

Code: Select all

on setMenuProperties
   set the height of me to 47
   set the resizable of me to false

   local tTitle
   set the itemDelimiter to "-"
   put "OpenXTalk 0.0.0.1" into tTitle
   /*if item 1 of the version ends with ".0" then
      put space & char 1 to -3 of item 1 of the version after tTitle
   else
      put space & item 1 of the version after tTitle
   end if
   if item 2 of the version is not empty then
      put space & "(" & item 2 of the version && item 3 of the version & ")" after tTitle
   end if
   set the itemDelimiter to comma*/
   set the title of me to tTitle

   local tScreenRect
   put revIDEStackScreenRect(the short name of this stack, true) into tScreenRect

   if the platform is not "MacOS" then
      if item 3 of the screenRect is 800 then
         set the topLeft of me to item 1 to 2 of tScreenRect
      else
         --screen rect > 800 by 600
         if revIDEGetPreference("cREVMenuBarTopLeft") is empty
         then set the loc of me to item 1 of revIDEStackScreenLoc(the short name of this stack), 54
         else set the topLeft of me to revIDEGetPreference("cREVMenuBarTopLeft")
      end if
   end if

   if the platform is "MacOS" then
      set the decorations of me to empty
      set the topLeft of me to item 1 to 2 of tScreenRect
   else
      set the decorations of me to "default"
   end if
end setMenuProperties
User avatar
richmond62
Posts: 2851
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Replacing 'This'

Post by richmond62 »

That didnae wark ower here intil MacOS, qhilk left me a peerie bit disjaskit, forbye.

So Ah tak a glisk intil this:
-
SShot 2021-09-19 at 22.26.30.png
SShot 2021-09-19 at 22.26.30.png (16.44 KiB) Viewed 3033 times
-
and edeetit it in yin line (43):
-
SShot 2021-09-19 at 22.27.20.png
SShot 2021-09-19 at 22.27.20.png (42.4 KiB) Viewed 3033 times
-
hale easier than getin a wadset fae a howf!
-
SShot 2021-09-19 at 22.30.29.png
SShot 2021-09-19 at 22.30.29.png (69.79 KiB) Viewed 3033 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2851
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Replacing 'This'

Post by richmond62 »

Oh, and here is the file:
Attachments
Info.plist.zip
(1.66 KiB) Downloaded 155 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2851
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Replacing 'This'

Post by richmond62 »

And why the "Flying Fudge" did that badly screw up the MessageBox?
-
SShot 2021-09-19 at 22.36.58.png
SShot 2021-09-19 at 22.36.58.png (204.91 KiB) Viewed 3031 times
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 1652
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Replacing 'This'

Post by OpenXTalkPaul »

For Mac I have already modified some app bundle files including the info.plist (added new filetypes) and also renamed the binary executable to OpenXTalk-Community (which also needs to be changed in the info.plist entry CFBundleExecutable)

https://github.com/PaulMcClernan/OpenXt ... le%20files

Note the package info file needs to be changed too:
https://github.com/PaulMcClernan/OpenXt ... ts/PkgInfo
User avatar
OpenXTalkPaul
Posts: 1652
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Replacing 'This'

Post by OpenXTalkPaul »

SethMorrow wrote: Sun Sep 19, 2021 6:42 pm
richmond62 wrote: Sun Sep 19, 2021 6:17 pm Any bright ideas?
I'm not sure about Mac OS, but I was able to change the title on a windows installation in the setMenuProperties handler of revMenuBar.livecodescript.( I just commented out the old code)

Code: Select all

on setMenuProperties
   set the height of me to 47
   set the resizable of me to false

   local tTitle
   set the itemDelimiter to "-"
   put "OpenXTalk 0.0.0.1" into tTitle
   /*if item 1 of the version ends with ".0" then
      put space & char 1 to -3 of item 1 of the version after tTitle
   else
      put space & item 1 of the version after tTitle
   end if
   if item 2 of the version is not empty then
      put space & "(" & item 2 of the version && item 3 of the version & ")" after tTitle
   end if
   set the itemDelimiter to comma*/
   set the title of me to tTitle

   local tScreenRect
   put revIDEStackScreenRect(the short name of this stack, true) into tScreenRect

   if the platform is not "MacOS" then
      if item 3 of the screenRect is 800 then
         set the topLeft of me to item 1 to 2 of tScreenRect
      else
         --screen rect > 800 by 600
         if revIDEGetPreference("cREVMenuBarTopLeft") is empty
         then set the loc of me to item 1 of revIDEStackScreenLoc(the short name of this stack), 54
         else set the topLeft of me to revIDEGetPreference("cREVMenuBarTopLeft")
      end if
   end if

   if the platform is "MacOS" then
      set the decorations of me to empty
      set the topLeft of me to item 1 to 2 of tScreenRect
   else
      set the decorations of me to "default"
   end if
end setMenuProperties
I'll have to try this out on macOS to see what, if anything, it effects there, I did this change on mac like Richmond did but that's mac, basically just modding the app's settings file. On Windows there's registry stuff too, isn't there?

Hmm, does it need the extreme low version number?
I was thinking something like 1.963RC1, RC2, GM, etc.
When we rebuild engine binaries we increment 1.964...
When we make major changes like adding a another engine architecture (ARM, ARM64 and/or Apple Silicon M would be super) we increment major 2.0...?
User avatar
OpenXTalkPaul
Posts: 1652
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Replacing 'This'

Post by OpenXTalkPaul »

OK for macOS we have bundle edits to fix the name, and and for windows I just merged a menubar edit based on what Seth did above. I took out the version number out, the version doesn't display in-app on the macOS menubar, not sure if that's a requirement or a standard for Windows?

Here's the script I merged:

Code: Select all

on setMenuProperties
   set the height of me to 47
   set the resizable of me to false

   local tTitle
   -- set the itemDelimiter to "-"
   put "OpenXTalk" into tTitle
   -- if item 1 of the version ends with ".0" then
   --   put space & char 1 to -3 of item 1 of the version after tTitle
   -- else
   --   put space & item 1 of the version after tTitle
   -- end if
   -- if item 2 of the version is not empty then
   --   put space & "(" & item 2 of the version && item 3 of the version & ")" after tTitle
   -- end if
   -- set the itemDelimiter to comma
   set the title of me to tTitle

   local tScreenRect
   put revIDEStackScreenRect(the short name of this stack, true) into tScreenRect

   if the platform is not "MacOS" then
      if item 3 of the screenRect is 800 then
         set the topLeft of me to item 1 to 2 of tScreenRect
      else
         --screen rect > 800 by 600
         if revIDEGetPreference("cREVMenuBarTopLeft") is empty
         then set the loc of me to item 1 of revIDEStackScreenLoc(the short name of this stack), 54
         else set the topLeft of me to revIDEGetPreference("cREVMenuBarTopLeft")
      end if
   end if

   if the platform is "MacOS" then
      set the decorations of me to empty
      set the topLeft of me to item 1 to 2 of tScreenRect
   else
      set the decorations of me to "default"
   end if
end setMenuProperties
User avatar
OpenXTalkPaul
Posts: 1652
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Replacing 'This'

Post by OpenXTalkPaul »

richmond62 wrote: Sun Sep 19, 2021 7:42 pm And why the "Flying Fudge" did that badly screw up the MessageBox?
-
SShot 2021-09-19 at 22.36.58.png
I don't know, did you mean colorizing the line? It's not doing that on my copy.
I have seen the message box pick up the text styling when text is pasted from another app. That happened in vanilla LC though.
User avatar
OpenXTalkPaul
Posts: 1652
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Replacing 'This'

Post by OpenXTalkPaul »

Messing about with revmenubar stack I just uncovered a bug in the Rotate sub menu, for one thing there's unicode it's got unicode degrees symbol embedded in a plain text string which I guess is OK as long as you edit in a editor that supports unicode, I noticed via GitHub Desktop diff. But the real kicker is the menu doesn't work at all, and it doesn't in the official LCC 9.6.3 build either! You CAN rotate by script or from the property inspector, which is how I'd normally do that if I needed to, but the menu item and pop-up "rotate by..." palette do not do anything. I don't know if this is a known bug or not, but I would think it should be easy to fix (again, it does work via Prop Inspector or Script).

EDIT: It's a very OLD bug:
https://github.com/livecode/livecode-ide/pull/946
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest