Skip to content

Commit ebb9b91

Browse files
authored
Merge pull request #11 from cubesql/feature/remove-ssl-libs
Xojo 2014r1.1 | Cleanups
2 parents a9c7f5f + 8dbd0e2 commit ebb9b91

File tree

20 files changed

+30
-257
lines changed

20 files changed

+30
-257
lines changed

App.rbbas

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Inherits Application
1818

1919
#tag Event
2020
Sub Open()
21-
Controls.GTK3_GlobalStyleCSS()
22-
2321
call Prefs.Open
2422
SSLStartupCheck
2523
End Sub

Components/Controls/BetterComboBox.xojo_code

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ Protected Class BetterComboBox
33
Inherits ComboBox
44
#tag Event
55
Sub Open()
6-
#if TargetLinux and (XojoVersion >= 2017.02) then
7-
me.InitControl_GTK3()
8-
#endif
9-
106
#If TargetLinux
11-
Controls.InitControl_Height(me) = 26
12-
#endif
7+
Controls.InitControl_Height(Me) = 26
8+
#EndIf
139

1410
#If TargetWindows
15-
Controls.InitControl_Height(me) = 22
16-
#endif
11+
Controls.InitControl_Height(Me) = 22
12+
#EndIf
1713

1814
Open
1915
End Sub

Components/Controls/BetterPopupMenu.xojo_code

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ Protected Class BetterPopupMenu
33
Inherits PopupMenu
44
#tag Event
55
Sub Open()
6-
#if TargetLinux and (XojoVersion >= 2017.02) then
7-
me.InitControl_GTK3()
8-
#endif
9-
106
#If TargetLinux
11-
Controls.InitControl_Height(me) = 26
12-
#endif
7+
Controls.InitControl_Height(Me) = 26
8+
#EndIf
139

1410
#If TargetWindows
15-
Controls.InitControl_Height(me) = 22
16-
#endif
11+
Controls.InitControl_Height(Me) = 22
12+
#EndIf
1713

1814
Open
1915
End Sub

Components/Controls/BetterPushButton.xojo_code

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ Protected Class BetterPushButton
33
Inherits PushButton
44
#tag Event
55
Sub Open()
6-
#if TargetLinux and (XojoVersion >= 2017.02) then
7-
me.InitControl_GTK3()
8-
#endif
9-
106
#If TargetLinux
11-
Controls.InitControl_Height(me) = 26
12-
#endif
7+
Controls.InitControl_Height(Me) = 26
8+
#EndIf
139

1410
#If TargetWindows
15-
Controls.InitControl_Height(me) = 22
16-
#endif
11+
Controls.InitControl_Height(Me) = 22
12+
#EndIf
1713

1814
Open
1915
End Sub

Components/Controls/BetterTextField.xojo_code

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ Protected Class BetterTextField
33
Inherits TextField
44
#tag Event
55
Sub Open()
6-
#if TargetLinux and (XojoVersion >= 2017.02) then
7-
me.InitControl_GTK3()
8-
#endif
9-
106
#If TargetLinux
11-
Controls.InitControl_Height(me) = 26
12-
#endif
7+
Controls.InitControl_Height(Me) = 26
8+
#EndIf
139

1410
#If TargetWindows
15-
Controls.InitControl_Height(me) = 22
16-
#endif
11+
Controls.InitControl_Height(Me) = 22
12+
#EndIf
1713

1814
Open
1915
End Sub
@@ -26,6 +22,14 @@ Inherits TextField
2622

2723

2824
#tag ViewBehavior
25+
#tag ViewProperty
26+
Name="Text"
27+
Visible=true
28+
Group="Initial State"
29+
InitialValue=""
30+
Type="String"
31+
EditorType="MultiLineEditor"
32+
#tag EndViewProperty
2933
#tag ViewProperty
3034
Name="AllowAutoDeactivate"
3135
Visible=true
@@ -105,14 +109,6 @@ Inherits TextField
105109
Type="String"
106110
EditorType="MultiLineEditor"
107111
#tag EndViewProperty
108-
#tag ViewProperty
109-
Name="Value"
110-
Visible=true
111-
Group="Initial State"
112-
InitialValue=""
113-
Type="String"
114-
EditorType="MultiLineEditor"
115-
#tag EndViewProperty
116112
#tag ViewProperty
117113
Name="AllowTabs"
118114
Visible=true

