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

« back to all changes in this revision

Viewing changes to unity-private/panel/panel-indicator-object-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:
57
57
 
58
58
      indicator_object.entry_added.connect (this.on_entry_added);
59
59
      indicator_object.entry_removed.connect (this.remove_entry);
 
60
      indicator_object.menu_show.connect (on_menu_show);
60
61
 
61
62
      unowned GLib.List<Indicator.ObjectEntry> list = indicator_object.get_entries ();
62
63
 
84
85
       */
85
86
    }
86
87
 
 
88
    public void on_menu_show (Indicator.ObjectEntry entry, uint timestamp)
 
89
    {
 
90
      foreach (IndicatorObjectEntryView view in indicator_entry_array)
 
91
        {
 
92
          var s = (view.entry.label is Gtk.Label) ? entry.label.label : "";
 
93
          if (view.entry == entry)
 
94
            {
 
95
              view.show_menu ();
 
96
              break;
 
97
            }
 
98
        }
 
99
    }
 
100
 
87
101
    private void on_menu_moved (IndicatorObjectEntryView object_entry_view, Gtk.MenuDirectionType type)
88
102
    {
89
103
      if (type != Gtk.MenuDirectionType.PARENT &&
114
128
        }
115
129
 
116
130
      IndicatorObjectEntryView next_object_entry_view = this.indicator_entry_array.get (pos);
 
131
      if (next_object_entry_view.skip)
 
132
        {
 
133
          if (type == Gtk.MenuDirectionType.PARENT)
 
134
            {
 
135
              if (pos == 0)
 
136
                next_object_entry_view = this.indicator_entry_array.get (this.indicator_entry_array.size - 1);
 
137
              else
 
138
                next_object_entry_view = this.indicator_entry_array.get (pos-1);
 
139
 
 
140
            }
 
141
          else if (type == Gtk.MenuDirectionType.CHILD)
 
142
            {
 
143
              if (pos == this.indicator_entry_array.size - 1)
 
144
                next_object_entry_view = this.indicator_entry_array.get (0);
 
145
              else
 
146
                next_object_entry_view = this.indicator_entry_array.get (pos+1);
 
147
            }
 
148
        }
 
149
 
117
150
      next_object_entry_view.show_menu ();
118
151
      /* Signal to be picked up by IndicatorBar */
119
152
      //this.menu_moved (type);