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

« back to all changes in this revision

Viewing changes to src/LauncherIcon.cpp

This branch add the capability of setting hard coded keybindings to the
workspace
switcher and the Trash.
In addition, each place entry can specify a shortcut in its place file like:
Shortcut=a
in the [Entry:xxx] section

In addition, there are some fixes to be able to navigate by key navigation (or
activate the shortcuts) for the special switchers: ws, places, devices and
trash.

Fixes:
Bug #617356: Super-shortcuts for apps, files, and workspace switcher    Medium
Triaged
Bug #723141: key navigation doesn't activate trash, keys, expo or places    High
In Progress

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  _tooltip = new nux::Tooltip ();
71
71
  _icon_type = TYPE_NONE;
72
72
  _sort_priority = 0;
 
73
  _shortcut = 0;
73
74
  
74
75
  _emblem = 0;
75
76
 
319
320
}
320
321
 
321
322
void
 
323
LauncherIcon::SetShortcut (guint64 shortcut)
 
324
{
 
325
  // only relocate a digit with a digit (don't overwrite other shortcuts)
 
326
  if ((!_shortcut || (g_ascii_isdigit ((gchar)_shortcut)))
 
327
        || !(g_ascii_isdigit ((gchar) shortcut)))
 
328
    _shortcut = shortcut;
 
329
}
 
330
 
 
331
guint64
 
332
LauncherIcon::GetShortcut ()
 
333
{
 
334
    return _shortcut;
 
335
}
 
336
 
 
337
void
322
338
LauncherIcon::RecvMouseEnter ()
323
339
{
324
340
  if (QuicklistManager::Default ()->Current ())