~ubuntu-branches/ubuntu/precise/gnome-games/precise-updates

« back to all changes in this revision

Viewing changes to swell-foop/src/ThemeLoader.js

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-03-19 20:46:10 UTC
  • mfrom: (1.1.105)
  • Revision ID: package-import@ubuntu.com-20120319204610-2nd2xqq39j8y7t5q
Tags: 1:3.3.92-0ubuntu1
* New upstream release.
  - Swell Foop ported to Vala, no longer in staging
    (LP: #939200, LP: #939210)
* debian/patches/git_fix-iagno-ai.patch: Dropped, upstream
* debian/control.in:
  - Drop no longer needed swell-foop dependencies
* debian/rules:
  - Don't install staging games
* debian/swell-foop.install:
  - Don't install gir files any more; they're not needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Clutter = imports.gi.Clutter;
2
 
Gio = imports.gi.Gio;
3
 
 
4
 
function load_svg(theme, file)
5
 
{
6
 
        var tx = new Clutter.Texture({filename: imports.Path.file_prefix + "themes/"
7
 
                                                + theme + "/" + file});
8
 
        tx.filter_quality = Clutter.TextureQuality.HIGH;
9
 
        tx.hide();
10
 
        return tx;
11
 
}
12
 
 
13
 
function load_theme(stage, theme)
14
 
{
15
 
        if(theme.loaded)
16
 
                return;
17
 
        
18
 
        theme.loaded = true;
19
 
 
20
 
        for(actor in theme.textures)
21
 
                stage.add_actor(theme.textures[actor]);
22
 
}
23
 
 
24
 
function load_themes()
25
 
{
26
 
        themes = {};
27
 
        
28
 
        file = Gio.file_new_for_path(imports.Path.file_prefix + "/themes");
29
 
        enumerator = file.enumerate_children("standard::name");
30
 
        
31
 
        while((child = enumerator.next_file()))
32
 
        {
33
 
                var c_theme = imports.themes[child.get_name()].theme;
34
 
                themes[c_theme.name] = c_theme;
35
 
        }
36
 
        
37
 
        return themes;
38
 
}