1 |
armin76 08/06/18 18:46:45 |
2 |
|
3 |
Added: 300-xulonly-gnome_firefox_default_browser.patch |
4 |
Log: |
5 |
Add patch to fix bug #219444 |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 src/patchsets/mozilla-firefox/3.0/300-xulonly-gnome_firefox_default_browser.patch |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0/300-xulonly-gnome_firefox_default_browser.patch?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0/300-xulonly-gnome_firefox_default_browser.patch?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: 300-xulonly-gnome_firefox_default_browser.patch |
14 |
=================================================================== |
15 |
--- |
16 |
browser/components/shell/src/nsGNOMEShellService.cpp | 16 ++++++++++++++-- |
17 |
1 file changed, 14 insertions(+), 2 deletions(-) |
18 |
|
19 |
Index: mozilla/browser/components/shell/src/nsGNOMEShellService.cpp |
20 |
=================================================================== |
21 |
--- mozilla.orig/browser/components/shell/src/nsGNOMEShellService.cpp |
22 |
+++ mozilla/browser/components/shell/src/nsGNOMEShellService.cpp |
23 |
@@ -62,16 +62,18 @@ |
24 |
#endif |
25 |
|
26 |
#include <glib.h> |
27 |
#include <glib-object.h> |
28 |
#include <gdk-pixbuf/gdk-pixbuf.h> |
29 |
#include <limits.h> |
30 |
#include <stdlib.h> |
31 |
|
32 |
+#define SYSTEM_PATH_BUILD 1 |
33 |
+ |
34 |
struct ProtocolAssociation |
35 |
{ |
36 |
const char *name; |
37 |
PRBool essential; |
38 |
}; |
39 |
|
40 |
struct MimeTypeAssociation |
41 |
{ |
42 |
@@ -135,17 +137,16 @@ |
43 |
return appPath->GetNativePath(mAppPath); |
44 |
} |
45 |
|
46 |
NS_IMPL_ISUPPORTS1(nsGNOMEShellService, nsIShellService) |
47 |
|
48 |
PRBool |
49 |
nsGNOMEShellService::KeyMatchesAppName(const char *aKeyValue) const |
50 |
{ |
51 |
- |
52 |
gchar *commandPath; |
53 |
if (mUseLocaleFilenames) { |
54 |
gchar *nativePath = g_filename_from_utf8(aKeyValue, -1, NULL, NULL, NULL); |
55 |
if (!nativePath) { |
56 |
NS_ERROR("Error converting path to filesystem encoding"); |
57 |
return PR_FALSE; |
58 |
} |
59 |
|
60 |
@@ -153,19 +154,25 @@ |
61 |
g_free(nativePath); |
62 |
} else { |
63 |
commandPath = g_find_program_in_path(aKeyValue); |
64 |
} |
65 |
|
66 |
if (!commandPath) |
67 |
return PR_FALSE; |
68 |
|
69 |
+#ifdef SYSTEM_PATH_BUILD |
70 |
+ PRBool matches = NS_LITERAL_CSTRING("/usr/bin/" MOZ_APP_NAME).Equals(commandPath); |
71 |
+ g_free(commandPath); |
72 |
+ return matches; |
73 |
+#else |
74 |
PRBool matches = mAppPath.Equals(commandPath); |
75 |
g_free(commandPath); |
76 |
return matches; |
77 |
+#endif |
78 |
} |
79 |
|
80 |
NS_IMETHODIMP |
81 |
nsGNOMEShellService::IsDefaultBrowser(PRBool aStartupCheck, |
82 |
PRBool* aIsDefaultBrowser) |
83 |
{ |
84 |
*aIsDefaultBrowser = PR_FALSE; |
85 |
if (aStartupCheck) |
86 |
@@ -211,18 +218,23 @@ |
87 |
#ifdef DEBUG |
88 |
if (aForAllUsers) |
89 |
NS_WARNING("Setting the default browser for all users is not yet supported"); |
90 |
#endif |
91 |
|
92 |
nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID); |
93 |
|
94 |
nsCAutoString schemeList; |
95 |
+ |
96 |
+#ifdef SYSTEM_PATH_BUILD |
97 |
+ nsCAutoString appKeyValue(NS_LITERAL_CSTRING("/usr/bin/" MOZ_APP_NAME)); |
98 |
+#else |
99 |
nsCAutoString appKeyValue(mAppPath); |
100 |
- appKeyValue.Append(" \"%s\""); |
101 |
+#endif |
102 |
+ appKeyValue.Append(" %s"); |
103 |
unsigned int i; |
104 |
|
105 |
for (i = 0; i < NS_ARRAY_LENGTH(appProtocols); ++i) { |
106 |
schemeList.Append(nsDependentCString(appProtocols[i].name)); |
107 |
schemeList.Append(','); |
108 |
|
109 |
if (appProtocols[i].essential || aClaimAllTypes) { |
110 |
gconf->SetAppForProtocol(nsDependentCString(appProtocols[i].name), |
111 |
|
112 |
|
113 |
|
114 |
-- |
115 |
gentoo-commits@l.g.o mailing list |