Commit e6208a83 authored by Sergio Costas's avatar Sergio Costas

Added full color edition (palette, bold, highlight and cursor)

parent e28eb5a4
......@@ -10,7 +10,14 @@
<column type="gint"/>
</columns>
</object>
<object class="GtkListStore" id="palette_schemes"/>
<object class="GtkListStore" id="palette_schemes">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gint1 -->
<column type="gint"/>
</columns>
</object>
<object class="GtkAdjustment" id="scroll_lines">
<property name="upper">10000</property>
<property name="step_increment">1</property>
......@@ -431,7 +438,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette0">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -442,7 +449,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette8">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -453,7 +460,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -464,7 +471,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette9">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -475,7 +482,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -486,7 +493,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette10">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -497,7 +504,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette11">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -508,7 +515,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -519,7 +526,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette4">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -530,7 +537,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette12">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -541,7 +548,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette5">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -552,7 +559,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette13">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -563,7 +570,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette6">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -574,7 +581,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette14">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -585,7 +592,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette7">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -596,7 +603,7 @@
</packing>
</child>
<child>
<object class="GtkColorButton">
<object class="GtkColorButton" id="palette15">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #000000
palette: #AA0000
palette: #00AA00
palette: #AAAA00
palette: #0000AA
palette: #AA00AA
palette: #00AAAA
palette: #AAAAAA
palette: #000000
palette: #FF0000
palette: #00FF00
palette: #FFFF00
palette: #0000FF
palette: #FF00FF
palette: #00FFFF
palette: #FFFFFF
name: Prueba de paleta
text_fg: #000000
text_bg: #C0C0C0
This diff is collapsed.
......@@ -218,15 +218,16 @@ namespace Terminus {
// Set all the properties
settings_changed("infinite-scroll");
settings_changed("use-system-font");
settings_changed("color-palete");
settings_changed("fg-color");
settings_changed("bg-color");
settings_changed("use-system-font");
settings_changed("bold-color");
// These aren't needed because are refreshed with "color-palete"
/*settings_changed("bold-color");
settings_changed("highlight-fg-color");
settings_changed("highlight-bg-color");
settings_changed("cursor-fg-color");
settings_changed("cursor-bg-color");
settings_changed("cursor-bg-color");*/
}
public bool update_title_cb() {
......@@ -329,6 +330,11 @@ namespace Terminus {
var bgcolor = Gdk.RGBA();
bgcolor.parse(Terminus.settings.get_string("bg-color"));
this.vte_terminal.set_colors(fgcolor,bgcolor,palette);
this.settings_changed("bold-color");
this.settings_changed("cursor-fg-color");
this.settings_changed("cursor-bg-color");
this.settings_changed("highlight-fg-color");
this.settings_changed("highlight-bg-color");
break;
case "use-system-font":
case "terminal-font":
......
......@@ -133,6 +133,21 @@ namespace Terminus {
return true;
}
public bool compare_palette() {
string[] current = Terminus.settings.get_strv("color-palete");
if (current.length != this.palette.length) {
return false;
}
for(int i = 0; i < 16; i++) {
string color = "#%02X%02X%02X".printf((int)(this.palette[i].red*255),(int)(this.palette[i].green*255),(int)(this.palette[i].blue*255));
if (current[i].ascii_up() != color) {
return false;
}
}
return true;
}
public bool readpalette(string filename) {
if (!filename.has_suffix(".color_scheme")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment