241 |
241 |
242 int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC; |
242 int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC; |
243 int64_t goat = PR_Now() - mStartTime; |
243 int64_t goat = PR_Now() - mStartTime; |
244 showTaskbarAlert = goat > alertIntervalUSec; |
244 showTaskbarAlert = goat > alertIntervalUSec; |
245 |
245 |
246 @@ -2759,19 +2772,20 @@ nsDownload::SetState(DownloadState aStat |
246 @@ -2766,19 +2779,20 @@ nsDownload::SetState(DownloadState aStat |
247 // because if it is, they'll click open the download manager and |
247 // because if it is, they'll click open the download manager and |
248 // the items they downloaded will have been removed. |
248 // the items they downloaded will have been removed. |
249 alerts->ShowAlertNotification( |
249 alerts->ShowAlertNotification( |
250 NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, |
250 NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, |
251 message, !removeWhenDone, |
251 message, !removeWhenDone, |
266 if (fileURL && |
266 if (fileURL && |
267 NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && |
267 NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && |
268 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
268 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
269 --- a/toolkit/content/jar.mn |
269 --- a/toolkit/content/jar.mn |
270 +++ b/toolkit/content/jar.mn |
270 +++ b/toolkit/content/jar.mn |
271 @@ -58,29 +58,33 @@ toolkit.jar: |
271 @@ -55,29 +55,33 @@ toolkit.jar: |
272 content/global/viewZoomOverlay.js (viewZoomOverlay.js) |
272 content/global/viewZoomOverlay.js (viewZoomOverlay.js) |
273 *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) |
273 *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) |
274 content/global/bindings/browser.xml (widgets/browser.xml) |
274 content/global/bindings/browser.xml (widgets/browser.xml) |
275 content/global/bindings/button.xml (widgets/button.xml) |
275 content/global/bindings/button.xml (widgets/button.xml) |
276 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
276 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
288 *+ content/global/bindings/listbox.xml (widgets/listbox.xml) |
288 *+ content/global/bindings/listbox.xml (widgets/listbox.xml) |
289 content/global/bindings/menu.xml (widgets/menu.xml) |
289 content/global/bindings/menu.xml (widgets/menu.xml) |
290 content/global/bindings/menulist.xml (widgets/menulist.xml) |
290 content/global/bindings/menulist.xml (widgets/menulist.xml) |
291 content/global/bindings/notification.xml (widgets/notification.xml) |
291 content/global/bindings/notification.xml (widgets/notification.xml) |
292 content/global/bindings/numberbox.xml (widgets/numberbox.xml) |
292 content/global/bindings/numberbox.xml (widgets/numberbox.xml) |
293 * content/global/bindings/popup.xml (widgets/popup.xml) |
293 content/global/bindings/popup.xml (widgets/popup.xml) |
294 *+ content/global/bindings/preferences.xml (widgets/preferences.xml) |
294 *+ content/global/bindings/preferences.xml (widgets/preferences.xml) |
295 +*+ content/global/bindings/preferences-kde.xml (widgets/preferences-kde.xml) |
295 +*+ content/global/bindings/preferences-kde.xml (widgets/preferences-kde.xml) |
296 +% override chrome://global/content/bindings/preferences.xml chrome://global/content/bindings/preferences-kde.xml desktop=kde |
296 +% override chrome://global/content/bindings/preferences.xml chrome://global/content/bindings/preferences-kde.xml desktop=kde |
297 content/global/bindings/progressmeter.xml (widgets/progressmeter.xml) |
297 content/global/bindings/progressmeter.xml (widgets/progressmeter.xml) |
298 content/global/bindings/radio.xml (widgets/radio.xml) |
298 content/global/bindings/radio.xml (widgets/radio.xml) |
887 + for (var l = 0; (l < parentPrefs.length && !preference); ++l) { |
908 + for (var l = 0; (l < parentPrefs.length && !preference); ++l) { |
888 + if (parentPrefs[l].localName == "preference") |
909 + if (parentPrefs[l].localName == "preference") |
889 + preference = parentPrefs[l]; |
910 + preference = parentPrefs[l]; |
890 + } |
911 + } |
891 + } |
912 + } |
892 + this._setValue(preference ? preference.value |
913 + |
893 + : this.valueFromPreferences, false); |
914 + // Don't use the value setter here, we don't want updateElements to be prematurely fired. |
|
915 + this._value = preference ? preference.value : this.valueFromPreferences; |
894 + } |
916 + } |
895 + else |
917 + else |
896 + this._setValue(this.valueFromPreferences, false); |
918 + this._value = this.valueFromPreferences; |
|
919 + this.preferences._constructAfterChildren(); |
897 + ]]> |
920 + ]]> |
898 + </constructor> |
921 + </constructor> |
899 + <destructor> |
922 + <destructor> |
900 + this.preferences.rootBranchInternal |
923 + this.preferences.rootBranchInternal |
901 + .removeObserver(this.name, this.preferences); |
924 + .removeObserver(this.name, this.preferences); |
902 + </destructor> |
925 + </destructor> |
903 + |
926 + <field name="_constructed">false</field> |
904 + <property name="instantApply"> |
927 + <property name="instantApply"> |
905 + <getter> |
928 + <getter> |
906 + return this.getAttribute("instantApply") == "true" || this.preferences.instantApply; |
929 + return this.getAttribute("instantApply") == "true" || this.preferences.instantApply; |
907 + </getter> |
930 + </getter> |
908 + </property> |
931 + </property> |
930 + onset="this.setAttribute('readonly', val); return val;"/> |
953 + onset="this.setAttribute('readonly', val); return val;"/> |
931 + |
954 + |
932 + <field name="_value">null</field> |
955 + <field name="_value">null</field> |
933 + <method name="_setValue"> |
956 + <method name="_setValue"> |
934 + <parameter name="aValue"/> |
957 + <parameter name="aValue"/> |
935 + <parameter name="aUpdate"/> |
|
936 + <body> |
958 + <body> |
937 + <![CDATA[ |
959 + <![CDATA[ |
938 + if (aUpdate && this.value !== aValue) { |
960 + if (this.value !== aValue) { |
939 + this._value = aValue; |
961 + this._value = aValue; |
940 + if (this.instantApply) |
962 + if (this.instantApply) |
941 + this.valueFromPreferences = aValue; |
963 + this.valueFromPreferences = aValue; |
942 + this.preferences.fireChangedEvent(this); |
964 + this.preferences.fireChangedEvent(this); |
943 + } |
965 + } |
944 + else if (!aUpdate) { |
|
945 + this._value = aValue; |
|
946 + this.updateElements(); |
|
947 + } |
|
948 + return aValue; |
966 + return aValue; |
949 + ]]> |
967 + ]]> |
950 + </body> |
968 + </body> |
951 + </method> |
969 + </method> |
952 + <property name="value" onget="return this._value" onset="return this._setValue(val, true);"/> |
970 + <property name="value" onget="return this._value" onset="return this._setValue(val);"/> |
953 + |
971 + |
954 + <property name="locked"> |
972 + <property name="locked"> |
955 + <getter> |
973 + <getter> |
956 + return this.preferences.rootBranch.prefIsLocked(this.name); |
974 + return this.preferences.rootBranch.prefIsLocked(this.name); |
957 + </getter> |
975 + </getter> |
1334 + <xul:deck anonid="paneDeck" flex="1"> |
1352 + <xul:deck anonid="paneDeck" flex="1"> |
1335 + <children includes="prefpane"/> |
1353 + <children includes="prefpane"/> |
1336 + </xul:deck> |
1354 + </xul:deck> |
1337 + </xul:hbox> |
1355 + </xul:hbox> |
1338 + <xul:hbox anonid="dlg-buttons" class="prefWindow-dlgbuttons" pack="end"> |
1356 + <xul:hbox anonid="dlg-buttons" class="prefWindow-dlgbuttons" pack="end"> |
1339 +#ifdef XP_UNIX_GNOME |
1357 +#ifndef XP_UNIX |
1340 + <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/> |
1358 + <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/> |
1341 + <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/> |
1359 + <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/> |
1342 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1360 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1343 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
1361 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
1344 + <xul:spacer anonid="spacer" flex="1"/> |
1362 + <xul:spacer anonid="spacer" flex="1"/> |
1345 + <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/> |
1363 + <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/> |
1346 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1364 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1347 +#elif XP_UNIX |
|
1348 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
|
1349 + <xul:spacer anonid="spacer" flex="1"/> |
|
1350 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
|
1351 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
|
1352 + <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/> |
|
1353 + <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/> |
|
1354 + <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/> |
|
1355 +#else |
1365 +#else |
1356 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1366 + <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/> |
1357 + <xul:spacer anonid="spacer" flex="1"/> |
1367 + <xul:spacer anonid="spacer" flex="1"/> |
1358 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1368 + <xul:button dlgtype="accept" class="dialog-button" icon="accept"/> |
1359 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
1369 + <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/> |
3600 #include <Carbon/Carbon.h> |
3610 #include <Carbon/Carbon.h> |
3601 #include "CocoaFileUtils.h" |
3611 #include "CocoaFileUtils.h" |
3602 #include "prmem.h" |
3612 #include "prmem.h" |
3603 #include "plbase64.h" |
3613 #include "plbase64.h" |
3604 |
3614 |
3605 @@ -1816,46 +1817,52 @@ nsLocalFile::SetPersistentDescriptor(con |
3615 @@ -1962,53 +1963,55 @@ nsLocalFile::SetPersistentDescriptor(con |
3606 return InitWithNativePath(aPersistentDescriptor); |
3616 return InitWithNativePath(aPersistentDescriptor); |
3607 #endif |
3617 #endif |
3608 } |
3618 } |
3609 |
3619 |
3610 NS_IMETHODIMP |
3620 NS_IMETHODIMP |
3611 nsLocalFile::Reveal() |
3621 nsLocalFile::Reveal() |
3612 { |
3622 { |
3613 #ifdef MOZ_WIDGET_GTK |
3623 #ifdef MOZ_WIDGET_GTK |
3614 - nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
3624 - nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
3615 - nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); |
3625 - nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); |
3616 - if (!giovfs && !gnomevfs) |
3626 - if (!giovfs && !gnomevfs) { |
3617 - return NS_ERROR_FAILURE; |
3627 - return NS_ERROR_FAILURE; |
|
3628 - } |
3618 - |
3629 - |
3619 + nsAutoCString url; |
3630 + nsAutoCString url; |
3620 bool isDirectory; |
3631 bool isDirectory; |
3621 if (NS_FAILED(IsDirectory(&isDirectory))) |
3632 if (NS_FAILED(IsDirectory(&isDirectory))) { |
3622 return NS_ERROR_FAILURE; |
3633 return NS_ERROR_FAILURE; |
3623 |
3634 } |
3624 + nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
3635 |
3625 if (isDirectory) { |
3636 + nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
3626 - if (giovfs) |
3637 if (isDirectory) { |
3627 - return giovfs->ShowURIForInput(mPath); |
3638 - if (giovfs) { |
3628 - else |
3639 - return giovfs->ShowURIForInput(mPath); |
3629 - /* Fallback to GnomeVFS */ |
3640 - } else |
3630 - return gnomevfs->ShowURIForInput(mPath); |
3641 - /* Fallback to GnomeVFS */ |
3631 + url = mPath; |
3642 - { |
3632 } else if (giovfs && NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) { |
3643 - return gnomevfs->ShowURIForInput(mPath); |
3633 return NS_OK; |
3644 - } |
3634 } else { |
3645 + url = mPath; |
3635 nsCOMPtr<nsIFile> parentDir; |
3646 } else if (giovfs && NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) { |
3636 nsAutoCString dirPath; |
3647 return NS_OK; |
3637 if (NS_FAILED(GetParent(getter_AddRefs(parentDir)))) |
3648 } else { |
3638 return NS_ERROR_FAILURE; |
3649 nsCOMPtr<nsIFile> parentDir; |
3639 if (NS_FAILED(parentDir->GetNativePath(dirPath))) |
3650 nsAutoCString dirPath; |
3640 return NS_ERROR_FAILURE; |
3651 if (NS_FAILED(GetParent(getter_AddRefs(parentDir)))) { |
3641 |
3652 return NS_ERROR_FAILURE; |
3642 - if (giovfs) |
|
3643 - return giovfs->ShowURIForInput(dirPath); |
|
3644 - else |
|
3645 - return gnomevfs->ShowURIForInput(dirPath); |
|
3646 + url = dirPath; |
|
3647 } |
3653 } |
3648 + |
3654 if (NS_FAILED(parentDir->GetNativePath(dirPath))) { |
3649 + if(nsKDEUtils::kdeSupport()) { |
3655 return NS_ERROR_FAILURE; |
3650 + nsTArray<nsCString> command; |
3656 } |
3651 + command.AppendElement( NS_LITERAL_CSTRING("REVEAL") ); |
3657 |
3652 + command.AppendElement( mPath ); |
3658 - if (giovfs) { |
3653 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
3659 - return giovfs->ShowURIForInput(dirPath); |
3654 + } |
3660 - } else { |
3655 + |
3661 - return gnomevfs->ShowURIForInput(dirPath); |
3656 + nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); |
3662 - } |
3657 + if (!giovfs && !gnomevfs) |
3663 + url = dirPath; |
3658 + return NS_ERROR_FAILURE; |
3664 } |
3659 + |
3665 + |
3660 + if (giovfs) |
3666 + if(nsKDEUtils::kdeSupport()) { |
3661 + return giovfs->ShowURIForInput(url); |
3667 + nsTArray<nsCString> command; |
3662 + else |
3668 + command.AppendElement( NS_LITERAL_CSTRING("REVEAL") ); |
3663 + return gnomevfs->ShowURIForInput(url); |
3669 + command.AppendElement( mPath ); |
|
3670 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
|
3671 + } |
|
3672 + |
|
3673 + nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); |
|
3674 + if (!giovfs && !gnomevfs) |
|
3675 + return NS_ERROR_FAILURE; |
|
3676 + |
|
3677 + if (giovfs) |
|
3678 + return giovfs->ShowURIForInput(url); |
|
3679 + else |
|
3680 + return gnomevfs->ShowURIForInput(url); |
3664 #elif defined(MOZ_WIDGET_COCOA) |
3681 #elif defined(MOZ_WIDGET_COCOA) |
3665 CFURLRef url; |
3682 CFURLRef url; |
3666 if (NS_SUCCEEDED(GetCFURL(&url))) { |
3683 if (NS_SUCCEEDED(GetCFURL(&url))) { |
3667 nsresult rv = CocoaFileUtils::RevealFileInFinder(url); |
3684 nsresult rv = CocoaFileUtils::RevealFileInFinder(url); |
3668 ::CFRelease(url); |
3685 ::CFRelease(url); |
3669 return rv; |
3686 return rv; |
3670 } |
3687 } |
3671 return NS_ERROR_FAILURE; |
3688 return NS_ERROR_FAILURE; |
3672 @@ -1863,16 +1870,23 @@ nsLocalFile::Reveal() |
3689 @@ -2016,16 +2019,22 @@ nsLocalFile::Reveal() |
3673 return NS_ERROR_FAILURE; |
3690 return NS_ERROR_FAILURE; |
3674 #endif |
3691 #endif |
3675 } |
3692 } |
3676 |
3693 |
3677 NS_IMETHODIMP |
3694 NS_IMETHODIMP |
3678 nsLocalFile::Launch() |
3695 nsLocalFile::Launch() |
3679 { |
3696 { |
3680 #ifdef MOZ_WIDGET_GTK |
3697 #ifdef MOZ_WIDGET_GTK |
3681 + if( nsKDEUtils::kdeSupport()) { |
3698 + if( nsKDEUtils::kdeSupport()) { |
3682 + nsTArray<nsCString> command; |
3699 + nsTArray<nsCString> command; |
3683 + command.AppendElement( NS_LITERAL_CSTRING("OPEN") ); |
3700 + command.AppendElement( NS_LITERAL_CSTRING("OPEN") ); |
3684 + command.AppendElement( mPath ); |
3701 + command.AppendElement( mPath ); |
3685 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
3702 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
3686 + } |
3703 + } |
3687 + |
3704 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
3688 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
3705 nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); |
3689 nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); |
3706 if (giovfs) { |
3690 if (giovfs) { |
3707 return giovfs->ShowURIForInput(mPath); |
3691 return giovfs->ShowURIForInput(mPath); |
3708 } else if (gnomevfs) { |
3692 } else if (gnomevfs) { |
3709 /* GnomeVFS fallback */ |
3693 /* GnomeVFS fallback */ |
3710 return gnomevfs->ShowURIForInput(mPath); |
3694 return gnomevfs->ShowURIForInput(mPath); |
3711 } |
3695 } |
|