Purebasic 6.10 - #PB_Event_SysTray

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

Ausprobieren
New User
New User
Posts: 6
Joined: Thu May 29, 2014 1:42 pm

Purebasic 6.10 - #PB_Event_SysTray

Post by Ausprobieren »

Hello friends,
i try following coding:

Code: Select all

; Unsichtbares Fenster, um nur den Systray anzuzeigen
  OpenWindow(0, 0, 0, 10, 10, "", #PB_Window_Invisible)
  UsePNGImageDecoder()
  AddSysTrayIcon(0, WindowID(0), LoadImage(0, #PB_Compiler_Home + "examples/sources/Data/world.png"))
  ; Erstellt ein Popup-Menü, das im Systray im Systray-Look angezeigt wird
  CreatePopupImageMenu(0, #PB_Menu_SysTrayLook)
    MenuItem(0, "About PureBasic...")
    MenuBar()
    MenuItem(1, "Exit")
  ; Verknüpft das Menü mit dem Systray
;   SysTrayIconMenu(0, MenuID(0))
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_SysTray
        Debug "#PB_Event_SysTray"   
        
      Case #PB_Event_Menu
        Select EventMenu()
          Case 1 ; Exit 
            RemoveSysTrayIcon(0)
            End
        EndSelect
    EndSelect
  ForEver
The result is:
[00:02:58] Warte auf den Start des Executable...
[00:02:58] Executable-Typ: Linux - x64 (64bit, Unicode, Purifier)
[00:02:58] Executable gestartet.
[00:02:58] [WARNING] Test610.pb (Zeile: 17)
[00:02:58] [WARNING] Gdk (CRITICAL): gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
[00:03:04] Das Programm wurde beendet.
I cannot understand it. The first is: no reaction on the var <#PB_Event_SysTray> and then the message
Gdk (CRITICAL): gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
What means the compiler with this messages????

Can anybody explain me this message?! And the net is: I cannot use the version 6.10, because i query this interrupt "#PB_Event_SysTray" in a lot of progams. An this does not exist for Purebasic 6.10

Thanks for any help.

Ingo
User avatar
mk-soft
Always Here
Always Here
Posts: 6239
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Purebasic 6.10 - #PB_Event_SysTray

Post by mk-soft »

Code: Select all

Gdk (CRITICAL): gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
You can ignore this message. Only occurs sometimes and depending on the linux distribution.

The second point is more difficult:
With the last GTK3 version, the old GTK internal Systray was finally removed from the GTK3 system.
So a replacement had to be found. This is the much used libappindicator3-1. This is now also used by PureBasic v6.10.
However, this does not provide a mouse click event and only the possibility to connect a menu. The 'scroll-event' is supported, but I don't know what this is good for.

How the libappindicator works and what is possible, you can see with my example.
Link: Linux AppIndicator
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Fred
Administrator
Administrator
Posts: 18178
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Purebasic 6.10 - #PB_Event_SysTray

Post by Fred »

To move to doc. The Systray event is no more supported on Linux, a menu is needed to interact with it.+
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2139
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Purebasic 6.10 - #PB_Event_SysTray

Post by Andre »

Related to this already open bug-report: https://www.purebasic.fr/english/viewtopic.php?p=621241

@Fred should take a look, which notes should be added to the docs...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply