View | Details | Raw Unified | Return to bug 21509
Collapse All | Expand All

(-)mozilla/browser/app/Makefile.in.sav (+1 lines)
Lines 49-54 DIRS = profile/extensions Link Here
49
49
50
PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
50
PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
51
		  $(srcdir)/profile/channel-prefs.js \
51
		  $(srcdir)/profile/channel-prefs.js \
52
		  $(srcdir)/profile/kde.js \
52
		  $(NULL)
53
		  $(NULL)
53
54
54
ifndef MOZ_BRANDING_DIRECTORY
55
ifndef MOZ_BRANDING_DIRECTORY
(-)mozilla/browser/components/build/nsModule.cpp.sav (-3 / +4 lines)
Lines 46-52 Link Here
46
#elif defined(XP_MACOSX)
46
#elif defined(XP_MACOSX)
47
#include "nsMacShellService.h"
47
#include "nsMacShellService.h"
48
#elif defined(MOZ_WIDGET_GTK2)
48
#elif defined(MOZ_WIDGET_GTK2)
49
#include "nsGNOMEShellService.h"
49
#include "nsUnixShellService.h"
50
#endif
50
#endif
51
51
52
#ifndef WINCE
52
#ifndef WINCE
Lines 88-94 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindows Link Here
88
#elif defined(XP_MACOSX)
88
#elif defined(XP_MACOSX)
89
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
89
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
90
#elif defined(MOZ_WIDGET_GTK2)
90
#elif defined(MOZ_WIDGET_GTK2)
91
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
91
// in nsUnixShellService
92
//NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUnixShellService, Init)
92
#endif
93
#endif
93
94
94
#ifndef WINCE
95
#ifndef WINCE
Lines 132-138 static const nsModuleComponentInfo compo Link Here
132
  { "Browser Shell Service",
133
  { "Browser Shell Service",
133
    NS_SHELLSERVICE_CID,
134
    NS_SHELLSERVICE_CID,
134
    NS_SHELLSERVICE_CONTRACTID,
135
    NS_SHELLSERVICE_CONTRACTID,
135
    nsGNOMEShellServiceConstructor },
136
    nsUnixShellServiceConstructor },
136
137
137
#endif
138
#endif
138
139
(-)mozilla/browser/components/shell/src/Makefile.in.sav (-1 / +2 lines)
Lines 75-85 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_ Link Here
75
CPPSRCS = nsMacShellService.cpp
75
CPPSRCS = nsMacShellService.cpp
76
else
76
else
77
ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
77
ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
78
CPPSRCS = nsGNOMEShellService.cpp
78
CPPSRCS = nsUnixShellService.cpp nsGNOMEShellService.cpp nsKDEShellService.cpp
79
REQUIRES	+= \
79
REQUIRES	+= \
80
		mozgnome \
80
		mozgnome \
81
		thebes \
81
		thebes \
82
		$(NULL)
82
		$(NULL)
