Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
path: root/browser.py
diff options
authorManuel Kaufmann <humitos@gmail.com>2012-09-28 14:10:57 (GMT)
committer Manuel QuiƱones <manuq@laptop.org>2012-09-28 14:15:18 (GMT)
commitc3b6dd919c91cd733a081ace6d0444b4191ca15e (patch)
treec8dd684caf63b764828598a1e625d683e9cbd465 /browser.py
parentaf31a44d9b5247d56a7a468102369d3314e1a2a3 (diff)
Show Sugar's palette when right click is pressed SL #3455
When the user right clicks over a link, an image or selected text the Sugar's Palette is shown with the proper menu's items for each case. There are 4 possibilities. When the click is done over: - Link: - Title and subtitle (if they are availables) - title is the content text of the link - subtitle is the uri - Copy link (copy the link into the clipboard) - Keep link (download the .html to the Journal) - Follow link in new tab (open a new tab with the url pointed) - Follow link (follow the link inside the current tab) - Image: - Title and subtitle (if they are availables) - title is the "title" property of the <img> - subtitle is the uri - Keep image (download the image to the Journal) - Copy image (copy the image into the clipboard) - Image with a link: - Title and subtitle (if they are availables) - title is the "title" property of the <img> - subtitle is the uri Same Items than "Link" option - Selected Text: - Title and subtitle (not implemented because the function webkit_web_view_get_selected_text was removed: https://bugs.webkit.org/show_bug.cgi?id=62512) - Copy text (copy the text into the clipboard) Signed-off-by: Simon Schampijer <simon@laptop.org> Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'browser.py')
1 files changed, 3 insertions, 0 deletions
diff --git a/browser.py b/browser.py
index 53acb7a..4a6a7b4 100644
--- a/browser.py
+++ b/browser.py
@@ -34,6 +34,7 @@ from sugar3.graphics import style
from sugar3.graphics.icon import Icon
from widgets import BrowserNotebook
+from palettes import ContentInvoker
from filepicker import FilePicker
import globalhistory
import downloadmanager
@@ -497,6 +498,8 @@ class Browser(WebKit.WebView):
self.connect('load-error', self.__load_error_cb)
+ ContentInvoker(self)
self.connect('run-file-chooser', self.__run_file_chooser)
except TypeError: