mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Determine KDE also by "plasma" session
(cherry picked from commit 137c2af384)
This commit is contained in:
parent
a40b642242
commit
0e3e514db9
1 changed files with 6 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
This unit contains specific UNIX functions.
|
||||
|
||||
Copyright (C) 2008-2020 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2008-2021 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -276,7 +276,9 @@ var
|
|||
I: Integer;
|
||||
DesktopSession: String;
|
||||
const
|
||||
EnvVariable: array[0..1] of String = ('XDG_CURRENT_DESKTOP', 'DESKTOP_SESSION');
|
||||
EnvVariable: array[0..2] of String = ('XDG_CURRENT_DESKTOP',
|
||||
'XDG_SESSION_DESKTOP',
|
||||
'DESKTOP_SESSION');
|
||||
begin
|
||||
Result:= DE_UNKNOWN;
|
||||
for I:= Low(EnvVariable) to High(EnvVariable) do
|
||||
|
|
@ -286,6 +288,8 @@ begin
|
|||
DesktopSession:= LowerCase(DesktopSession);
|
||||
if Pos('kde', DesktopSession) <> 0 then
|
||||
Exit(DE_KDE);
|
||||
if Pos('plasma', DesktopSession) <> 0 then
|
||||
Exit(DE_KDE);
|
||||
if Pos('gnome', DesktopSession) <> 0 then
|
||||
Exit(DE_GNOME);
|
||||
if Pos('xfce', DesktopSession) <> 0 then
|
||||
|
|
@ -540,7 +544,6 @@ end;
|
|||
function MountDrive(Drive: PDrive): Boolean;
|
||||
{$IFDEF LINUX}
|
||||
var
|
||||
Index: Integer;
|
||||
MountPath: String = '';
|
||||
{$ENDIF}
|
||||
begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue