Loading toolkit/components/downloads/Makefile.in +0 −2 Original line number Diff line number Diff line Loading @@ -78,5 +78,3 @@ endif TEST_DIRS += test include $(topsrcdir)/config/rules.mk CXXFLAGS += $(TK_CFLAGS) toolkit/components/downloads/nsDownloadManager.cpp +3 −17 Original line number Diff line number Diff line Loading @@ -87,10 +87,6 @@ #include "AndroidBridge.h" #endif #ifdef MOZ_WIDGET_GTK2 #include <gtk/gtk.h> #endif using namespace mozilla; #define DOWNLOAD_MANAGER_BUNDLE "chrome://mozapps/locale/downloads/downloads.properties" Loading Loading @@ -2265,7 +2261,7 @@ nsDownload::SetState(DownloadState aState) } } #if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK2) #if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget); nsCOMPtr<nsIFile> file; nsAutoString path; Loading @@ -2275,8 +2271,8 @@ nsDownload::SetState(DownloadState aState) file && NS_SUCCEEDED(file->GetPath(path))) { #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK2) // On Windows and Gtk, add the download to the system's "recent documents" #ifdef XP_WIN // On windows, add the download to the system's "recent documents" // list, with a pref to disable. { bool addToRecentDocs = true; Loading @@ -2285,17 +2281,7 @@ nsDownload::SetState(DownloadState aState) if (addToRecentDocs && !nsDownloadManager::gDownloadManagerService->mInPrivateBrowsing) { #ifdef XP_WIN ::SHAddToRecentDocs(SHARD_PATHW, path.get()); #elif defined(MOZ_WIDGET_GTK2) GtkRecentManager* manager = gtk_recent_manager_get_default(); gchar* uri = g_filename_to_uri(NS_ConvertUTF16toUTF8(path).get(), NULL, NULL); if (uri) { gtk_recent_manager_add_item(manager, uri); g_free(uri); } #endif } } #endif Loading Loading
toolkit/components/downloads/Makefile.in +0 −2 Original line number Diff line number Diff line Loading @@ -78,5 +78,3 @@ endif TEST_DIRS += test include $(topsrcdir)/config/rules.mk CXXFLAGS += $(TK_CFLAGS)
toolkit/components/downloads/nsDownloadManager.cpp +3 −17 Original line number Diff line number Diff line Loading @@ -87,10 +87,6 @@ #include "AndroidBridge.h" #endif #ifdef MOZ_WIDGET_GTK2 #include <gtk/gtk.h> #endif using namespace mozilla; #define DOWNLOAD_MANAGER_BUNDLE "chrome://mozapps/locale/downloads/downloads.properties" Loading Loading @@ -2265,7 +2261,7 @@ nsDownload::SetState(DownloadState aState) } } #if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK2) #if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget); nsCOMPtr<nsIFile> file; nsAutoString path; Loading @@ -2275,8 +2271,8 @@ nsDownload::SetState(DownloadState aState) file && NS_SUCCEEDED(file->GetPath(path))) { #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK2) // On Windows and Gtk, add the download to the system's "recent documents" #ifdef XP_WIN // On windows, add the download to the system's "recent documents" // list, with a pref to disable. { bool addToRecentDocs = true; Loading @@ -2285,17 +2281,7 @@ nsDownload::SetState(DownloadState aState) if (addToRecentDocs && !nsDownloadManager::gDownloadManagerService->mInPrivateBrowsing) { #ifdef XP_WIN ::SHAddToRecentDocs(SHARD_PATHW, path.get()); #elif defined(MOZ_WIDGET_GTK2) GtkRecentManager* manager = gtk_recent_manager_get_default(); gchar* uri = g_filename_to_uri(NS_ConvertUTF16toUTF8(path).get(), NULL, NULL); if (uri) { gtk_recent_manager_add_item(manager, uri); g_free(uri); } #endif } } #endif Loading