Components/Modules/Controls.xojo_code

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,5 @@
11
#tag Module
22
Protected Module Controls
3-
#tag Method, Flags = &h1
4-
Protected Sub GTK3_GlobalStyleCSS()
5-
//GTK3
6-
#If TargetLinux and (XojoVersion >= 2017.02) Then
7-
Dim sLinuxOSVersion As String = "undefined"
8-
9-
Dim shlHost As New Shell
10-
shlHost.Execute "lsb_release -d" 'Description: Ubuntu 16.04.3 LTS
11-
Dim sResult As String
12-
if (shlHost.ErrorCode = 0) then sResult = Trim(shlHost.Result)
13-
14-
'if we get the expected result
15-
if (Left(sResult, 12) = "Description:") then
16-
sResult = ReplaceLineEndings(sResult, " ")
17-
sLinuxOSVersion = Trim(Mid(sResult, 13))
18-
end if
19-
20-
21-
Dim sStylesCSS() As String
22-
23-
sStylesCSS.Append("entry, .entry { min-height:10px; min-width:18px; }")
24-
sStylesCSS.Append("entry, .entry { padding:1px; padding-left: 5px; padding-right: 5px; margin:0px; }")
25-
if (InStr(sLinuxOSVersion, "Ubuntu 16.04") > 0) then
26-
sStylesCSS.Append("entry, .entry { padding:4px; }")
27-
end if
28-
sStylesCSS.Append("button, .button { min-height:16px; min-width:18px; }")
29-
sStylesCSS.Append("button, .button { padding:0px; padding-left: 4px; padding-right: 4px; margin:0px; }")
30-
sStylesCSS.Append("messagedialog .dialog-action-area button { padding: 5px; }")
31-
sStylesCSS.Append("GtkMessageDialog * { padding: 5px; margin: 5px; }")
32-
sStylesCSS.Append("GtkMessageDialog GtkButton GtkLabel{ padding: 4px; padding-top: 2px; padding-bottom: 4px; margin: 0px; }")
33-
'sStylesCSS.Append("scrollbar.horizontal trough slider { min-height:8px; }")
34-
'sStylesCSS.Append("scrollbar.vertical trough slider { min-width:8px; }")
35-
sStylesCSS.Append("progressbar trough { min-width:1px; }")
36-
37-
'Ubuntu 14 has a parsing error when assigning "min-width/height"
38-
'so let's go through the Styles one-by-one, and just assign those that work in the client's distribution
39-
for i As Integer = 0 to UBound(sStylesCSS)
40-
GTK3_GlobalStyleCSS = sStylesCSS(i)
41-
next
42-
#EndIf
43-
End Sub
44-
#tag EndMethod
45-
46-
#tag Method, Flags = &h21
47-
Private Sub GTK3_GlobalStyleCSS(Assigns psCSSData As String)
48-
//GTK3
49-
#If TargetLinux and (XojoVersion >= 2017.02) Then
50-
If (Trim(psCSSData) = "") Then Return
51-
52-
Try
53-
Declare Function gdk_screen_get_default Lib "libgdk-3" () As Ptr
54-
Declare Function gtk_css_provider_new Lib "libgtk-3" () As Ptr
55-
Declare Function gtk_css_provider_load_from_data Lib "libgtk-3" (provider As Ptr, data As CString, dataLen As Integer, error As Ptr) As Boolean
56-
Declare Sub gtk_style_context_add_provider_for_screen Lib "libgtk-3" (Screen As Ptr, provider As Ptr, priority As UInt32)
57-
Declare Sub g_object_unref Lib "libgobject-2.0" (obj As Ptr)
58-
59-
Const GTK_STYLE_PROVIDER_PRIORITY_APPLICATION = 600
60-
61-
Dim Screen As Ptr = gdk_screen_get_default
62-
Dim provider As Ptr = gtk_css_provider_new
63-
If (provider = Nil) Then Return
64-
65-
try
66-
If gtk_css_provider_load_from_data(provider, psCSSData, psCSSData.Len, Nil) Then
67-
gtk_style_context_add_provider_for_screen(Screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION)
68-
End If
69-
70-
Catch err As RuntimeException
71-
'ignore
72-
Finally
73-
g_object_unref(provider)
74-
End Try
75-
76-
Catch err As RuntimeException
77-
'ignore
78-
End Try
79-
80-
#EndIf
81-
End Sub
82-
#tag EndMethod
83-
84-
#tag Method, Flags = &h0
85-
Sub InitControl_GTK3(Extends poControl As Control)
86-
//GTK3
87-
#If TargetLinux And (XojoVersion >= 2017.02) Then
88-
Declare Sub g_object_set Lib "libgtk-3" (obj As Ptr, name As CString, value As Int32, term As ptr=Nil)
89-
Declare Function gtk_bin_get_child Lib "libgtk-3" (obj As ptr) As Ptr
90-
91-
If (poControl IsA TextField) Then
92-
g_object_set(Ptr(TextField(poControl).Handle), "width-chars", 0)
93-
End If
94-
95-
If (poControl IsA ComboBox) Then
96-
Dim t As Ptr = gtk_bin_get_child(Ptr(ComboBox(poControl).Handle))
97-
g_object_set(t, "width-chars", 0)
98-
End If
99-
#EndIf
100-
101-
102-
End Sub
103-
#tag EndMethod
104-
1053
#tag Method, Flags = &h1
1064
Protected Sub InitControl_Height(poControl As RectControl, Assigns piHeight As Integer)
1075
if (poControl.Height < piHeight) then

