diff options
-rw-r--r-- | palettes.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/palettes.py b/palettes.py index fedf9be..d34d862 100644 --- a/palettes.py +++ b/palettes.py @@ -117,6 +117,8 @@ class ContentInvoker(Invoker): return True def _handle_event(self, event): + svg_url = str(self._browser.get_uri()).lower() + hit_test = self._browser.get_hit_test_result(event) hit_context = hit_test.props.context hit_info = { @@ -152,10 +154,13 @@ class ContentInvoker(Invoker): hit_info['is selection']): self.palette = BrowsePalette(self._browser, title, url, hit_info) self.notify_right_click() + elif svg_url.endswith(".svg"): + self.palette = BrowsePalette(self._browser, title, svg_url, hit_info, True) + self.notify_right_click() class BrowsePalette(Palette): - def __init__(self, browser, title, url, hit_info): + def __init__(self, browser, title, url, hit_info, svg=False): Palette.__init__(self) self._browser = browser @@ -207,7 +212,7 @@ class BrowsePalette(Palette): menu_box.pack_start(menu_item, False, False, 0) menu_item.show() - if hit_info['is image']: + if hit_info['is image'] or svg: if not first_section_added: first_section_added = True else: |