Closed
Bug 264210
Opened 20 years ago
Closed 20 years ago
save as, webpage complete doesn't work with gtk2 filepicker
Categories
(Core Graveyard :: GFX: Gtk, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mvl, Assigned: pkwarren)
References
Details
Attachments
(1 file, 2 obsolete files)
6.08 KB,
patch
|
caillon
:
review+
blizzard
:
superreview+
|
Details | Diff | Splinter Review |
using a cvs gtk2 build (20040925) and fedora core 2, i can't save webpage, complete. I can select it after expanding 'browse for other folders'. It is in the filters list. It is even selected by default. But when saving, it still only saves the html page, not the images. There also is no dir created. This is a smoketest blocker, B.27. guess: the selected filter isn't handed out to the caller. I think i noticed that before.
Comment 1•20 years ago
|
||
One further note... the fact that this smoketest blocker took so long to catch mostly indicates to me that the GTK2 filepicker has gotten pretty much no testing.
Comment 2•20 years ago
|
||
The fix for this is to pref back to the old filepicker until we make the GTK2 one better (or the filepicker people do). Tracy smoketest the trunk daily but missed this because his linux system was getting the old filepicker in the runtime test. The smoketest is to save a webpage complete. This is currently doable in both filepickers, it's the saving as other format that's broken in the gtk2 picker.
Severity: blocker → major
Reporter | ||
Comment 3•20 years ago
|
||
> The smoketest is to save a webpage complete. This is currently doable in both
> filepickers, it's the saving as other format that's broken in the gtk2 picker.
no, saving the complete webpage is what i can't do. IF is select it, it still
saves only the html, not the whole webpage. So, it is a smoketest blocker.
Updated•20 years ago
|
Hardware: PC → All
Luis cares deeply about this bug.
Apparently this works on the SUSE-patched branch firefox, Luis can maybe tell us exactly which source base was used (1.0PR?). The SUSE patch is attached to a bug I can't find right now, hmm.
Comment 6•20 years ago
|
||
(In reply to comment #1) > One further note... the fact that this smoketest blocker took so long to catch > mostly indicates to me that the GTK2 filepicker has gotten pretty much no > testing. We're testing it in a decently sized beta program through novell, including several thousand internal users. But this works here, so we're probably not using exactly the same code as trunk is.
Comment 8•20 years ago
|
||
(In reply to comment #0) > using a cvs gtk2 build (20040925) and fedora core 2, i can't save webpage, complete. https://bugzilla.mozilla.org/show_bug.cgi?id=255900 ------- Additional Comment #37 From Christopher A. Aillon 2004-09-27 10:58 PDT [reply] ------- Attachment 160219 [details] [diff] checked in to trunk.
Reporter | ||
Comment 9•20 years ago
|
||
Still doesn't work with build 20041014, so seems like that patch didn't fix this.
Comment 10•20 years ago
|
||
I would suggest making sure this works on other platforms then. The GTK specific code in our RPMs and the trunk matches right now. It could be something else. It works for me on the branch, and I can't build a trunk right now because of bug 234035 though it looks like a patch is materializing.
Reporter | ||
Comment 11•20 years ago
|
||
using a gtk1 (debug) build from the same tree works just fine.
Comment 12•20 years ago
|
||
Unsure what to say. It works for both Novell and Red Hat. And I am using the same source that the trunk is. Perhaps a problem in the GTK+ shipped with FC2?
Reporter | ||
Comment 13•20 years ago
|
||
This must be something in my profile. It works with my test-profile, but not my normal profile. (using the same build)
Comment 14•20 years ago
|
||
mvl: random guess: maybe the pref for last selected file picker filter index?
Reporter | ||
Comment 15•20 years ago
|
||
in my browse-profile, i had browser.download.save_converter_index set to 1. In my test profile, it was 0. Setting it to 0 in the browse-profile makes it work. But now, i can't save as html only anymore. It saves as complete webpage no matter what. So my guess still stands: the filepicker doesn't pass the selected filter back to the caller. Reading the source confirms this: mSelectedType is only set in SetFilterIndex, not after closing the dialog.
Assignee | ||
Comment 16•20 years ago
|
||
This patch does the following two things: 1) Save the selected filter after showing the dialog, so the correct behavior of the "Save Page" is restored. 2) Use the currently selected filter (mSelectedType) when showing the dialog, so the save_converter_index pref works right with the GTK2 filepicker build.
Assignee | ||
Updated•20 years ago
|
Attachment #162867 -
Flags: review?(caillon)
Assignee | ||
Updated•20 years ago
|
Attachment #162867 -
Flags: superreview?(bryner)
Comment 17•20 years ago
|
||
Forgot to post this. This combines this fix with the fix for the "needs to prompt before overwriting" bug.
Assignee | ||
Comment 18•20 years ago
|
||
Comment on attachment 162880 [details] [diff] [review] From my RPMs >Index: widget/src/gtk2/nsFilePicker.cpp >=================================================================== >RCS file: /cvsroot/mozilla/widget/src/gtk2/nsFilePicker.cpp,v >retrieving revision 1.6 >diff -d -u -p -r1.6 nsFilePicker.cpp >--- widget/src/gtk2/nsFilePicker.cpp 12 Oct 2004 07:00:59 -0000 1.6 >+++ widget/src/gtk2/nsFilePicker.cpp 20 Oct 2004 06:07:45 -0000 >+ const PRUnichar *formatStrings[] = >+ { >+ NS_LITERAL_STRING("File").get() >+ }; Shouldn't the filename be used here, instead of the English string "File"? Also, one thing that this patch is missing from mine is that it doesn't set the filter based on mSelectedType (so the save_converter_index_pref doesn't work properly). See the call to _gtk_file_chooser_set_filter in my patch.
Assignee | ||
Comment 19•20 years ago
|
||
One more thing: confirm_overwrite_file checks if the file is non-NULL and if the file exists, even though that test is already performed in nsFilePicker::Show. You could also probably use GtkMessageDialog instead of creating your own dialog to save a little code in confirm_overwrite_file.
Assignee | ||
Updated•20 years ago
|
Attachment #162867 -
Attachment is obsolete: true
Attachment #162867 -
Flags: superreview?(bryner)
Attachment #162867 -
Flags: review?(caillon)
Comment 20•20 years ago
|
||
Comment on attachment 162880 [details] [diff] [review] From my RPMs + NS_LITERAL_STRING("File").get() you can't do that, this only works if the used compiler supports wide strings; otherwise you will be referencing freed memory here. however... why not use file.leafName here? + dialog = gtk_dialog_new_with_buttons (NS_ConvertUCS2toUTF8(title).get(), mind making this UTF16 rather than UCS2? (several times in this patch)
Attachment #162880 -
Flags: review-
Assignee | ||
Comment 21•20 years ago
|
||
- Uses file leaf name in the confirmation dialog. - Uses GtkMessageDialog instead of custom dialog. - Selects the right filter based on mSelectedType. I still see some issues which need to be worked out with the GTK2 file picker dialog, but this addresses the major problems of no confirmation before overwriting a file and the filter list not functioning properly. I will open new bugs for the problems I found in my testing.
Attachment #162880 -
Attachment is obsolete: true
Assignee | ||
Updated•20 years ago
|
Attachment #163473 -
Flags: review?(caillon)
Comment 22•20 years ago
|
||
Comment on attachment 163473 [details] [diff] [review] Patch v2 >+ // Set the initially selected filter >+ if (mSelectedType == i) >+ _gtk_file_chooser_set_filter (GTK_FILE_CHOOSER(file_chooser), filter); Use braces. r=caillon
Attachment #163473 -
Flags: review?(caillon) → review+
Assignee | ||
Updated•20 years ago
|
Attachment #163473 -
Flags: superreview?(bryner)
Assignee | ||
Updated•20 years ago
|
Attachment #163473 -
Flags: superreview?(bryner) → superreview?(blizzard)
Updated•20 years ago
|
Attachment #163473 -
Flags: superreview?(blizzard) → superreview+
Assignee | ||
Updated•20 years ago
|
Assignee: caillon → pkwarren
Assignee | ||
Comment 23•20 years ago
|
||
Fixed (with braces added as requested in comment 22). Checking in Makefile.in; /cvsroot/mozilla/widget/src/gtk2/Makefile.in,v <-- Makefile.in new revision: 1.35; previous revision: 1.34 done Checking in nsFilePicker.cpp; /cvsroot/mozilla/widget/src/gtk2/nsFilePicker.cpp,v <-- nsFilePicker.cpp new revision: 1.8; previous revision: 1.7 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 24•20 years ago
|
||
*** Bug 259220 has been marked as a duplicate of this bug. ***
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•