File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,6 @@ NS_IMPL_ISUPPORTS(nsFilePicker, nsIFilePicker)
170
170
nsFilePicker::nsFilePicker()
171
171
: mSelectedType(0 )
172
172
, mRunning(false )
173
- , mAllowURLs(false )
174
173
#if (MOZ_WIDGET_GTK == 3)
175
174
, mFileChooserDelegate (nullptr )
176
175
#endif
@@ -239,13 +238,6 @@ nsFilePicker::InitNative(nsIWidget *aParent,
239
238
mTitle .Assign (aTitle);
240
239
}
241
240
242
- NS_IMETHODIMP
243
- nsFilePicker::AppendFilters (int32_t aFilterMask)
244
- {
245
- mAllowURLs = !!(aFilterMask & filterAllowURLs);
246
- return nsBaseFilePicker::AppendFilters (aFilterMask);
247
- }
248
-
249
241
NS_IMETHODIMP
250
242
nsFilePicker::AppendFilter (const nsAString& aTitle, const nsAString& aFilter)
251
243
{
@@ -402,9 +394,9 @@ nsFilePicker::Open(nsIFilePickerShownCallback *aCallback)
402
394
GTK_RESPONSE_ACCEPT,
403
395
GTK_RESPONSE_CANCEL,
404
396
-1 );
405
- if ( mAllowURLs ) {
406
- gtk_file_chooser_set_local_only ( GTK_FILE_CHOOSER (file_chooser), FALSE );
407
- }
397
+
398
+ // Don't allow remote URLs.
399
+ gtk_file_chooser_set_local_only ( GTK_FILE_CHOOSER (file_chooser), TRUE );
408
400
409
401
if (action == GTK_FILE_CHOOSER_ACTION_OPEN || action == GTK_FILE_CHOOSER_ACTION_SAVE) {
410
402
GtkWidget *img_preview = gtk_image_new ();
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ class nsFilePicker : public nsBaseFilePicker
25
25
26
26
// nsIFilePicker (less what's in nsBaseFilePicker)
27
27
NS_IMETHOD Open (nsIFilePickerShownCallback *aCallback) override ;
28
- NS_IMETHOD AppendFilters (int32_t aFilterMask) override ;
29
28
NS_IMETHOD AppendFilter (const nsAString& aTitle,
30
29
const nsAString& aFilter) override ;
31
30
NS_IMETHOD SetDefaultString (const nsAString& aString) override ;
@@ -62,7 +61,6 @@ class nsFilePicker : public nsBaseFilePicker
62
61
int16_t mSelectedType ;
63
62
int16_t mResult ;
64
63
bool mRunning ;
65
- bool mAllowURLs ;
66
64
nsCString mFileURL ;
67
65
nsString mTitle ;
68
66
nsString mDefault ;
You can’t perform that action at this time.
0 commit comments