~3v1n0/unity/overlay-border-scale

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/unity-switcher-accessible.cpp

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
static gboolean   unity_switcher_accessible_check_pending_notification(NuxAreaAccessible* self);
65
65
 
66
66
/* private */
67
 
static void       on_selection_changed_cb(AbstractLauncherIcon* icon,
 
67
static void       on_selection_changed_cb(AbstractLauncherIcon::Ptr icon,
68
68
                                          UnitySwitcherAccessible* switcher_accessible);
69
69
static void       create_children(UnitySwitcherAccessible* self);
70
70
 
311
311
{
312
312
  SwitcherView* switcher = NULL;
313
313
  SwitcherModel::Ptr switcher_model;
314
 
  AbstractLauncherIcon* selected_icon = NULL;
 
314
  AbstractLauncherIcon::Ptr selected_icon;
315
315
  nux::Object* nux_object = NULL;
316
316
 
317
317
  g_return_val_if_fail(UNITY_IS_SWITCHER_ACCESSIBLE(selection), 0);
325
325
 
326
326
  selected_icon = switcher_model->Selection();
327
327
 
328
 
  if (selected_icon == 0)
 
328
  if (!selected_icon)
329
329
    return 0;
330
330
  else
331
331
    return 1;
377
377
 
378
378
/* private */
379
379
static void
380
 
on_selection_changed_cb(AbstractLauncherIcon* icon,
 
380
on_selection_changed_cb(AbstractLauncherIcon::Ptr icon,
381
381
                        UnitySwitcherAccessible* switcher_accessible)
382
382
{
383
383
  g_signal_emit_by_name(ATK_OBJECT(switcher_accessible), "selection-changed");
391
391
  SwitcherView* switcher = NULL;
392
392
  SwitcherModel::Ptr switcher_model;
393
393
  SwitcherModel::iterator it;
394
 
  LauncherIcon* child = NULL;
 
394
  AbstractLauncherIcon::Ptr child;
395
395
  AtkObject* child_accessible = NULL;
396
396
 
397
397
  nux_object = nux_object_accessible_get_object(NUX_OBJECT_ACCESSIBLE(self));
406
406
 
407
407
  for (it = switcher_model->begin(); it != switcher_model->end(); it++)
408
408
  {
409
 
    child =  dynamic_cast<LauncherIcon*>(*it);
410
 
    child_accessible = unity_launcher_icon_accessible_new(child);
 
409
    child = *it;
 
410
    child_accessible = unity_launcher_icon_accessible_new(child.GetPointer());
411
411
    atk_object_set_parent(child_accessible, ATK_OBJECT(self));
412
412
    self->priv->children = g_slist_append(self->priv->children,
413
413
                                          child_accessible);