Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f31fad32
Kaydet (Commit)
f31fad32
authored
Tem 02, 2013
tarafından
Pader Rezso
Kaydeden (comit)
Michael Meeks
Tem 02, 2013
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46990 - detect MATE and XFCE desktops.
Change-Id: Id72860fc2e7d6b40f4fcb96b8f504a4f86a335b1
üst
3887ba56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
3 deletions
+33
-3
desktops.hxx
vcl/inc/unx/desktops.hxx
+2
-0
desktopdetector.cxx
vcl/unx/generic/desktopdetect/desktopdetector.cxx
+29
-1
salplug.cxx
vcl/unx/generic/plugadapt/salplug.cxx
+2
-2
No files found.
vcl/inc/unx/desktops.hxx
Dosyayı görüntüle @
f31fad32
...
...
@@ -24,6 +24,8 @@ enum DesktopType {
DESKTOP_NONE
,
// headless, i.e. no X connection at all
DESKTOP_UNKNOWN
,
// unknown desktop, simple WM, etc.
DESKTOP_GNOME
,
DESKTOP_XFCE
,
DESKTOP_MATE
,
DESKTOP_KDE
,
DESKTOP_KDE4
,
DESKTOP_TDE
...
...
vcl/unx/generic/desktopdetect/desktopdetector.cxx
Dosyayı görüntüle @
f31fad32
...
...
@@ -43,8 +43,10 @@ static bool is_gnome_desktop( Display* pDisplay )
// warning: these checks are coincidental, GNOME does not
// explicitly advertise itself
if
(
NULL
!=
getenv
(
"GNOME_DESKTOP_SESSION_ID"
)
)
if
(
"gnome"
==
getenv
(
"DESKTOP_SESSION"
)
||
NULL
!=
getenv
(
"GNOME_DESKTOP_SESSION_ID"
)
)
{
ret
=
true
;
}
if
(
!
ret
)
{
...
...
@@ -119,6 +121,24 @@ static bool is_gnome_desktop( Display* pDisplay )
return
ret
;
}
static
bool
is_xfce_desktop
(
Display
*
pDisplay
)
{
if
(
"xfce"
==
getenv
(
"DESKTOP_SESSION"
)
)
{
return
true
;
}
return
false
;
}
static
bool
is_mate_desktop
(
Display
*
pDisplay
)
{
if
(
"mate"
==
getenv
(
"DESKTOP_SESSION"
)
)
{
return
true
;
}
return
false
;
}
static
bool
bWasXError
=
false
;
static
inline
bool
WasXError
()
...
...
@@ -291,6 +311,10 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
return
DESKTOP_KDE4
;
if
(
aOver
.
equalsIgnoreAsciiCase
(
"gnome"
)
)
return
DESKTOP_GNOME
;
if
(
aOver
.
equalsIgnoreAsciiCase
(
"xfce"
)
)
return
DESKTOP_XFCE
;
if
(
aOver
.
equalsIgnoreAsciiCase
(
"mate"
)
)
return
DESKTOP_MATE
;
if
(
aOver
.
equalsIgnoreAsciiCase
(
"kde"
)
)
return
DESKTOP_KDE
;
if
(
aOver
.
equalsIgnoreAsciiCase
(
"none"
)
)
...
...
@@ -351,6 +375,10 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
ret
=
DESKTOP_KDE4
;
else
if
(
is_gnome_desktop
(
pDisplay
)
)
ret
=
DESKTOP_GNOME
;
else
if
(
is_xfce_desktop
(
pDisplay
)
)
ret
=
DESKTOP_XFCE
;
else
if
(
is_mate_desktop
(
pDisplay
)
)
ret
=
DESKTOP_MATE
;
else
if
(
is_kde_desktop
(
pDisplay
)
)
ret
=
DESKTOP_KDE
;
else
...
...
vcl/unx/generic/plugadapt/salplug.cxx
Dosyayı görüntüle @
f31fad32
...
...
@@ -188,7 +188,7 @@ static SalInstance* autodetect_plugin()
// no server at all: dummy plugin
if
(
desktop
==
DESKTOP_NONE
)
pList
=
pHeadlessFallbackList
;
else
if
(
desktop
==
DESKTOP_GNOME
)
else
if
(
desktop
==
DESKTOP_GNOME
||
desktop
==
DESKTOP_XFCE
||
desktop
==
DESKTOP_MATE
)
pList
=
pStandardFallbackList
;
else
if
(
desktop
==
DESKTOP_TDE
)
pList
=
pTDEFallbackList
;
...
...
@@ -287,7 +287,7 @@ void SalAbort( const OUString& rErrorText, bool bDumpCore )
_exit
(
1
);
}
static
const
char
*
desktop_strings
[]
=
{
"none"
,
"unknown"
,
"GNOME"
,
"TDE"
,
"KDE"
,
"KDE4"
};
static
const
char
*
desktop_strings
[]
=
{
"none"
,
"unknown"
,
"GNOME"
,
"
XFCE"
,
"MATE"
,
"
TDE"
,
"KDE"
,
"KDE4"
};
const
OUString
&
SalGetDesktopEnvironment
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment