Skip to content

Commit

Permalink
Fix OSVERSIONINFO>>calculateOsName to work with post win8 app manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
blairmcg committed Feb 28, 2016
1 parent 7de7ea5 commit a14b646
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
22 changes: 11 additions & 11 deletions Core/Object Arts/Dolphin/Base/Deprecated/OSVERSIONINFO.cls
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ calculateOsName
major := self dwMajorVersion.
minor := self dwMinorVersion.
type := self wProductType.
major > 5
major <= 5
ifTrue:
["Vista or later"
minor > 0
ifTrue:
[^type == VER_NT_WORKSTATION ifTrue: [#win7] ifFalse: [#win2k8r2].
^type == VER_NT_WORKSTATION ifTrue: [#winVista] ifFalse: [#win2k8]]].
minor > 1 ifTrue: [^#win2k3].
minor > 0 ifTrue: [#winXP].
^#win2k!
[minor = 0 ifTrue: [^#win2k].
minor = 1 ifTrue: [^#winXP].
^#win2k3].
major = 6
ifTrue:
[minor = 0 ifTrue: [^type == VER_NT_WORKSTATION ifTrue: [#winVista] ifFalse: [#win2k8]].
minor = 1 ifTrue: [^type == VER_NT_WORKSTATION ifTrue: [#win7] ifFalse: [#win2k8r2]].
minor = 2 ifTrue: [^#win8].
^#win81].
^#win10!

dwBuildNumber
"Answer the receiver's dwBuildNumber field as a Smalltalk object."
Expand Down Expand Up @@ -73,7 +75,6 @@ isNT4
"

"NT4 is no longer supported"
#deprecated.
^false!

isWin2K
Expand Down Expand Up @@ -129,7 +130,6 @@ isWinMe
^false!

isWinV5
#deprecated. "Use isWinV5OrLater, or test for specific versions"
^#(#win2k #winXP #win98 #winMe) identityIncludes: self osName!

isWinV5OrLater
Expand Down
8 changes: 4 additions & 4 deletions Core/Object Arts/Dolphin/MVP/Base/SystemMetrics.cls
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Instance Variables:
scrollThumbExtent <Point>. Size of a scrollbar thumb (dependent on scrollbar width/height).
sizingFrameExtent <Point>. Width/height of the overlapped window resizing edge.
dialogFrameExtent <Point>. Width/height of the dialog window edge.
borderExtent <Point>. Width/height of the a window border (normally 1x1).
nonClientMetrics <NONCLIENTMETRICS>. Various non-client measurements.
borderExtent <Point>. Width/height of the a window border (normally 1x1).
nonClientMetrics <NONCLIENTMETRICS>. Various non-client measurements.
menuFont <Font>. The font used to paint menus.
edgeExtent <Point>. Width/height of a 3d window edge (normally 2x2).
edgeExtent <Point>. Width/height of a 3d window edge (normally 2x2).
hasFlatMenus <Boolean>. Whether or not the system menus are flat (XP-look) or have 3d appearance (classic Windows)
iconTitleFont <Font>. The font used to paint icon titles on the desktop - the nearest thing to a default desktop font.

Class Variables:
Current <SystemMetrics>. Singleton instance.
Current <SystemMetrics>. Singleton instance.

'!
!SystemMetrics categoriesForClass!Unclassified! !
Expand Down
2 changes: 2 additions & 0 deletions Core/Object Arts/Dolphin/MVP/Base/View.cls
Original file line number Diff line number Diff line change
Expand Up @@ -3448,6 +3448,8 @@ textLength
^UserLibrary default getWindowTextLength: self asParameter!

themeSubAppName
"Answer the theme class name to use for the view, or nil to use the default."

^nil!

toolTipWindow
Expand Down

0 comments on commit a14b646

Please sign in to comment.