~nathwill-deactivatedaccount-deactivatedaccount/ubuntu/precise/unity/lp-972247

« back to all changes in this revision

Viewing changes to src/quicklauncher/quicklauncher-manager.vala

  • Committer: Gordon Allott
  • Date: 2009-12-18 11:42:37 UTC
  • mfrom: (44.1.8 unity.instrumented)
  • Revision ID: mail@gordallott.com-20091218114237-iol6shag1dh3ruvz
Adds instrumentation and bootcharting support to unity

Instrumentation is enabled by passing --enable-testing to configure and
logging is enabled by passing --enable-boot-logging=foobar.log to unity.

you can then process the log file with ./tools/makebootchart.py --input=foobar.log --output=foobar.svg

instrumenting the code is enabled by decorating a function with START_FUNCTION (); and END_FUNCTION (); or by decorating a smaller process with LOGGING_START_PROCESS (process_name); and LOGGING_END_PROCESS (process_name);

all process names *must* be unique thoughout the system

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
    construct 
34
34
    {
 
35
      START_FUNCTION ();
35
36
      this.appman = Launcher.Appman.get_default ();
36
37
      this.session = Launcher.Session.get_default ();
37
38
      
49
50
      this.container.drag_motion.connect (on_drag_motion);
50
51
      this.container.drag_drop.connect (on_drag_drop);
51
52
      this.container.drag_data_received.connect (on_drag_data_received);
 
53
      
 
54
      END_FUNCTION ();
52
55
    }
53
56
    
54
57
    private bool on_drag_motion (Ctk.Actor actor, Gdk.DragContext context, 
166
169
 
167
170
    private void build_favorites () 
168
171
    {
 
172
      START_FUNCTION ();
169
173
      var favorites = Launcher.Favorites.get_default ();
170
174
      
171
175
      unowned SList<string> favorite_list = favorites.get_favorites();
172
176
      foreach (weak string uid in favorite_list)
173
177
        {
174
 
          
 
178
          LOGGER_START_PROCESS ("favorite-" + uid);
175
179
          // we only want favorite *applications* for the moment 
176
180
          var type = favorites.get_string(uid, "type");
177
181
          if (type != "application")
188
192
          
189
193
              add_view (view);
190
194
            }
 
195
          
 
196
          LOGGER_END_PROCESS ("favorite-" + uid);
191
197
        }
 
198
      
 
199
      END_FUNCTION ();
192
200
    }
193
201
 
194
202
 
195
203
   private void handle_session_application (Launcher.Application app) 
196
204
    { 
197
 
      
198
 
 
199
205
      bool app_is_visible = false;
200
206
      
201
207
      unowned GLib.SList<Wnck.Application> wnckapps = app.get_wnckapps ();