CubeSQLAdmin.rbvcp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Type=Desktop
2-
RBProjectVersion=2022.041
2+
RBProjectVersion=2024.011
33
MinIDEVersion=20150400
44
OrigIDEVersion=00000000
55
Class=App;App.rbbas;&h0000000053B9B0EB;&h0000000000000000;false
@@ -31,7 +31,6 @@ Window=DownloadDBWindow;Windows/DownloadDBWindow.rbfrm;&h000000004C3A8FDC;&h0000
3131
Folder=Others;Others;&h000000000D65E24C;&h0000000000000000;false
3232
FileTypeSet=FileTypes;Others/FileTypes.rbbas;&h00000000533C8535;&h000000000D65E24C;false
3333
MenuBar=MenuBar1;Others/MenuBar1.rbmnu;&h0000000014305D4A;&h000000000D65E24C;false
34-
BuildSteps=Build Automation;Others/Build Automation.rbbas;&h0000000019FBAFFF;&h000000000D65E24C;false
3534
Window=SetKeyDBWindow;Windows/SetKeyDBWindow.rbfrm;&h0000000013DE5541;&h00000000733CF146;false
3635
Window=RegistrationWindow;Windows/RegistrationWindow.rbfrm;&h000000000E49309D;&h00000000733CF146;false
3736
Window=TableWindow;Windows/TableWindow.rbfrm;&h000000000E34A406;&h00000000733CF146;false
@@ -78,12 +77,12 @@ SubVersion=0
7877
NonRelease=0
7978
Release=3
8079
InfoVersion=
81-
LongVersion=@2023 SQLabs srl
80+
LongVersion=@2024 SQLabs srl
8281
ShortVersion=5.9.0
8382
WinCompanyName=SQLabs
84-
WinInternalName=
83+
WinInternalName=cubeSQLAdmin
8584
WinProductName=cubeSQLAdmin
86-
WinFileDescription=
85+
WinFileDescription=cubeSQLAdmin
8786
AutoIncrementVersionInformation=False
8887
BuildFlags=&h4900
8988
BuildLanguage=&h0
@@ -105,10 +104,12 @@ HiDPI=True
105104
DarkMode=True
106105
CopyRedistNextToWindowsEXE=False
107106
IncludePDB=False
107+
WinUIFramework=False
108108
IsWebProject=False
109109
LinuxBuildArchitecture=1
110110
MacBuildArchitecture=4
111111
WindowsBuildArchitecture=1
112+
LinuxNormalizeControlSizes=True
112113
OptimizationLevel=6
113114
WindowsVersions={35138b9a-5d96-4fbd-8e2d-a2440225f93a}|{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}|{1f676c76-80e1-4239-95bb-83d0f6d0da78}|{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}
114115
WindowsRunAs=0

Others/Build Automation.rbbas

Lines changed: 0 additions & 106 deletions
This file was deleted.
-3.19 MB
Binary file not shown.
-701 KB
Binary file not shown.

0 commit comments

Comments
 (0)