Ticket #51: 0003-Now-it-shows-the-color-scheme-set-in-gconf.patch

File 0003-Now-it-shows-the-color-scheme-set-in-gconf.patch, 2.4 KB (added by tatofoo, 2 years ago)

These patches were made with git format-patch

  • src/guake.py

    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  
    128128        notify_add(KEY('/general/use_default_font'), self.default_font_toggled) 
    129129        notify_add(KEY('/style/font/style'), self.fstyle_changed) 
    130130        notify_add(KEY('/style/font/color'), self.fcolor_changed) 
     131        notify_add(KEY('/style/font/palette'), self.fpalette_changed) 
    131132        notify_add(KEY('/style/background/color'), self.bgcolor_changed) 
    132133        notify_add(KEY('/style/background/image'), self.bgimage_changed) 
    133134        notify_add(KEY('/style/background/transparency'), 
     
    258259            i.set_color_foreground(fgcolor) 
    259260            i.set_color_bold(fgcolor) 
    260261 
     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 
    261276    def bgcolor_changed(self, client, connection_id, entry, data): 
    262277        """If the gconf var style/background/color be changed, this 
    263278        method will be called and will change the background color in 
     
    837852        self.client.notify(KEY('/general/show_resizer')) 
    838853        self.client.notify(KEY('/style/font/style')) 
    839854        self.client.notify(KEY('/style/font/color')) 
     855        self.client.notify(KEY('/style/font/palette')) 
    840856        self.client.notify(KEY('/style/background/color')) 
    841857        self.client.notify(KEY('/style/background/image')) 
    842858        self.client.notify(KEY('/style/background/transparency'))