From effc4f37f288e6fc0a1caf43f0089ec7e2a10ebc Mon Sep 17 00:00:00 2001
From: Eduardo Grajeda <tatofoo@gmail.com>
Date: Fri, 2 Apr 2010 14:48:29 -0600
Subject: [PATCH 3/4] Now it shows the color scheme set in gconf
---
src/guake.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/guake.py b/src/guake.py
index 08ade24..d477c49 100644
|
a
|
b
|
|
| 128 | 128 | notify_add(KEY('/general/use_default_font'), self.default_font_toggled) |
| 129 | 129 | notify_add(KEY('/style/font/style'), self.fstyle_changed) |
| 130 | 130 | notify_add(KEY('/style/font/color'), self.fcolor_changed) |
| | 131 | notify_add(KEY('/style/font/palette'), self.fpalette_changed) |
| 131 | 132 | notify_add(KEY('/style/background/color'), self.bgcolor_changed) |
| 132 | 133 | notify_add(KEY('/style/background/image'), self.bgimage_changed) |
| 133 | 134 | notify_add(KEY('/style/background/transparency'), |
| … |
… |
|
| 258 | 259 | i.set_color_foreground(fgcolor) |
| 259 | 260 | i.set_color_bold(fgcolor) |
| 260 | 261 | |
| | 262 | def fpalette_changed(self, client, connection_id, entry, data): |
| | 263 | """If the gconf var style/font/palette be changed, this method |
| | 264 | will be called and will change the color scheme in all terminals |
| | 265 | open. |
| | 266 | """ |
| | 267 | fgcolor = gtk.gdk.color_parse( |
| | 268 | client.get_string(KEY('/style/font/color'))) |
| | 269 | bgcolor = gtk.gdk.color_parse( |
| | 270 | client.get_string(KEY('/style/background/color'))) |
| | 271 | palette = [gtk.gdk.color_parse(color) for color in |
| | 272 | entry.value.get_string().split(':')] |
| | 273 | for i in self.guake.term_list: |
| | 274 | i.set_colors(fgcolor, bgcolor, palette) |
| | 275 | |
| 261 | 276 | def bgcolor_changed(self, client, connection_id, entry, data): |
| 262 | 277 | """If the gconf var style/background/color be changed, this |
| 263 | 278 | method will be called and will change the background color in |
| … |
… |
|
| 837 | 852 | self.client.notify(KEY('/general/show_resizer')) |
| 838 | 853 | self.client.notify(KEY('/style/font/style')) |
| 839 | 854 | self.client.notify(KEY('/style/font/color')) |
| | 855 | self.client.notify(KEY('/style/font/palette')) |
| 840 | 856 | self.client.notify(KEY('/style/background/color')) |
| 841 | 857 | self.client.notify(KEY('/style/background/image')) |
| 842 | 858 | self.client.notify(KEY('/style/background/transparency')) |