~mrazik/unity/remove-duplicate-testcase

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/Launcher.cpp

  • Committer: Tarmac
  • Author(s): Thomi Richards
  • Date: 2012-03-18 23:29:42 UTC
  • mfrom: (2119.3.1 fix-cstr-calls)
  • Revision ID: tarmac-20120318232942-vhzd0nuzahrwrtuo
Remove calls to c_str() where they're not needed.. Fixes: . Approved by Tim Penhey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
  bg_effect_helper_.enabled = false;
288
288
 
289
289
  TextureCache& cache = TextureCache::GetDefault();
290
 
  TextureCache::CreateTextureCallback cb = [&](std::string const& name, int width, int height) -> nux::BaseTexture* { 
 
290
  TextureCache::CreateTextureCallback cb = [&](std::string const& name, int width, int height) -> nux::BaseTexture* {
291
291
    return nux::CreateTexture2DFromFile((PKGDATADIR"/" + name + ".png").c_str(), -1, true);
292
292
  };
293
293
 
408
408
  .add("height", abs_geo.height)
409
409
  .add("monitor", monitor())
410
410
  .add("quicklist-open", _hide_machine->GetQuirk(LauncherHideMachine::QUICKLIST_OPEN))
411
 
  .add("hide-quirks", _hide_machine->DebugHideQuirks().c_str())
412
 
  .add("hover-quirks", _hover_machine->DebugHoverQuirks().c_str())
 
411
  .add("hide-quirks", _hide_machine->DebugHideQuirks())
 
412
  .add("hover-quirks", _hover_machine->DebugHoverQuirks())
413
413
  .add("icon-size", _icon_size)
414
414
  .add("shortcuts_shown", _shortcuts_shown);
415
415
}
1054
1054
  // FIXME: this is a hack, we should have a look why SetAnimationTarget is necessary in SetAnimationTarget
1055
1055
  // we should ideally just need it at start to set the target
1056
1056
  if (!_initial_drag_animation && icon == _drag_icon && _drag_window && _drag_window->Animating())
1057
 
    _drag_window->SetAnimationTarget((int)(_drag_icon->GetCenter(monitor).x), 
 
1057
    _drag_window->SetAnimationTarget((int)(_drag_icon->GetCenter(monitor).x),
1058
1058
                                     (int)(_drag_icon->GetCenter(monitor).y));
1059
1059
 
1060
1060
  center.y += (half_size * size_modifier) + spacing;   // move to end
1554
1554
    float overcome_responsiveness_mult = ((options()->edge_responsiveness() - 1) * 1.0f) + 1;
1555
1555
    decaymulator_->rate_of_decay = options()->edge_decay_rate() * decay_responsiveness_mult;
1556
1556
    _edge_overcome_pressure = options()->edge_overcome_pressure() * overcome_responsiveness_mult;
1557
 
    
 
1557
 
1558
1558
    _pointer_barrier->threshold = options()->edge_stop_velocity();
1559
1559
    _pointer_barrier->max_velocity_multiplier = options()->edge_responsiveness();
1560
1560
    _pointer_barrier->ConstructBarrier();
1561
 
    
 
1561
 
1562
1562
    _hide_machine->reveal_pressure = options()->edge_reveal_pressure() * reveal_responsiveness_mult;
1563
1563
    _hide_machine->edge_decay_rate = options()->edge_decay_rate() * decay_responsiveness_mult;
1564
1564
  }
2043
2043
{
2044
2044
  nux::Geometry geo = GetAbsoluteGeometry();
2045
2045
  AbstractLauncherIcon::Ptr drag_icon = MouseIconIntersection((int)(GetGeometry().width / 2.0f), y);
2046
 
  
 
2046
 
2047
2047
  x += geo.x;
2048
2048
  y += geo.y;
2049
2049
 
2119
2119
    {
2120
2120
      _model->Save();
2121
2121
 
2122
 
      _drag_window->SetAnimationTarget((int)(_drag_icon->GetCenter(monitor).x), 
 
2122
      _drag_window->SetAnimationTarget((int)(_drag_icon->GetCenter(monitor).x),
2123
2123
                                       (int)(_drag_icon->GetCenter(monitor).y));
2124
2124
      _drag_window->StartAnimation();
2125
2125
 
2333
2333
    Window root_return, child_return;
2334
2334
    Display *dpy = nux::GetGraphicsDisplay()->GetX11Display();
2335
2335
 
2336
 
    if (XQueryPointer (dpy, DefaultRootWindow(dpy), &root_return, &child_return, &root_x_return, 
 
2336
    if (XQueryPointer (dpy, DefaultRootWindow(dpy), &root_return, &child_return, &root_x_return,
2337
2337
                       &root_y_return, &win_x_return, &win_y_return, &mask_return))
2338
2338
    {
2339
2339
      if (mask_return & (Button1Mask | Button3Mask))