From af31a44d9b5247d56a7a468102369d3314e1a2a3 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Fri, 28 Sep 2012 13:18:48 +0000 Subject: Button to clear the url entry SL #3499 Added an 'X' to clear the url entry easily. This button is shown when the url entry has focus and the user is not reading a .pdf webpage. When the focus is left the icon changes again to the correct one (reload, stop loading or none) Signed-off-by: Manuel Kaufmann Acked-by: Manuel QuiƱones --- (limited to 'browser.py') diff --git a/browser.py b/browser.py index fab8012..53acb7a 100644 --- a/browser.py +++ b/browser.py @@ -344,6 +344,11 @@ class TabbedView(BrowserNotebook): self._append_tab(browser) browser.set_history(tab_history) + def is_current_page_pdf(self): + index = self.get_current_page() + current_page = self.get_nth_page(index) + return isinstance(current_page, PDFTabPage) + Gtk.rc_parse_string(''' style "browse-tab-close" { -- cgit v0.9.1