mozilla-kde.patch
branchfirefox38
changeset 888 b94dace970c6
parent 850 a2bdff616a0e
equal deleted inserted replaced
878:abc6cbf98a30 888:b94dace970c6
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  214f99f3ce4f1f8ae9b3d18da44e5d66b3105663
     2 # Parent  879df970cffe74db62f72f5b815b559dab63418a
     3 Description: Add KDE integration to Firefox (toolkit parts)
     3 Description: Add KDE integration to Firefox (toolkit parts)
     4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     5 Author: Lubos Lunak <lunak@suse.com>
     5 Author: Lubos Lunak <lunak@suse.com>
     6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
     6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
     7      https://bugzilla.novell.com/show_bug.cgi?id=170055
     7      https://bugzilla.novell.com/show_bug.cgi?id=170055
  3146 +#include "nsKDEUtils.h"
  3146 +#include "nsKDEUtils.h"
  3147  
  3147  
  3148  using namespace mozilla;
  3148  using namespace mozilla;
  3149  
  3149  
  3150  #define MAX_PREVIEW_SIZE 180
  3150  #define MAX_PREVIEW_SIZE 180
       
  3151  // bug 1184009
       
  3152  #define MAX_PREVIEW_SOURCE_SIZE 4096
  3151  
  3153  
  3152  nsIFile *nsFilePicker::mPrevDisplayDirectory = nullptr;
  3154  nsIFile *nsFilePicker::mPrevDisplayDirectory = nullptr;
  3153  
  3155 @@ -243,17 +245,19 @@ nsFilePicker::AppendFilters(int32_t aFil
  3154  void
       
  3155 @@ -238,17 +240,19 @@ nsFilePicker::AppendFilters(int32_t aFil
       
  3156    return nsBaseFilePicker::AppendFilters(aFilterMask);
  3156    return nsBaseFilePicker::AppendFilters(aFilterMask);
  3157  }
  3157  }
  3158  
  3158  
  3159  NS_IMETHODIMP
  3159  NS_IMETHODIMP
  3160  nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter)
  3160  nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter)
  3171    CopyUTF16toUTF8(aFilter, filter);
  3171    CopyUTF16toUTF8(aFilter, filter);
  3172    CopyUTF16toUTF8(aTitle, name);
  3172    CopyUTF16toUTF8(aTitle, name);
  3173  
  3173  
  3174    mFilters.AppendElement(filter);
  3174    mFilters.AppendElement(filter);
  3175    mFilterNames.AppendElement(name);
  3175    mFilterNames.AppendElement(name);
  3176 @@ -363,16 +367,32 @@ nsFilePicker::Show(int16_t *aReturn)
  3176 @@ -368,16 +372,32 @@ nsFilePicker::Show(int16_t *aReturn)
  3177  
  3177  
  3178  NS_IMETHODIMP
  3178  NS_IMETHODIMP
  3179  nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
  3179  nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
  3180  {
  3180  {
  3181    // Can't show two dialogs concurrently with the same filepicker
  3181    // Can't show two dialogs concurrently with the same filepicker
  3204    GtkWindow *parent_widget =
  3204    GtkWindow *parent_widget =
  3205      GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET));
  3205      GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET));
  3206  
  3206  
  3207    GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
  3207    GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
  3208    const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
  3208    const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
  3209 @@ -551,8 +571,235 @@ nsFilePicker::Done(GtkWidget* file_choos
  3209 @@ -556,8 +576,235 @@ nsFilePicker::Done(GtkWidget* file_choos
  3210    if (mCallback) {
  3210    if (mCallback) {
  3211      mCallback->Done(result);
  3211      mCallback->Done(result);
  3212      mCallback = nullptr;
  3212      mCallback = nullptr;
  3213    } else {
  3213    } else {
  3214      mResult = result;
  3214      mResult = result;