equal
deleted
inserted
replaced
1 # HG changeset patch |
1 # HG changeset patch |
2 # User msirringhaus@suse.de |
2 # User msirringhaus@suse.de |
3 # Date 1559294891 -7200 |
3 # Date 1559294891 -7200 |
4 # Fri May 31 11:28:11 2019 +0200 |
4 # Fri May 31 11:28:11 2019 +0200 |
5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 |
5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 |
6 # Parent 0dd1b6436342922d434e7c818875b2a02a73b5ed |
6 # Parent 9eb4df0e07175ce38fc6699b2b8544b9eda7f0ad |
7 Description: Add KDE integration to Firefox (toolkit parts) |
7 Description: Add KDE integration to Firefox (toolkit parts) |
8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
9 Author: Lubos Lunak <lunak@suse.com> |
9 Author: Lubos Lunak <lunak@suse.com> |
10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
11 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
11 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
368 if CONFIG["MOZ_HAS_REMOTE"]: |
368 if CONFIG["MOZ_HAS_REMOTE"]: |
369 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp |
369 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp |
370 new file mode 100644 |
370 new file mode 100644 |
371 --- /dev/null |
371 --- /dev/null |
372 +++ b/toolkit/xre/nsKDEUtils.cpp |
372 +++ b/toolkit/xre/nsKDEUtils.cpp |
373 @@ -0,0 +1,344 @@ |
373 @@ -0,0 +1,321 @@ |
374 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
374 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
375 +/* This Source Code Form is subject to the terms of the Mozilla Public |
375 +/* This Source Code Form is subject to the terms of the Mozilla Public |
376 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
376 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
377 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
377 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
378 + |
378 + |
408 +#define KMOZILLAHELPER_VERSION 6 |
408 +#define KMOZILLAHELPER_VERSION 6 |
409 +#define MAKE_STR2( n ) #n |
409 +#define MAKE_STR2( n ) #n |
410 +#define MAKE_STR( n ) MAKE_STR2( n ) |
410 +#define MAKE_STR( n ) MAKE_STR2( n ) |
411 + |
411 + |
412 +static bool getKdeSession() |
412 +static bool getKdeSession() |
413 + { |
413 +{ |
414 + Display* dpy = XOpenDisplay( NULL ); |
414 + if (PR_GetEnv("KDE_FULL_SESSION")) |
415 + if( dpy == NULL ) |
415 + { |
416 + return false; |
416 + return true; |
417 + Atom kde_full_session = XInternAtom( dpy, "KDE_FULL_SESSION", true ); |
417 + } |
418 + bool kde = false; |
418 + return false; |
419 + if( kde_full_session != None ) |
419 +} |
420 + { |
|
421 + int cnt; |
|
422 + if( Atom* props = XListProperties( dpy, DefaultRootWindow( dpy ), &cnt )) |
|
423 + { |
|
424 + for( int i = 0; |
|
425 + i < cnt; |
|
426 + ++i ) |
|
427 + { |
|
428 + if( props[ i ] == kde_full_session ) |
|
429 + { |
|
430 + kde = true; |
|
431 +#ifdef DEBUG_KDE |
|
432 + fprintf( stderr, "KDE SESSION %d\n", kde ); |
|
433 +#endif |
|
434 + break; |
|
435 + } |
|
436 + } |
|
437 + XFree( props ); |
|
438 + } |
|
439 + } |
|
440 + XCloseDisplay( dpy ); |
|
441 + return kde; |
|
442 + } |
|
443 + |
420 + |
444 +static bool getKdeSupport() |
421 +static bool getKdeSupport() |
445 + { |
422 + { |
446 + nsTArray<nsCString> command; |
423 + nsTArray<nsCString> command; |
447 + command.AppendElement( "CHECK"_ns ); |
424 + command.AppendElement( "CHECK"_ns ); |
1281 NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); |
1258 NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); |
1282 gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); |
1259 gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); |
1283 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1260 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1284 --- a/widget/gtk/moz.build |
1261 --- a/widget/gtk/moz.build |
1285 +++ b/widget/gtk/moz.build |
1262 +++ b/widget/gtk/moz.build |
1286 @@ -137,16 +137,17 @@ FINAL_LIBRARY = "xul" |
1263 @@ -136,16 +136,17 @@ FINAL_LIBRARY = "xul" |
1287 |
1264 |
1288 LOCAL_INCLUDES += [ |
1265 LOCAL_INCLUDES += [ |
1289 "/layout/base", |
1266 "/layout/base", |
1290 "/layout/forms", |
1267 "/layout/forms", |
1291 "/layout/generic", |
1268 "/layout/generic", |
1843 # include <Carbon/Carbon.h> |
1820 # include <Carbon/Carbon.h> |
1844 # include "CocoaFileUtils.h" |
1821 # include "CocoaFileUtils.h" |
1845 # include "prmem.h" |
1822 # include "prmem.h" |
1846 # include "plbase64.h" |
1823 # include "plbase64.h" |
1847 |
1824 |
1848 @@ -2023,62 +2024,77 @@ nsLocalFile::SetPersistentDescriptor(con |
1825 @@ -2025,62 +2026,77 @@ nsLocalFile::SetPersistentDescriptor(con |
1849 |
1826 |
1850 NS_IMETHODIMP |
1827 NS_IMETHODIMP |
1851 nsLocalFile::Reveal() { |
1828 nsLocalFile::Reveal() { |
1852 if (!FilePreferences::IsAllowedPath(mPath)) { |
1829 if (!FilePreferences::IsAllowedPath(mPath)) { |
1853 return NS_ERROR_FILE_ACCESS_DENIED; |
1830 return NS_ERROR_FILE_ACCESS_DENIED; |