Commit fd4e0671 authored by Alberto Fanjul's avatar Alberto Fanjul
Browse files

Apply codestyle

Include instructions to fix codestyle before submit a patch
parent c43dd9a8
Pipeline #88369 failed
#!/bin/bash
#
# Checks files added match codestyle defined in uncrustify.vala.cfg
#
# You can apply format with:
#
# find -name *.vala -exec uncrustify --replace --no-backup -c "uncrustify.vala.cfg" \{} \;
#
for FILE in $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA)
do
# Aligning prototypes is not working yet, so avoid headers
......
......@@ -17,16 +17,16 @@
*/
int main (string[] args) {
typeof (Gtk.SourceView).ensure ();
typeof (Gtk.SourceView).ensure ();
var app = new Gtk.Application ("org.gnome.Diferencia", ApplicationFlags.FLAGS_NONE);
app.activate.connect (() => {
var win = app.active_window;
if (win == null) {
win = new Diferencia.Window (app);
}
win.present ();
});
var app = new Gtk.Application ("org.gnome.Diferencia", ApplicationFlags.FLAGS_NONE);
app.activate.connect (() => {
var win = app.active_window;
if (win == null) {
win = new Diferencia.Window (app);
}
win.present ();
});
return app.run (args);
return app.run (args);
}
......@@ -36,8 +36,7 @@ namespace Diferencia {
linkmap.draw.connect ((context) => {
int[, ] diff_model = { { 1, 1, 1, 35, 0 },
{ 69, 86, 171, 137, 1 },
{ 239, 205, 205, 205, 2 },
}; // TODO: Model lines increments in ~18. first to numbers represent left range and last two right_range
{ 239, 205, 205, 205, 2 }, }; // TODO: Model lines increments in ~18. first to numbers represent left range and last two right_range
bool has_diffs = diff_model.length[0] > 0;
if (!has_diffs)
......@@ -130,13 +129,13 @@ namespace Diferencia {
}
// context.set_source_rgba(self.fill_colors[c[0]]);
var color = Gdk.RGBA();
if (diff_model[i,4] == 0) {
color.parse("#008800");
} else if (diff_model[i,4] == 1) {
color.parse("#1d59d6");
} else if (diff_model[i,4] == 2) {
color.parse("#ff0000");
var color = Gdk.RGBA ();
if (diff_model[i, 4] == 0) {
color.parse ("#008800");
} else if (diff_model[i, 4] == 1) {
color.parse ("#1d59d6");
} else if (diff_model[i, 4] == 2) {
color.parse ("#ff0000");
}
context.set_source_rgba (color.red, color.green, color.blue, color.alpha);
context.fill_preserve ();
......@@ -150,12 +149,12 @@ namespace Diferencia {
}
// context.set_source_rgba(self.line_colors[c[0]]);
if (diff_model[i,4] == 0) {
color.parse("#a5ff4c");
} else if (diff_model[i,4] == 1) {
color.parse("#0053a6");
} else if (diff_model[i,4] == 2) {
color.parse("#ac3b39");
if (diff_model[i, 4] == 0) {
color.parse ("#a5ff4c");
} else if (diff_model[i, 4] == 1) {
color.parse ("#0053a6");
} else if (diff_model[i, 4] == 2) {
color.parse ("#ac3b39");
}
context.set_source_rgba (color.red, color.green, color.blue, color.alpha);
context.stroke ();
......@@ -163,7 +162,6 @@ namespace Diferencia {
return true;
});
}
int view_offset_line (Gtk.SourceView source_view, int line_num, int pix_start, int y_offset) {
......
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