~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/client/util/util-gtk.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-10-10 17:40:37 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20131010174037-5p5o4dlsoewek2kg
Tags: 0.4.0-0ubuntu1
New stable version

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
    ctx.set_source_rgb(rgba.red, rgba.green, rgba.blue);
109
109
}
110
110
 
 
111
void apply_style(Gtk.Widget widget, string style) {
 
112
    try {
 
113
        Gtk.CssProvider style_provider = new Gtk.CssProvider();
 
114
        style_provider.load_from_data(style, -1);
 
115
        
 
116
        Gtk.StyleContext style_context = widget.get_style_context();
 
117
        style_context.add_provider(style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
 
118
    } catch (Error e) {
 
119
        warning("Could not load style: %s", e.message);
 
120
    }
 
121
}
 
122
 
111
123
}