Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2012-03-16 09:18:10 (GMT)
committer Simon Schampijer <simon@schampijer.de>2012-03-16 16:05:02 (GMT)
commit1ac82f4471a6077a8fd3ae0d302a53eb89c3abf9 (patch)
treea5f9cafd83ab2cefd4720ff025bcf8e26783d25e /browser.py
parent8595e2efe48c9163c179a6533e64ead330ce6680 (diff)
Make the LinkInfo that is displayed at the bottom left themable
Add a gtype_name to make it easily accessible from the theme. We have to do the same for the overlay as well in order to be able to set the 'background-color' of the label. Labels don't create their own window to render themselves into. Instead, they draw themselves directly onto their parents window, so we have to set the background-color of the parent in order to set the labels' background color [1]. The patch does adjust the gtype_names to be consistent. [1] http://developer.gnome.org/gtk-faq/stable/x810.html Signed-off-by: Simon Schampijer <simon@schampijer.de> Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'browser.py')
-rw-r--r--browser.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/browser.py b/browser.py
index 5dea721..0886580 100644
--- a/browser.py
+++ b/browser.py
@@ -286,7 +286,18 @@ Gtk.rc_parse_string('''
widget "*browse-tab-close" style "browse-tab-close"''')
+class LinkInfo(Gtk.Label):
+ __gtype_name__ = 'BrowseLinkInfo'
+
+ def __init__(self):
+ GObject.GObject.__init__(self)
+ self.set_halign(Gtk.Align.START)
+ self.set_valign(Gtk.Align.END)
+
+
class TabPage(Gtk.Overlay):
+ __gtype_name__ = 'BrowseTabPage'
+
def __init__(self, browser):
GObject.GObject.__init__(self)
@@ -294,9 +305,7 @@ class TabPage(Gtk.Overlay):
self._showing_load_status = False
self._requested_uri = None
- link_info = Gtk.Label()
- link_info.set_halign(Gtk.Align.START)
- link_info.set_valign(Gtk.Align.END)
+ link_info = LinkInfo()
self.add_overlay(link_info)
link_info.show()
@@ -351,7 +360,7 @@ class TabPage(Gtk.Overlay):
class TabLabel(Gtk.HBox):
- __gtype_name__ = 'TabLabel'
+ __gtype_name__ = 'BrowseTabLabel'
__gsignals__ = {
'tab-close': (GObject.SignalFlags.RUN_FIRST,