Created
November 22, 2010 04:55
-
-
Save segphault/709540 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== modified file 'client/gwibber-client.vala' | |
--- client/gwibber-client.vala 2010-11-22 02:06:24 +0000 | |
+++ client/gwibber-client.vala 2010-11-22 04:44:23 +0000 | |
@@ -34,6 +34,7 @@ | |
"Jorge Castro", | |
"Gustavo Niemeyer", | |
"Ted Gould"}; | |
+ | |
var messages = new string[10] { | |
"Adding unit tests to the Unity panel service. Mixing GTester + C++ is interesting, definitely not as bad as I thought it would be.", | |
"The police officer that was shot in this news story <a href='http://is.gd/hmV87'>http://is.gd/hmV87</a> is a dear friend of mine, everyone send good vibes his way", | |
@@ -46,13 +47,27 @@ | |
"♺ <a href='@rbp'>@rbp</a>: RT <a href='@ThePSF'>@ThePSF</a> rt <a href='@voidspace'>@voidspace</a>: Here is the list of Python bugs closed (so far) during the bug weekend: Way to go!> <a href='http://goo.gl/V8cJu'>http://goo.gl/V8cJu</a>", | |
"<a href='@bratschegnome'>@bratschegnome</a>: Cool! Fortunately Google knows more about bikes than I do :)"}; | |
+ var colors = new string[10] { | |
+ "#4e4e9a9a0606", | |
+ "#72729f9fcfcf", | |
+ "#45100ebd5701", | |
+ "#72729f9fcfcf", | |
+ "#4e4e9a9a0606", | |
+ "#45100ebd5701", | |
+ "#72729f9fcfcf", | |
+ "#45100ebd5701", | |
+ "#4e4e9a9a0606", | |
+ "#4e4e9a9a0606" | |
+ }; | |
+ | |
Dee.Model model; | |
- model = new Dee.SequenceModel (6, | |
- typeof (uint), | |
- typeof (string), | |
- typeof (string), | |
- typeof (uint), | |
+ model = new Dee.SequenceModel (7, | |
+ typeof (uint), | |
+ typeof (string), | |
+ typeof (string), | |
+ typeof (uint), | |
+ typeof (string), | |
typeof (string), | |
typeof (string)); | |
@@ -64,6 +79,7 @@ | |
3, 0, | |
4, messages[i % 10], | |
5, "stock_person", | |
+ 6, colors[i % 10], | |
-1); | |
} | |
=== modified file 'libgwibber-gtk/stream-model-schema.vala' | |
--- libgwibber-gtk/stream-model-schema.vala 2010-11-22 01:30:21 +0000 | |
+++ libgwibber-gtk/stream-model-schema.vala 2010-11-22 04:22:37 +0000 | |
@@ -27,6 +27,7 @@ | |
NAME, | |
TIMESTAMP, | |
MESSAGE, | |
- ICON_URI | |
+ ICON_URI, | |
+ COLOR | |
} | |
} | |
=== modified file 'libgwibber-gtk/stream-view-tile.vala' | |
--- libgwibber-gtk/stream-view-tile.vala 2010-11-22 01:30:21 +0000 | |
+++ libgwibber-gtk/stream-view-tile.vala 2010-11-22 04:46:35 +0000 | |
@@ -27,6 +27,7 @@ | |
private new Gtk.Label name; | |
private Gtk.Label time; | |
private Gtk.Label message; | |
+ private Gdk.Color color; | |
public uint uid = 0; | |
@@ -125,11 +126,13 @@ | |
alloc.y + alloc.height - 1, | |
radius); | |
- cr.set_source_rgba (202/255.0f, 202/255.0f, 202/255.0f, 0.9f); | |
+ var p = new Cairo.Pattern.linear(event.area.x, event.area.y, event.area.x, event.area.y + event.area.height); | |
+ p.add_color_stop_rgba (1, color.red / 65535.0 , color.green / 65535.0, color.blue / 65535.0, 0.2); | |
+ p.add_color_stop_rgba (0.0, 1, 1, 1, 1); | |
+ cr.set_source (p); | |
cr.fill_preserve (); | |
cr.set_source_rgba (102/255.0f, 102/255.0f, 102/255.0f, 0.5f); | |
- | |
cr.stroke (); | |
propagate_expose (alignment, event); | |
@@ -148,7 +151,8 @@ | |
string _name, | |
uint _timestamp, | |
string _message, | |
- string _icon_uri) | |
+ string _icon_uri, | |
+ string _color) | |
{ | |
Gtk.Allocation alloc; | |
uid = _uid; | |
@@ -158,6 +162,8 @@ | |
vbox.get_allocation (out alloc); | |
message.set_size_request (alloc.width, -1); | |
+ | |
+ Gdk.Color.parse(_color, out color); | |
queue_resize (); | |
show (); | |
=== modified file 'libgwibber-gtk/stream-view.vala' | |
--- libgwibber-gtk/stream-view.vala 2010-11-22 01:30:21 +0000 | |
+++ libgwibber-gtk/stream-view.vala 2010-11-22 04:22:03 +0000 | |
@@ -126,7 +126,8 @@ | |
_model.get_string (iter, StreamModelColumn.NAME), | |
_model.get_uint (iter, StreamModelColumn.TIMESTAMP), | |
_model.get_string (iter, StreamModelColumn.MESSAGE), | |
- _model.get_string (iter, StreamModelColumn.ICON_URI)); | |
+ _model.get_string (iter, StreamModelColumn.ICON_URI), | |
+ _model.get_string (iter, StreamModelColumn.COLOR)); | |
} | |
else | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment