[Gambas-user] Desktop.X11 Systray
herberth guzman
herberthguzman at ...626...
Tue Jun 24 23:04:38 CEST 2014
' Gambas module file
M_SYSTRAY(MODULE)
Public process_nm As Process
Public Sub Start_SysTray()
process_nm = Shell "nm-applet > /dev/null 2>/dev/null"
X11Systray.Show(f_panel.draSystemTray.Handle)
End
Public Sub ArrangeTray()
Dim I As Integer
Dim X, Y, H As Integer
X = 2
Y = 2
For I = 0 To X11Systray.Count - 1
With X11Systray[I]
If (X + .IconW) >= (f_panel.draSystemTray.W - 2) Then
X = 2
Y += H + 2
H = 0
Endif
.Move(X, Y, .IconW, .IconH)
H = Max(H, .IconH)
X += .IconW + 2
End With
Next
End
Public Sub X11Systray_Arrange()
f_panel.ArrangeTray
End
' Gambas class file
FORM_PANEL
Public id_win_active As Integer
Public Language As String = M_Var.Language_System
Public HPanel_app As Panel
Public hToggle As ToggleButton
Public cx As Connection
Public rs As Result
Public Sub Init()
Dim desk_w As Integer = Desktop.W
Desktop.Count = 2
m_kernel.ATOM_PANEL
M_Systemtray.Start_SysTray
End
Public Sub _new()
Me.TopOnly = True
M_Global.Add(Me)
m_kernel.Show_Img_Launcher
m_kernel.init_img_start
m_kernel.Show_Appearance_Taskbar
End
Public Sub Form_Open()
Init
Desktop_Windows
draSystemTray_Arrange
End
Public Sub draSystemTray_Arrange()
Dim DH As Integer
Paint.Begin(draSystemTray)
DH = 1 + draSystemTray.H / 16
Paint.End
M_Systemtray.ArrangeTray
End
Static Public Sub X11Systray_Arrange()
M_Systemtray.ArrangeTray
End
regards
Herberth Guzman
More information about the User
mailing list