Skip to content

Commit

Permalink
Reorganised palette definition, add demo terminal in pref
Browse files Browse the repository at this point in the history
This fix: #504, #273, #220

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
  • Loading branch information
gsemet committed Apr 23, 2015
1 parent ca1c0bb commit 588cf6e
Show file tree
Hide file tree
Showing 8 changed files with 780 additions and 816 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Verison 0.7.0:
- expose Guake startup script to the pref window (#198)
- Force $TERM environment variable to 'xterm-256color' in terminals (#341)
- Fix "Not focused on openning if tab was moved" (#441)
- Reorganised palette definition, add demo terminal in pref (#504, #273, #220)


Version 0.6.2:
Expand Down
11 changes: 11 additions & 0 deletions data/guake.schemas
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,17 @@
<long>Color scheme that will be used in terminal.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/guake/style/font/palette_name</key>
<applyto>/apps/guake/style/font/palette_name</applyto>
<owner>guake</owner>
<type>string</type>
<default>Tango</default>
<locale name="C">
<short>Color scheme name.</short>
<long>Color scheme name that will be used in terminal.</long>
</locale>
</schema>

<schema>
<key>/schemas/apps/guake/style/background/color</key>
Expand Down
169 changes: 34 additions & 135 deletions data/prefs.glade
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,7 @@ Underline</property>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">3</property>
<property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
Expand Down Expand Up @@ -1453,140 +1453,7 @@ Underline</property>
<widget class="GtkComboBox" id="palette_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="items" translatable="yes">3024 Day
3024 Night
Adventure Time
Afterglow
Alien Blood
Argonaut
Arthur
Atom
Belafonte Day
Belafonte Night
Birdsofparadise
Blazer
Borland
Broadcast
Brogrammer
C64
Chalk
Chalkboard
Ciapre
Clrs
Cobalt Neon
Cobalt2
Crayon Pony Fish
Dark Pastel
Darkside
Desert
Dimmed Monokai
Dracula
Earthsong
Elemental
Espresso Libre
Espresso
Fideloper
Fishtank
Flat
Flatland
Frontend Delight
Frontend Fun Forrest
Frontend Galaxy
Github
Grape
Grass
Hardcore
Harper
Highway
Hipster Green
Homebrew
Hurtado
Hybrid
Ic Green Ppl
Ic Orange Ppl
Idle Toes
Ir Black
Jackie Brown
Japanesque
Jellybeans
Kibble
Later This Evening
Lavandula
Linux Console
Liquid Carbon Transparent
Liquid Carbon
Lucario
Man Page
Mathias
Medallion
Misterioso
Molokai
Mona Lisa
Monokai Cobalt2
Monokai Soda
Monokai
N0tch2k
Neopolitan
Neutron
Nightlion V1
Nightlion V2
Novel
Obsidian
Ocean
Ollie
One Dark
Paul Millr
Pencil Dark
Pencil Light
Pnevma
Pro
Red Alert
Red Sands
Rippedcasts
Royal
Rxvt
Sea Shells
Seafoam Pastel
Seti
Shaman
Slate
Smyck
Soft Server
Solarized Darcula
Solarized Dark Higher Contrast
Solarized Dark
Solarized Light
Space Gray Eighties
Space Gray
Spacedust
Spring
Square
Sundried
Symphonic
Tango
Teerb
Terminal Basic
Thayer Bright
Tomorrow Night Blue
Tomorrow Night Bright
Tomorrow Night Eighties
Tomorrow Night
Tomorrow
Toy Chest
Treehouse
Twilight
Urple
Vaughn
Vibrant Ink
Warm Neon
Wez
Wild Cherry
Wombat
Wryan
Xterm
Zenburn
Custom
</property>
<property name="items" translatable="yes"/>
<signal name="changed" handler="on_palette_name_changed" swapped="no"/>
</widget>
<packing>
Expand Down Expand Up @@ -1920,6 +1787,38 @@ Custom
<property name="y_options"/>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label36">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="label" translatable="yes">Demo:</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="demo_terminal_box">
<property name="height_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<placeholder/>
</child>
Expand Down
3 changes: 2 additions & 1 deletion src/guake/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ guakemodule_PYTHON = __init__.py \
notifier.py \
prefs.py \
simplegladeapp.py \
terminal.py
terminal.py \
palettes.py

guakedir = $(bindir)
bin_SCRIPTS = guake guake-prefs
Expand Down
4 changes: 1 addition & 3 deletions src/guake/gconfhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def __init__(self, guake):
notify_add(KEY('/style/font/style'), self.fstyle_changed)
notify_add(KEY('/style/font/color'), self.fcolor_changed)
notify_add(KEY('/style/font/palette'), self.fpalette_changed)
# notify_add(KEY('/style/font/palette_name'), self.fpalette_changed)
notify_add(KEY('/style/background/color'), self.bgcolor_changed)
notify_add(KEY('/style/background/image'), self.bgimage_changed)
notify_add(KEY('/style/background/transparency'),
Expand Down Expand Up @@ -245,9 +246,7 @@ def fcolor_changed(self, client, connection_id, entry, data):
use_palette_font_and_background_color = client.get_bool(
KEY('/general/use_palette_font_and_background_color'))
if use_palette_font_and_background_color:
print "do not set text color from user"
return
print "fgcolor=", fgcolor
for i in self.guake.notebook.iter_terminals():
i.set_color_dim(i.custom_fgcolor or fgcolor)
i.set_color_foreground(i.custom_fgcolor or fgcolor)
Expand All @@ -268,7 +267,6 @@ def fpalette_changed(self, client, connection_id, entry, data):
use_palette_font_and_background_color = client.get_bool(
KEY('/general/use_palette_font_and_background_color'))
if use_palette_font_and_background_color and len(palette) > 16:
print "yes use font and background color from the palette !!!"
fgcolor = palette[16]
bgcolor = palette[17]
for i in self.guake.notebook.iter_terminals():
Expand Down
1 change: 1 addition & 0 deletions src/guake/guake_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ def load_config(self):
self.client.notify(KEY('/style/font/style'))
self.client.notify(KEY('/style/font/color'))
self.client.notify(KEY('/style/font/palette'))
self.client.notify(KEY('/style/font/palette_name'))
self.client.notify(KEY('/style/background/color'))
self.client.notify(KEY('/style/background/image'))
self.client.notify(KEY('/style/background/transparency'))
Expand Down
Loading

0 comments on commit 588cf6e

Please sign in to comment.