Ticket #2862 (closed defect: fixed)

Opened 2 years ago

Last modified 21 months ago

doesn't support View Source

Reported by: sascha_silbe Owned by: sayamindu
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
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

0001-don-t-return-if-HandleViewSource-service-available.patch Download (0.9 KB) - added by walter 2 years ago.
this patch seems to fix the problem, but doesn't address mysterious root cause

Change History

follow-up: ↓ 2   Changed 2 years ago by walter

Is there an error message in shell.log? It could be related to #2846 ???

in reply to: ↑ 1   Changed 2 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.

  Changed 2 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 2 years ago by walter

this patch seems to fix the problem, but doesn't address mysterious root cause

  Changed 2 years ago by alsroot

  • status changed from new to closed
  • resolution set to fixed

 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).

  Changed 21 months ago by erikos

The same is happening in Chat, Aleksey will fix it.

Note: See TracTickets for help on using tickets.