~ubuntu-branches/ubuntu/maverick/unity/maverick

« back to all changes in this revision

Viewing changes to unity-private/panel/panel-indicator-object-entry-view.vala

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-09-17 14:02:54 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20100917140254-6cbue12klia2f07l
Tags: 0.2.40-0ubuntu1
* New upstream release:
  - Fix inactive menus accessible (LP: #604505)
  - Fix some more memory leaks (LP: #604777, #621690, #628144)
  - Fix weird behaviors of quicklist (LP: #617339)
  - Provide an "open this folder" button (LP: #633201)
  - Hidden menu causing gap (LP: #600191)
  - Cannot go fullscreen for flash videos (LP: #631381)
  - Can't access menu items from the keyboard (LP: #636728)
  - Don't register for MDRAGs since they aren't used (LP: #632613)
  - Don't run indicator on special launchers (LP: #627488)
  - Center arrows position in folded launcher tiles (LP: #633084)
  - Launcher icons first appear as white upon login (LP: #601093)
  - Removes jittering when rubber band is in use on the launcher (LP: #632991)
  - Mutter restarts on closing almost any application (LP: #634701)
  - Can't launch apps like synaptic with root privileges from launch bar
    (LP: #599298)
  - Launcher tile dragging shouldn't be masked (LP: #631443)
  - Fix Carousel-ed icons have distorted perspective (LP: #607515)
  - Use no longer sync call (LP: #620011)
* update debian/libunity0.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    private float last_width = 0;
35
35
    private float last_height = 0;
36
36
 
 
37
    public bool skip;
 
38
 
37
39
    public IndicatorObjectEntryView (Indicator.ObjectEntry _entry)
38
40
    {
39
41
      Object (entry:_entry,
66
68
      bg.opacity = 0;
67
69
      bg.show ();
68
70
 
 
71
      skip = false;
 
72
 
69
73
      if (entry.image is Gtk.Image)
70
74
        {
71
75
          image = new Ctk.Image (22);
91
95
          if ((entry.image.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
92
96
            {
93
97
              image.show ();
 
98
              if (entry.label != null)
 
99
                {
 
100
                  if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
 
101
                    {
 
102
                      text.show ();
 
103
                      this.show ();
 
104
                    }
 
105
                }
 
106
              else
 
107
                {
 
108
                  this.show ();
 
109
                }
94
110
            }
95
111
          else
96
112
            {
97
113
              image.hide ();
98
 
            }
 
114
              if (entry.label != null)
 
115
                {
 
116
                  if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) == 0)
 
117
                    {
 
118
                      text.hide ();
 
119
                      this.hide ();
 
120
                    }
 
121
                }
 
122
              else
 
123
                {
 
124
                  this.hide ();
 
125
                }
 
126
            }
 
127
 
 
128
          if ((entry.image.get_flags () & Gtk.WidgetFlags.SENSITIVE) != 0)
 
129
            {
 
130
              this.reactive = true;
 
131
              this.skip = false;
 
132
              image.opacity = 255;
 
133
            }
 
134
          else
 
135
            {
 
136
              this.reactive = false;
 
137
              this.skip = true;
 
138
              image.opacity = 64;
 
139
            }
 
140
 
 
141
          entry.image.notify["sensitive"].connect (() =>
 
142
            {
 
143
              if ((entry.image.get_flags () & Gtk.WidgetFlags.SENSITIVE) != 0)
 
144
                {
 
145
                  this.reactive = true;
 
146
                  this.skip = false;
 
147
                  image.animate (Clutter.AnimationMode.EASE_OUT_QUAD,
 
148
                                 200,
 
149
                                 "opacity",
 
150
                                 255);
 
151
                }
 
152
              else
 
153
                {
 
154
                  this.reactive = false;
 
155
                  this.skip = true;
 
156
                  image.animate (Clutter.AnimationMode.EASE_OUT_QUAD,
 
157
                                 200,
 
158
                                 "opacity",
 
159
                                 64);
 
160
                }
 
161
            });
99
162
 
100
163
          entry.image.notify["visible"].connect (() =>
101
164
            {
104
167
                  if ((entry.image.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
105
168
                    {
106
169
                      image.show ();
 
170
                      if (entry.label != null)
 
171
                        {
 
172
                          if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
 
173
                            {
 
174
                              text.show ();
 
175
                              this.show ();
 
176
                            }
 
177
                        }
 
178
                      else
 
179
                        {
 
180
                          this.show ();
 
181
                        }
107
182
                    }
108
183
                  else
109
184
                    {
110
185
                      image.hide ();
 
186
                      if (entry.label != null)
 
187
                        {
 
188
                          if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) == 0)
 
189
                            {
 
190
                              text.hide ();
 
191
                              this.hide ();
 
192
                            }
 
193
                        }
 
194
                      else
 
195
                        {
 
196
                          this.hide ();
 
197
                        }
111
198
                    }
112
199
                }
113
200
            });
135
222
        {
136
223
          if (image.gicon is GLib.Icon)
137
224
            {
138
 
            image.gicon = entry.image.gicon;
139
 
            image.size = 22;
 
225
              image.gicon = entry.image.gicon;
 
226
              image.size = 22;
140
227
            }
141
228
        });
142
229
 
164
251
          if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
165
252
            {
166
253
              text.show ();
 
254
              if (entry.image != null)
 
255
                {
 
256
                  if ((entry.image.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
 
257
                    {
 
258
                      image.show ();
 
259
                      this.show ();
 
260
                    }
 
261
                }
 
262
              else
 
263
                {
 
264
                  this.show ();
 
265
                }
167
266
            }
168
267
          else
169
268
            {
170
269
              text.hide ();
171
 
            }
 
270
              if (entry.image != null)
 
271
                {
 
272
                  if ((entry.image.get_flags () & Gtk.WidgetFlags.VISIBLE) == 0)
 
273
                    {
 
274
                      image.hide ();
 
275
                      this.hide ();
 
276
                    }
 
277
                }
 
278
              else
 
279
                {
 
280
                  this.hide ();
 
281
                }
 
282
            }
 
283
 
 
284
          if ((entry.label.get_flags () & Gtk.WidgetFlags.SENSITIVE) != 0)
 
285
            {
 
286
              this.reactive = true;
 
287
              this.skip = false;
 
288
              text.opacity = 255;
 
289
            }
 
290
          else
 
291
            {
 
292
              this.reactive = false;
 
293
              this.skip = true;
 
294
              text.opacity = 64;
 
295
            }
 
296
 
 
297
          entry.label.notify["sensitive"].connect (() =>
 
298
            {
 
299
              if ((entry.label.get_flags () & Gtk.WidgetFlags.SENSITIVE) != 0)
 
300
                {
 
301
                  this.reactive = true;
 
302
                  this.skip = false;
 
303
                  text.animate (Clutter.AnimationMode.EASE_OUT_QUAD,
 
304
                                200,
 
305
                                "opacity",
 
306
                                255);
 
307
                }
 
308
              else
 
309
                {
 
310
                  this.reactive = false;
 
311
                  this.skip = true;
 
312
                  text.animate (Clutter.AnimationMode.EASE_OUT_QUAD,
 
313
                                200,
 
314
                                "opacity",
 
315
                                64);
 
316
                }
 
317
            });
172
318
 
173
319
          entry.label.notify["visible"].connect (() =>
174
320
            {
177
323
                  if ((entry.label.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
178
324
                    {
179
325
                      text.show ();
 
326
                      if (entry.image != null)
 
327
                        {
 
328
                          if ((entry.image.get_flags () & Gtk.WidgetFlags.VISIBLE) != 0)
 
329
                            {
 
330
                              image.show ();
 
331
                              this.show ();
 
332
                            }
 
333
                        }
 
334
                      else
 
335
                        {
 
336
                          this.show ();
 
337
                        }
180
338
                    }
181
339
                  else
182
340
                    {
183
341
                      text.hide ();
 
342
                      if (entry.image != null)
 
343
                        {
 
344
                          if ((entry.image.get_flags () & Gtk.WidgetFlags.VISIBLE) == 0)
 
345
                            {
 
346
                              image.hide ();
 
347
                              this.hide ();
 
348
                            }
 
349
                        }
 
350
                      else
 
351
                        {
 
352
                          this.hide ();
 
353
                        }
184
354
                    }
185
355
                }
186
356
            });