~severinh/unity/fixes-641669

« back to all changes in this revision

Viewing changes to src/panel/panel-view.vala

  • Committer: Neil Jagdish Patel
  • Date: 2010-01-14 08:36:31 UTC
  • mto: This revision was merged to the branch mainline in revision 73.
  • Revision ID: neil.patel@canonical.com-20100114083631-ngfeyacxjq9x98c9
[panel] Use libunity-misc

added:
  vapi/unity-misc.vapi
modified:
  configure.ac
  mutter-plugin/plugin.vala
  src/Makefile.am
  src/panel/panel-tray.vala
  src/panel/panel-view.vala
  src/window.vala
  vapi/unity-const.vapi

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
{
23
23
  public class View : Ctk.Actor
24
24
  {
25
 
    private Shell shell;
 
25
    private Shell _shell;
 
26
    public  Shell shell {
 
27
      get { return _shell; }
 
28
      set { _shell = value; }
 
29
    }
 
30
 
26
31
    private Tray.View tray;
27
32
 
28
33
    private Clutter.Rectangle rect;
29
34
 
30
35
    public View (Shell shell)
31
36
    {
32
 
      this.shell = shell;
 
37
      debug ("View");
 
38
      Object (shell:shell);
 
39
      this.tray.manage_stage (this.shell.get_stage ());
33
40
    }
34
41
 
35
42
    construct
42
49
      this.rect.set_parent (this);
43
50
      this.rect.show ();
44
51
 
45
 
      tray = new Tray.View ();
 
52
      this.tray = new Tray.View ();
 
53
      this.tray.set_parent (this);
 
54
      this.tray.show ();
 
55
      //this.tray.manage_stage (this._shell.get_stage ());
46
56
 
47
57
      END_FUNCTION ();
48
58
    }
52
62
    {
53
63
      Clutter.ActorBox child_box = { 0, 0, box.x2 - box.x1, box.y2 - box.y1 };
54
64
      this.rect.allocate (child_box, flags);
 
65
 
 
66
      child_box.x1 = 100;
 
67
      child_box.x2 = 200;
 
68
      this.tray.allocate (child_box, flags);
55
69
    }
56
70
 
57
71
    private override void paint ()
58
72
    {
59
73
      base.paint ();
60
74
      this.rect.paint ();
 
75
      this.tray.paint ();
61
76
    }
62
77
 
63
78
    private override void map ()
64
79
    {
65
80
      base.map ();
66
81
      this.rect.map ();
 
82
      this.tray.map ();
67
83
    }
68
84
 
69
85
    private override void unmap ()
70
86
    {
71
87
      base.unmap ();
72
88
      this.rect.unmap ();
 
89
      this.tray.unmap ();
73
90
    }
74
91
  }
75
92
}