Skip to content

Commit dbe350c

Browse files
authored
Merge pull request #9 from cubesql/feature/minor-updates
Minor Updates
2 parents 0b2654f + c60f863 commit dbe350c

File tree

6 files changed

+139
-124
lines changed

6 files changed

+139
-124
lines changed

Components/Modules/Controls.xojo_code

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,32 @@ Protected Module Controls
113113
End Sub
114114
#tag EndMethod
115115

116+
#tag Method, Flags = &h0, CompatibilityFlags = TargetHasGUI
117+
Sub SetWindowIcon_Linux(Extends poWindow As Window, Assigns poIcon As Picture)
118+
'Set Icon for a Window
119+
'in order to show the Icon in the 'Launch Bar'
120+
121+
#If TargetLinux And TargetDesktop Then 'GTK3
122+
If (poIcon = Nil) Then Return
123+
124+
Declare Sub gtk_window_set_icon Lib "libgtk-3" (windowHandle As Integer, icon As Ptr)
125+
Declare Sub g_object_unref Lib "libgtk-3" (Object As Ptr)
126+
127+
Try
128+
Dim ptrToIcon As Ptr = poIcon.CopyOSHandle(Picture.HandleType.LinuxGdkPixbuf)
129+
If (ptrToIcon <> Nil) Then
130+
gtk_window_set_icon(poWindow.Handle, ptrToIcon)
131+
g_object_unref(ptrToIcon)
132+
End If
133+
Catch err As RuntimeException
134+
'ignore
135+
End Try
136+
137+
#EndIf
138+
139+
End Sub
140+
#tag EndMethod
141+
116142
#tag Method, Flags = &h0, CompatibilityFlags = TargetHasGUI
117143
Sub WM_SendMessage(piHwnd as Integer, piMsg as UInt32, piWParam as Integer, piLParam as Integer)
118144
#if TargetWindows then
@@ -150,34 +176,41 @@ Protected Module Controls
150176
Name="Name"
151177
Visible=true
152178
Group="ID"
179+
InitialValue=""
153180
Type="String"
181+
EditorType=""
154182
#tag EndViewProperty
155183
#tag ViewProperty
156184
Name="Index"
157185
Visible=true
158186
Group="ID"
159187
InitialValue="-2147483648"
160188
Type="Integer"
189+
EditorType=""
161190
#tag EndViewProperty
162191
#tag ViewProperty
163192
Name="Super"
164193
Visible=true
165194
Group="ID"
195+
InitialValue=""
166196
Type="String"
197+
EditorType=""
167198
#tag EndViewProperty
168199
#tag ViewProperty
169200
Name="Left"
170201
Visible=true
171202
Group="Position"
172203
InitialValue="0"
173204
Type="Integer"
205+
EditorType=""
174206
#tag EndViewProperty
175207
#tag ViewProperty
176208
Name="Top"
177209
Visible=true
178210
Group="Position"
179211
InitialValue="0"
180212
Type="Integer"
213+
EditorType=""
181214
#tag EndViewProperty
182215
#tag EndViewBehavior
183216
End Module

CubeSQLAdmin.rbvcp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Type=Desktop
2-
RBProjectVersion=2022.011
2+
RBProjectVersion=2022.041
33
MinIDEVersion=20150400
44
OrigIDEVersion=00000000
55
Class=App;App.rbbas;&h0000000053B9B0EB;&h0000000000000000;false
@@ -78,14 +78,14 @@ SubVersion=0
7878
NonRelease=0
7979
Release=3
8080
InfoVersion=
81-
LongVersion=@2022 SQLabs srl
81+
LongVersion=@2023 SQLabs srl
8282
ShortVersion=5.9.0
8383
WinCompanyName=SQLabs
8484
WinInternalName=
8585
WinProductName=cubeSQLAdmin
8686
WinFileDescription=
8787
AutoIncrementVersionInformation=False
88-
BuildFlags=&h1900
88+
BuildFlags=&h4900
8989
BuildLanguage=&h0
9090
DebugLanguage=&h0
9191
Region=
@@ -104,10 +104,12 @@ UseBuildsFolder=True
104104
HiDPI=True
105105
DarkMode=True
106106
CopyRedistNextToWindowsEXE=False
107+
IncludePDB=False
107108
IsWebProject=False
108-
LinuxBuildArchitecture=2
109+
LinuxBuildArchitecture=1
109110
MacBuildArchitecture=4
110111
WindowsBuildArchitecture=1
111112
OptimizationLevel=6
112113
WindowsVersions={35138b9a-5d96-4fbd-8e2d-a2440225f93a}|{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}|{1f676c76-80e1-4239-95bb-83d0f6d0da78}|{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}
113114
WindowsRunAs=0
115+
MacOSMinimumVersion=

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Marco Bambini ([email protected])
2626
```
2727
The MIT License (MIT)
2828
29-
Copyright (c) 2022 SQLabs
29+
Copyright (c) 2023 SQLabs
3030
3131
Permission is hereby granted, free of charge, to any person obtaining a copy
3232
of this software and associated documentation files (the "Software"), to deal

Windows/AboutBoxWindow.rbfrm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Begin Window AboutBoxWindow
145145
TabIndex = 6
146146
TabPanelIndex = 0
147147
TabStop = True
148-
Text = "Copyright © 2006-2022 SQLabs, All Rights Reserved."
148+
Text = "Copyright © 2006-2023 SQLabs, All Rights Reserved."
149149
TextAlign = 1
150150
TextColor = &c00000000
151151
TextFont = "SmallSystem"

Windows/ConnectWindow.rbfrm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,17 @@ End
699699
End Function
700700
#tag EndMethod
701701

702+
#tag Method, Flags = &h0
703+
Sub Constructor()
704+
Super.Constructor
705+
706+
#If TargetLinux And TargetDesktop Then 'GTK3
707+
Dim oIcon As Picture = icon.BestRepresentation(128, 128, 1.0)
708+
If (oIcon <> Nil) Then Self.SetWindowIcon_Linux = oIcon
709+
#EndIf
710+
End Sub
711+
#tag EndMethod
712+
702713
#tag Method, Flags = &h21
703714
Private Function GetSSLCertificate() As FolderItem
704715
Dim f As FolderItem
@@ -817,6 +828,8 @@ End
817828
return
818829
end if
819830

831+
call db.SQLExecute("SET CLIENT TYPE TO 'cubeSQLAdmin " + App.ShortVersion + " [CubeSQLPlugin " + CubeSQLPlugin.Version + " | Xojo " + XojoVersionString + "]'")
832+
820833
if (db.UserName.Lowercase <> "admin") then
821834
if (CheckAdmin(db) = false) then
822835
MsgBox "This application requires Admin privileges in order to function properly."

0 commit comments

Comments
 (0)