mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 08:51:17 +02:00
LCL-GTK2: Futher fixes for TrayIcon. Issue #36199, patch from David.
git-svn-id: trunk@62124 -
This commit is contained in:
parent
f625e656d0
commit
a9ffb7fc67
@ -260,40 +260,22 @@ var
|
|||||||
Initialized: Boolean;
|
Initialized: Boolean;
|
||||||
|
|
||||||
function UnityAppIndicatorInit: Boolean;
|
function UnityAppIndicatorInit: Boolean;
|
||||||
|
var
|
||||||
|
Module: HModule;
|
||||||
|
UseAppInd : string;
|
||||||
|
|
||||||
|
function NeedAppIndicator: boolean;
|
||||||
var
|
var
|
||||||
Module: HModule;
|
DeskTop : String;
|
||||||
UseAppInd : string;
|
begin
|
||||||
|
DeskTop := GetEnvironmentVariableUTF8('XDG_CURRENT_DESKTOP');
|
||||||
function NeedAppIndicator: boolean;
|
// See the wiki for details of what extras these desktops require !!
|
||||||
var
|
if (Desktop = 'GNOME')
|
||||||
DeskTop, VersionSt : String;
|
or (DeskTop = 'Unity')
|
||||||
ProcFile: TextFile;
|
or (Desktop = 'Enlightenment')
|
||||||
begin
|
or (Desktop = 'ubuntu:GNOME') then exit(True);
|
||||||
DeskTop := GetEnvironmentVariableUTF8('XDG_CURRENT_DESKTOP');
|
Result := False;
|
||||||
// See the wiki for details of what extras these desktops require !!
|
end;
|
||||||
if (DeskTop = 'Unity')
|
|
||||||
or (Desktop = 'Enlightenment')
|
|
||||||
then exit(True);
|
|
||||||
if (DeskTop = 'GNOME') then begin
|
|
||||||
{$PUSH}
|
|
||||||
{$IOChecks off}
|
|
||||||
AssignFile(ProcFile, '/proc/version');
|
|
||||||
reset(ProcFile);
|
|
||||||
if IOResult<>0 then exit(false);
|
|
||||||
{$POP}
|
|
||||||
readln(ProcFile, VersionSt);
|
|
||||||
CloseFile(ProcFile);
|
|
||||||
if ( (pos('mageia', VersionSt) > 0) or
|
|
||||||
(pos('Debian', VersionSt) > 0) or
|
|
||||||
(pos('Red Hat', VersionSt) > 0) or
|
|
||||||
(pos('SUSE', VersionSt) > 0) )
|
|
||||||
// 19.04 and earlier Ubuntu Gnome does not need LibAppIndicator3
|
|
||||||
then exit(True);
|
|
||||||
end;
|
|
||||||
Result := False;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function TryLoad(const ProcName: string; var Proc: Pointer): Boolean;
|
function TryLoad(const ProcName: string; var Proc: Pointer): Boolean;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user