~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/PlaceEntryRemote.cpp

Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
  _groups_model (NULL),
56
56
  _results_model (NULL),
57
57
  _global_results_model (NULL),
 
58
  _global_groups_model (NULL),
58
59
  _previous_search (NULL),
59
60
  _previous_section (G_MAXUINT32)
60
61
{
76
77
  g_object_unref (_groups_model);
77
78
  g_object_unref (_results_model);
78
79
  g_object_unref (_global_results_model);
 
80
  g_object_unref (_global_groups_model);
79
81
}
80
82
 
81
83
void
331
333
  return _global_results_model;
332
334
}
333
335
 
 
336
DeeModel *
 
337
PlaceEntryRemote::GetGlobalGroupsModel ()
 
338
{
 
339
  return _global_groups_model;
 
340
}
 
341
 
334
342
/* Other methods */
335
343
bool
336
344
PlaceEntryRemote::IsValid ()
379
387
    _state_changed = true;
380
388
  }
381
389
  
382
 
  if (g_strcmp0 (_icon, icon) != 0)
 
390
  if (g_strcmp0 ("", icon) != 0 && g_strcmp0 (_icon, icon) != 0)
383
391
  {
384
392
    g_free (_icon);
385
393
    _icon = g_strdup (icon);
449
457
  // FIXME: Spec says if global_renderer == "", then ShowInGlobal () == false, but currently
450
458
  //        both places return ""
451
459
 
452
 
  // FIXME: Handle global groups model name
 
460
  if (!DEE_IS_SHARED_MODEL (_global_groups_model) ||
 
461
      g_strcmp0 (dee_shared_model_get_swarm_name (DEE_SHARED_MODEL (_global_groups_model)), global_groups_model) != 0)
 
462
  {
 
463
    if (DEE_IS_SHARED_MODEL (_global_groups_model))
 
464
      g_object_unref (_global_groups_model);
 
465
 
 
466
    _global_groups_model = dee_shared_model_new (global_groups_model);
 
467
    dee_model_set_schema (_global_groups_model, "s", "s", "s", NULL);
 
468
 
 
469
    _global_renderer_changed = true;
 
470
  }
453
471
 
454
472
  if (!DEE_IS_SHARED_MODEL (_global_results_model) ||
455
473
      g_strcmp0 (dee_shared_model_get_swarm_name (DEE_SHARED_MODEL (_global_results_model)), global_results_model) != 0)