~ricotz/gala/session-dialog-text

« back to all changes in this revision

Viewing changes to src/Background/BackgroundManager.vala

  • Committer: RabbitBot
  • Author(s): Tom Beckmann, Victor Martinez
  • Date: 2014-03-18 04:30:24 UTC
  • mfrom: (369.1.4 gala-panel-opacity)
  • Revision ID: rabbitbot-20140318043024-1xdv1axew14ik7ju
adds a get_optimal_panel_alpha() method and a background_changed() signal to gala's dbus interface for use by wingpanel

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
        public class BackgroundManager : Meta.BackgroundGroup
22
22
        {
23
23
                public Meta.Screen screen { get; construct; }
 
24
                public signal void changed ();
24
25
 
25
26
                public BackgroundManager (Meta.Screen screen)
26
27
                {
41
42
 
42
43
                void update ()
43
44
                {
 
45
                        var reference_child = get_child_at_index (0);
 
46
                        if (reference_child != null)
 
47
                                (reference_child as Background).changed.disconnect (background_changed);
 
48
 
44
49
                        remove_all_children ();
45
50
 
46
51
                        var settings = BackgroundSettings.get_default ().schema;
53
58
                                background.set_size (geom.width, geom.height);
54
59
 
55
60
                                add_child (background);
 
61
 
 
62
                                if (i == 0)
 
63
                                        background.changed.connect (background_changed);
56
64
                        }
57
65
                }
 
66
 
 
67
                void background_changed ()
 
68
                {
 
69
                        changed ();
 
70
                }
58
71
        }
59
72
#endif
60
73
}