After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169039 - view source appears broken
view source appears broken
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
1.5.x
Other Linux
: Normal major
: 1.6
Assigned To: Epiphany Maintainers
Marco Pesenti Gritti
Depends on:
Blocks:
 
 
Reported: 2005-03-02 22:55 UTC by Luis Villa
Modified: 2005-03-13 03:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
add some debugging messages (3.46 KB, patch)
2005-03-03 18:18 UTC, Christian Persch
none Details | Review
proposed patch (2.88 KB, patch)
2005-03-06 15:10 UTC, Christian Persch
none Details | Review
use libstartup-notification (12.43 KB, patch)
2005-03-07 13:31 UTC, Christian Persch
none Details | Review
remove some copied code, since we always already have a timestamp (10.95 KB, patch)
2005-03-07 13:57 UTC, Christian Persch
none Details | Review

Description Luis Villa 2005-03-02 22:55:50 UTC
I've changed my text handler from gedit to emacs, but with both, ctl+u seems to
bring up a blank editor. Any idea on debugging? This worked a week or two ago;
I'm updating regularly with ubuntu so it seems something in there broke it recently.
Comment 1 Christian Persch 2005-03-03 11:04:38 UTC
View Source should create a file
/tmp/epiphany-$user-$random/viewsource$random.html, and open that in the
text/plain handler. Does that file get created, and does it have the right
content? Does opening it directly in gedit work? Does it work if you gnome-open
it? (The file is deleted when ephy exits, so you have to keep ephy running.)
Which gedit version? Is XDG_DATA_DIRS set correctly? Is there a gedit.desktop
file somewhere in $dir/applications/ for some $dir in $XDG_DATA_DIRS? Does it
have a "Exec=gedit %U" line ?
Comment 2 Luis Villa 2005-03-03 16:23:03 UTC
>/tmp/epiphany-$user-$random/viewsource$random.html, and open that in the
>text/plain handler. Does that file get created, and does it have the right
>content?

It does get created and it does have the right content. Well, sort of; it
appears that we've regressed to the 'attempt to download again instead of using
the version I'm currently browsing' behavior, but I guess that is probably a
different bug.

> Does opening it directly in gedit work? 

Yes. Or emacs.

> Does it work if you gnome-open it?

gnome-open attempts to open it in ephy.

> Is XDG_DATA_DIRS set correctly?

It is unset, but all my mime types appear to be handled correctly, if that is
what you mean.

The other questions imply this is gedit-specific, when it isn't, or that the
problem is a mime-handler problem, when it isn't. If I make emacs the handler
for text/plain using nautilus, then ephy opens emacs as expected. gedit is also
opened as expected if that is the text/plain handler. The problem is not which
app launches, or whether or not the app launches, but what content is in the app
when it launches- i.e., 'none'. 

Comment 3 Christian Persch 2005-03-03 18:18:40 UTC
Created attachment 38214 [details] [review]
add some debugging messages

Can you please try with this patch and report the output on going View->Page
Source ? Thanks.
Comment 4 Christian Persch 2005-03-06 15:10:25 UTC
Created attachment 38331 [details] [review]
proposed patch

Go back to using gnome-vfs to launch the text/plain handler. It doesn't use
libstartup-notification; instead I made the minimal patch, just manually
generating the DESKTOP_STARTUP_ID to forward the timestamp to the app, and
using gnome_vfs_mime_application_launch_with_env().
Comment 5 Christian Persch 2005-03-07 13:31:29 UTC
Created attachment 38361 [details] [review]
use libstartup-notification

alternative patch, preserve startup notification too
Comment 6 Christian Persch 2005-03-07 13:57:26 UTC
Created attachment 38362 [details] [review]
remove some copied code, since we always already have a timestamp
Comment 7 Christian Persch 2005-03-09 18:21:09 UTC
Fixed in gnome-2-10 and HEAD.

I couldn't reproduce the "it appears that we've regressed to the 'attempt to
download again instead of using the version I'm currently browsing' behavior"
part; if you can reproduce this please open another bug.