[ease] [editor] Don't crash if gtk doesn't find a color
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] [editor] Don't crash if gtk doesn't find a color
- Date: Sat, 24 Jul 2010 23:25:04 +0000 (UTC)
commit 7730d298fff3c82b3b3e2dd03112f217ff54f921
Author: Nate Stedman <natesm gmail com>
Date: Sat Jul 24 19:23:27 2010 -0400
[editor] Don't crash if gtk doesn't find a color
src/ease-editor-embed.vala | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/ease-editor-embed.vala b/src/ease-editor-embed.vala
index a16111f..3744adc 100644
--- a/src/ease-editor-embed.vala
+++ b/src/ease-editor-embed.vala
@@ -181,7 +181,17 @@ public class Ease.EditorEmbed : ScrollableEmbed
// set the background to a faded version of the normal gtk background
Clutter.Color out_color;
- theme_clutter_color(BG_COLOR).shade(SHADE_FACTOR, out out_color);
+ var color = theme_color(BG_COLOR);
+ if (color == null)
+ {
+ out_color = { 150, 150, 150, 255 };
+ out_color.shade(SHADE_FACTOR, out out_color);
+ }
+ else
+ {
+ out_color = Transformations.gdk_color_to_clutter_color(color);
+ }
+
get_stage().color = out_color;
document = d;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]