Commit fa0bd044 authored by Jonathan Kew's avatar Jonathan Kew
Browse files

Backed out changeset 118f97e6d4ed (bug 670275) for xpcshell orange.

parent 524dbd7e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -78,5 +78,3 @@ endif
TEST_DIRS += test

include $(topsrcdir)/config/rules.mk

CXXFLAGS += $(TK_CFLAGS)
+3 −17
Original line number Diff line number Diff line
@@ -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"
@@ -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;
@@ -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;
@@ -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