83
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
83
endif
84
endif
84
endif
85
endif
85
endif
86
endif
(-)mozilla/browser/components/shell/src/nsKDEShellService.cpp.sav (+193 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is Shell Service.
16
 *
17
 * The Initial Developer of the Original Code is mozilla.org.
18
 * Portions created by the Initial Developer are Copyright (C) 2004
19
 * the Initial Developer. All Rights Reserved.
20
 *
21
 * Contributor(s):
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 * of those above. If you wish to allow use of your version of this file only
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 * use your version of this file under the terms of the MPL, indicate your
30
 * decision by deleting the provisions above and replace them with the notice
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 * the provisions above, a recipient may use your version of this file under
33
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 *
35
 * ***** END LICENSE BLOCK ***** */
36
37
#include "nsKDEShellService.h"
38
#include "nsShellService.h"
39
#include "nsKDEUtils.h"
40
#include "nsCOMPtr.h"
41
#include "nsIPrefService.h"
42
#include "nsIProcess.h"
43
#include "nsILocalFile.h"
44
#include "nsServiceManagerUtils.h"
45
#include "nsComponentManagerUtils.h"
46
47
nsresult
48
nsKDEShellService::Init()
49
    {
50
    if( !nsKDEUtils::kdeSupport())
51
        return NS_ERROR_NOT_AVAILABLE;
52
    return NS_OK;
53
    }
54
55
NS_IMPL_ISUPPORTS1(nsKDEShellService, nsIShellService)
56
57
NS_IMETHODIMP
58
nsKDEShellService::IsDefaultBrowser(PRBool aStartupCheck,
59
                                      PRBool* aIsDefaultBrowser)
60
    {
61
    *aIsDefaultBrowser = PR_FALSE;
62
    if (aStartupCheck)
63
        mCheckedThisSession = PR_TRUE;
64
    nsCStringArray command;
65
    command.AppendCString( NS_LITERAL_CSTRING( "ISDEFAULTBROWSER" ));
66
    if( nsKDEUtils::command( command ))
67
        *aIsDefaultBrowser = PR_TRUE;
68
    return NS_OK;
69
    }
70
71
NS_IMETHODIMP
72
nsKDEShellService::SetDefaultBrowser(PRBool aClaimAllTypes,
73
                                       PRBool aForAllUsers)
74
    {
75
    nsCStringArray command;
76
    command.AppendCString( NS_LITERAL_CSTRING( "SETDEFAULTBROWSER" ));
77
    command.AppendCString( aClaimAllTypes ? NS_LITERAL_CSTRING( "ALLTYPES" ) : NS_LITERAL_CSTRING( "NORMAL" ));
78
    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
79
    }
80
81
NS_IMETHODIMP
82
nsKDEShellService::GetShouldCheckDefaultBrowser(PRBool* aResult)
83
{
84
  // If we've already checked, the browser has been started and this is a 
85
  // new window open, and we don't want to check again.
86
  if (mCheckedThisSession) {
87
    *aResult = PR_FALSE;
88
    return NS_OK;
89
  }
90
91
  nsCOMPtr<nsIPrefBranch> prefs;
92
  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
93
  if (pserve)
94
    pserve->GetBranch("", getter_AddRefs(prefs));
95
96
  if (prefs)
97
    prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
98
99
  return NS_OK;
100
}
101
102
NS_IMETHODIMP
103
nsKDEShellService::SetShouldCheckDefaultBrowser(PRBool aShouldCheck)
104
{
105
  nsCOMPtr<nsIPrefBranch> prefs;
106
  nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
107
  if (pserve)
108
    pserve->GetBranch("", getter_AddRefs(prefs));
109
110
  if (prefs)
111
    prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
112
113
  return NS_OK;
114
}
115
116
NS_IMETHODIMP
117
nsKDEShellService::SetDesktopBackground(nsIDOMElement* aElement, 
118
                                          PRInt32 aPosition)
119
    {
120
    return NS_ERROR_NOT_IMPLEMENTED;
121
    }
122
123
NS_IMETHODIMP
124
nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
125
    {
126
    return NS_ERROR_NOT_IMPLEMENTED;
127
    }
128
129
NS_IMETHODIMP
130
nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
131
    {
132
    return NS_ERROR_NOT_IMPLEMENTED;
133
    }
134
135
NS_IMETHODIMP
136
nsKDEShellService::OpenApplication(PRInt32 aApplication)
137
    {
138
    nsCStringArray command;
139
    if( aApplication == APPLICATION_MAIL )
140
        command.AppendCString( NS_LITERAL_CSTRING( "OPENMAIL" ));
141
    else if( aApplication == APPLICATION_NEWS )
142
        command.AppendCString( NS_LITERAL_CSTRING( "OPENNEWS" ));
143
    else
144
        return NS_ERROR_NOT_IMPLEMENTED;
145
    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
146
    }
147
148
NS_IMETHODIMP
149
nsKDEShellService::OpenApplicationWithURI(nsILocalFile* aApplication, const nsACString& aURI)
150
    {
151
    nsCStringArray command;
152
    command.AppendCString( NS_LITERAL_CSTRING( "RUN" ));
153
    nsCString app;
154
    nsresult rv = aApplication->GetNativePath( app );
155
    NS_ENSURE_SUCCESS( rv, rv );
156
    command.AppendCString( app );
157
    command.AppendCString( aURI );
158
    return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
159
    }
160
161
NS_IMETHODIMP
162
nsKDEShellService::GetDefaultFeedReader(nsILocalFile** _retval)
163
    {
164
    *_retval = nsnull;
165
166
    nsCStringArray command;
167
    command.AppendCString( NS_LITERAL_CSTRING( "GETDEFAULTFEEDREADER" ));
168
    nsCStringArray output;
169
    if( !nsKDEUtils::command( command, &output ) || output.Count() != 1 )
170
        return NS_ERROR_FAILURE;
171
172
    nsCString path;
173
    path = *output[ 0 ];
174
    if (path.IsEmpty())
175
        return NS_ERROR_FAILURE;
176
177
    nsresult rv;
178
    nsCOMPtr<nsILocalFile> defaultReader =
179
        do_CreateInstance("@mozilla.org/file/local;1", &rv);
180
    NS_ENSURE_SUCCESS(rv, rv);
181
182
    rv = defaultReader->InitWithNativePath(path);
183
    NS_ENSURE_SUCCESS(rv, rv);
184
185
    PRBool exists;
186
    rv = defaultReader->Exists(&exists);
187
    NS_ENSURE_SUCCESS(rv, rv);
188
    if (!exists)
189
        return NS_ERROR_FAILURE;
190
191
    NS_ADDREF(*_retval = defaultReader);
192
    return NS_OK;
193
    }
(-)mozilla/browser/components/shell/src/nsKDEShellService.h.sav (+59 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is Shell Service.
16
 *
17
 * The Initial Developer of the Original Code is mozilla.org.
18
 * Portions created by the Initial Developer are Copyright (C) 2004
19
 * the Initial Developer. All Rights Reserved.
20
 *
21
 * Contributor(s):
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 * of those above. If you wish to allow use of your version of this file only
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 * use your version of this file under the terms of the MPL, indicate your
30
 * decision by deleting the provisions above and replace them with the notice
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 * the provisions above, a recipient may use your version of this file under
33
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 *
35
 * ***** END LICENSE BLOCK ***** */
36
37
#ifndef nskdeshellservice_h____
38
#define nskdeshellservice_h____
39
40
#include "nsIShellService.h"
41
#include "nsStringAPI.h"
42
43
class nsKDEShellService : public nsIShellService
44
{
45
public:
46
  nsKDEShellService() : mCheckedThisSession(PR_FALSE) { }
47
48
  NS_DECL_ISUPPORTS
49
  NS_DECL_NSISHELLSERVICE
50
51
  nsresult Init() NS_HIDDEN;
52
53
private:
54
  ~nsKDEShellService() {}
55
56
  PRPackedBool mCheckedThisSession;
57
};
58
59
#endif // nskdeshellservice_h____
(-)mozilla/browser/components/shell/src/nsUnixShellService.cpp.sav (+52 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is Shell Service.
16
 *
17
 * The Initial Developer of the Original Code is mozilla.org.
18
 * Portions created by the Initial Developer are Copyright (C) 2004
19
 * the Initial Developer. All Rights Reserved.
20
 *
21
 * Contributor(s):
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 * of those above. If you wish to allow use of your version of this file only
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 * use your version of this file under the terms of the MPL, indicate your
30
 * decision by deleting the provisions above and replace them with the notice
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 * the provisions above, a recipient may use your version of this file under
33
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 *
35
 * ***** END LICENSE BLOCK ***** */
36
37
#include "nsUnixShellService.h"
38
#include "nsGNOMEShellService.h"
39
#include "nsKDEShellService.h"
40
#include "nsKDEUtils.h"
41
#include "nsIGenericFactory.h"
42
43
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
44
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init)
45
46
NS_METHOD
47
nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult)
48
{
49
    if( nsKDEUtils::kdeSupport())
50
        return nsKDEShellServiceConstructor( aOuter, aIID, aResult );
51
    return nsGNOMEShellServiceConstructor( aOuter, aIID, aResult );
52
}
(-)mozilla/browser/components/shell/src/nsUnixShellService.h.sav (+45 lines)
Line 0 Link Here
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4
 *
5
 * The contents of this file are subject to the Mozilla Public License Version
6
 * 1.1 (the "License"); you may not use this file except in compliance with
7
 * the License. You may obtain a copy of the License at
8
 * http://www.mozilla.org/MPL/
9
 *
10
 * Software distributed under the License is distributed on an "AS IS" basis,
11
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
 * for the specific language governing rights and limitations under the
13
 * License.
14
 *
15
 * The Original Code is Shell Service.
16
 *
17
 * The Initial Developer of the Original Code is mozilla.org.
18
 * Portions created by the Initial Developer are Copyright (C) 2004
19
 * the Initial Developer. All Rights Reserved.
20
 *
21
 * Contributor(s):
22
 *
23
 * Alternatively, the contents of this file may be used under the terms of
24
 * either the GNU General Public License Version 2 or later (the "GPL"), or
25
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26
 * in which case the provisions of the GPL or the LGPL are applicable instead
27
 * of those above. If you wish to allow use of your version of this file only
28
 * under the terms of either the GPL or the LGPL, and not to allow others to
29
 * use your version of this file under the terms of the MPL, indicate your
30
 * decision by deleting the provisions above and replace them with the notice
31
 * and other provisions required by the GPL or the LGPL. If you do not delete
32
 * the provisions above, a recipient may use your version of this file under
33
 * the terms of any one of the MPL, the GPL or the LGPL.
34
 *
35
 * ***** END LICENSE BLOCK ***** */
36
37
#ifndef nsunixshellservice_h____
38
#define nsunixshellservice_h____
39
40
#include "nsIShellService.h"
41
42
NS_METHOD
43
nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult);
44
45
#endif // nsunixshellservice_h____
(-)mozilla/browser/installer/unix/packages-static.sav (+1 lines)
Lines 291-296 bin/icons/*.png Link Here
291
bin/@PREF_DIR@/firefox.js
291
bin/@PREF_DIR@/firefox.js
292
bin/@PREF_DIR@/firefox-branding.js
292
bin/@PREF_DIR@/firefox-branding.js
293
bin/@PREF_DIR@/channel-prefs.js
293
bin/@PREF_DIR@/channel-prefs.js
294
bin/@PREF_DIR@/kde.js
294
bin/greprefs/all.js
295
bin/greprefs/all.js
295
bin/greprefs/security-prefs.js
296
bin/greprefs/security-prefs.js
296
bin/greprefs/xpinstall.js
297
bin/greprefs/xpinstall.js

Return to bug 21509