#2862 closed defect (fixed)
doesn't support View Source
Reported by: | sascha_silbe | Owned by: | sayamindu |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | Unspecified |
Component: | Imageviewer | Version: | Git as of bugdate |
Severity: | Unspecified | Keywords: | |
Cc: | Distribution/OS: | ||
Bug Status: | Unconfirmed |
Description
Imageviewer doesn't support View Source at all. If you choose View Source from the Frame icon, nothing happens.
Imageviewer should show
a) its own source ("Activity Bundle Source") and
b) the XML data ("Instance Source") in case of SVG.
Attachments (1)
Change History (6)
comment:1 follow-up: ↓ 2 Changed 13 years ago by walter
comment:2 in reply to: ↑ 1 Changed 13 years ago by sascha_silbe
- Version changed from Unspecified to Git as of bugdate
Replying to walter:
Is there an error message in shell.log?
There was no error message in either shell.org or org.laptop.ImageViewerActivity-1.log. The only View Source related messages were these (in shell.log):
1306071536.775400 DEBUG root: _key_pressed_cb: 55 9 <alt><shift>v 1306071536.997368 DEBUG root: _key_released_cb: 55 9
It could be related to #2846 ???
Imageviewer has all source files in the top-level directory, so I don't think #2846 has any impact on it.
comment:3 Changed 13 years ago by walter
There is a puzzling 'return' in setup_view_source that seems to be at the heart of the problem.
if service is not None:
try:
...
service.HandleViewSource()
return
The service.HandleViewSource ends up going to an Unimplemented call in activity.py and returns.
Not sure why ImageViewer ends up in this block whereas other activities don't, but if you don't return after the call to service.HandleViewSource(), but rather, drop through, View Source seems to work fine.
Changed 12 years ago by walter
this patch seems to fix the problem, but doesn't address mysterious root cause
comment:4 Changed 12 years ago by alsroot
- Resolution set to fixed
- Status changed from new to closed
http://git.sugarlabs.org/imageviewer/mainline/commit/d5513e35809cc72a64c8d9f9a4d7bf6889885ef4
The problem is that handle_view_source() in activity was just pass and sugar relies on raising an exception if it is not implemented but pylint treating raise NotImplementedError as a code that should be overriden in user code (which is obvious).
comment:5 Changed 12 years ago by erikos
The same is happening in Chat, Aleksey will fix it.
Is there an error message in shell.log? It could be related to #2846 ???