Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#3903 closed defect (fixed)

Visual representation of clipboard is not working (the copy/paste shortcut is)

Reported by: erikos Owned by: erikos
Priority: Urgent Milestone:
Component: Sugar Version: 0.97.x
Severity: Blocker Keywords: regression
Cc: manuq, tonyforster, godiard, garnacho, dsd Distribution/OS: OLPC
Bug Status: Assigned

Description

seen in the latest 13.1.0 build, Sugar version 0.97.3

Attachments (2)

0001-Port-visual-representation-of-clipboard-to-Gtk3-SL-3.patch (8.7 KB) - added by godiard 11 years ago.
0001-Update-clipboard-code-in-sugar-to-fix-visual-represe.patch (7.4 KB) - added by godiard 11 years ago.
Updated version of sugar patch based in the backported pygobject patches

Download all attachments as: .zip

Change History (24)

comment:1 Changed 12 years ago by manuq

  • Cc manuq added

comment:2 Changed 12 years ago by tonyforster

  • Cc tonyforster added

OS2
Copy and paste are working but the clip item does not appear in the left frame

comment:3 Changed 11 years ago by tonyforster

still present in OS3

comment:4 Changed 11 years ago by erikos

  • Priority changed from Unspecified by Maintainer to Urgent
  • Summary changed from Copy to clipboard is not working to Visual representation of clipboard is not working (the copy/paste shortcut is)

(checked in os5)

comment:5 Changed 11 years ago by godiard

I was looking at this issue, I think we are affected by at least two upstream bugs related to clipboard management. This is a important usability feature, then we need solve it.

The first issue we need solve is replace

clipboard = Gtk.Clipboard()

by

clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)

Is used in the following files:

src/jarabe/journal/palettes.py: clipboard = Gtk.Clipboard()
src/jarabe/frame/clipboardicon.py: x_clipboard = Gtk.Clipboard()
src/jarabe/frame/clipboard.py: gtk_clipboard = Gtk.Clipboard()
src/jarabe/frame/clipboardpanelwindow.py: self._clipboard = Gtk.Clipboard()

clipboardpanelwindow.py is related with this ticket (visual representation)

Doing this change we receive the signal "owner-changed" but are affected by this [1] upstream bug.

The other upstream bug affecting us is not related with the visual representation, but with the use of Clipboard.set_with_data [2], used in src/jarabe/journal/palettes.py and src/jarabe/frame/clipboardicon.py

[1] https://bugzilla.gnome.org/show_bug.cgi?id=678620
[2] https://bugzilla.gnome.org/show_bug.cgi?id=656312

comment:6 Changed 11 years ago by erikos

Hmm, tricky. I looked for the 'wait_for_targets' issue. Here is what pygtk did in the override. That is how far I got.

comment:7 Changed 11 years ago by godiard

The attached patch solves the visual representation part, (related to gtk bug 678620) and depends on the fix to [1]. With this patch, visual representation of the clipboard is available again.

The errors related to gtk+ bug 656312 will be addressed in another patch.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=687942

comment:8 Changed 11 years ago by godiard

  • Keywords r? added

comment:9 Changed 11 years ago by godiard

  • Cc godiard added

comment:10 Changed 11 years ago by erikos

  • Cc garnacho added

Ok, I would like to see the gtk+ patch first landed at least in upstream master before we depend on it.

Carlos, can you help us upstreaming https://bugzilla.gnome.org/show_bug.cgi?id=687942 (either that this patch gets in or another fix is found)?

comment:11 Changed 11 years ago by godiard

A different solution was included with two patches. Let me rework the sugar patch.

comment:12 Changed 11 years ago by erikos

Yes, it landed in master so far, Martin said both patches can go into the 3.4 branch as well, he will do when he finds time. Will get into 3.4.3

comment:13 Changed 11 years ago by godiard

  • Keywords regression added; r? removed

comment:14 Changed 11 years ago by dsd

  • Cc dsd added

These 2 patches:

  • Fix marshalling of arrays of struct pointers to Python (Carlos Garnacho) (#678620)
  • Fix Gdk.Atom to have a proper str() and repr() (Martin Pitt) (#678620)

are added here: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1261821

Please test and let me know. If it works I will package it "properly"

Changed 11 years ago by godiard

Updated version of sugar patch based in the backported pygobject patches

comment:15 Changed 11 years ago by godiard

Simon, I have updated the patch based in the pygobject patches.

Daniel, Simon have permission to push the patches in the stable branch.

comment:16 follow-up: Changed 11 years ago by dsd

I'd still like you to test the package before I push it, please.

comment:17 in reply to: ↑ 16 Changed 11 years ago by godiard

Replying to dsd:

I'd still like you to test the package before I push it, please.

Done.

  • Install the rpm.
  • Copy the modified files: cp palettes.py /usr/lib/python2.7/site-packages/jarabe/journal/ cp clipboard* /usr/lib/python2.7/site-packages/jarabe/frame/
  • Restart sugar
  • Open the terminal
  • Select a text, and press Shift-Ctrl-C or use the copy button in the toolbar.

Result:

  • A icon will appear in the frame at bottom left, the selected text is visible in the palette.

comment:18 Changed 11 years ago by dsd

Gonzalo confirms he's run the test as well, succesfully. Thanks. pushed as pygobject3-3.4.2-3.fc18

comment:19 Changed 11 years ago by erikos

I pushed the patches on the pygobject-3-4 branch.

comment:20 Changed 11 years ago by erikos

Thanks a lot Gonzalo for your patch, I pushed that one now 9c7d980f8281f145b605710b7383b6fa8f1f58b4. It does not even break things without the latest pygobject3 from Daniel.

So, next is the second upstream clipboard issue...

comment:21 Changed 11 years ago by godiard

  • Resolution set to fixed
  • Status changed from new to closed

Opened #4307 to follow set_with_data. Close this as fixed.

comment:22 Changed 11 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.