← Back to team overview

desktop-packages team mailing list archive

[Bug 1409030] [NEW] Accelerator text not displayed in menu item

 

Public bug reported:

This code works properly:

  Glib::RefPtr<Gio::MenuItem> item = Gio::MenuItem::create("_Copy", "win.copy");
  item->set_attribute_value("accel", Glib::Variant<Glib::ustring>::create("<Primary>c"));
  submenu_edit->append_item(item); 

But set_attribute_value() is threatened with deprecation. The replacement function 
does not work properly:

  Glib::RefPtr<Gio::MenuItem> item = Gio::MenuItem::create("_Copy", "win.copy");
  set_accel_for_action("win.copy", "<Primary>c");
  submenu_edit->append_item(item);

The accelerator still works, but the "Ctrl+c" text is not displayed in
the menu item.

Both versions of the code work properly in Gnome.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: unity 7.3.1+14.10.20141016-0ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-28.38-generic 3.16.7-ckt1
Uname: Linux 3.16.0-28-generic x86_64
.tmp.unity.support.test.0:
 
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity
Date: Fri Jan  9 06:32:23 2015
DistUpgraded: Fresh install
DistroCodename: utopic
DistroVariant: ubuntu
DkmsStatus:
 virtualbox, 4.3.18, 3.16.0-25-generic, x86_64: installed
 virtualbox, 4.3.18, 3.16.0-28-generic, x86_64: installed
 virtualbox-guest, 4.3.18, 3.16.0-25-generic, x86_64: installed
 virtualbox-guest, 4.3.18, 3.16.0-28-generic, x86_64: installed
GraphicsCard:
 Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: CLEVO/KAPOK Computer Device [1558:0240]
InstallationDate: Installed on 2014-11-11 (58 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
MachineType: System76, Inc. Pangolin Performance
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-28-generic root=UUID=6fb59d06-ec00-44f4-abcc-0da0f018be93 ro acpi_os_name=Linux acpi_osi= quiet splash vt.handoff=7
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/25/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 4.6.5
dmi.board.asset.tag: Tag 12345
dmi.board.name: Pangolin Performance
dmi.board.vendor: System76, Inc.
dmi.board.version: panp9
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: No Enclosure
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4.6.5:bd06/25/2012:svnSystem76,Inc.:pnPangolinPerformance:pvrpanp9:rvnSystem76,Inc.:rnPangolinPerformance:rvrpanp9:cvnNoEnclosure:ct10:cvrN/A:
dmi.product.name: Pangolin Performance
dmi.product.version: panp9
dmi.sys.vendor: System76, Inc.
version.compiz: compiz 1:0.9.12+14.10.20140918-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.56-1
version.libgl1-mesa-dri: libgl1-mesa-dri 10.3.0-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 10.3.0-0ubuntu3
version.xserver-xorg-core: xserver-xorg-core 2:1.16.0-1ubuntu1.2
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.9.0-1ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.4.0-2ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.914-1~exp1ubuntu4.1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.11-1ubuntu2
xserver.bootTime: Wed Jan  7 13:23:17 2015
xserver.configfile: default
xserver.errors:
 
xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:
 product id                                 826 
 vendor                                     LGD
xserver.version: 2:1.16.0-1ubuntu1.2

** Affects: unity (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug compiz-0.9 ubuntu utopic

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity in Ubuntu.
Matching subscriptions: dp-unity
https://bugs.launchpad.net/bugs/1409030

Title:
  Accelerator text not displayed in menu item

Status in unity package in Ubuntu:
  New

Bug description:
  This code works properly:

    Glib::RefPtr<Gio::MenuItem> item = Gio::MenuItem::create("_Copy", "win.copy");
    item->set_attribute_value("accel", Glib::Variant<Glib::ustring>::create("<Primary>c"));
    submenu_edit->append_item(item); 

  But set_attribute_value() is threatened with deprecation. The replacement function 
  does not work properly:

    Glib::RefPtr<Gio::MenuItem> item = Gio::MenuItem::create("_Copy", "win.copy");
    set_accel_for_action("win.copy", "<Primary>c");
    submenu_edit->append_item(item);

  The accelerator still works, but the "Ctrl+c" text is not displayed in
  the menu item.

  Both versions of the code work properly in Gnome.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.10
  Package: unity 7.3.1+14.10.20141016-0ubuntu1
  ProcVersionSignature: Ubuntu 3.16.0-28.38-generic 3.16.7-ckt1
  Uname: Linux 3.16.0-28-generic x86_64
  .tmp.unity.support.test.0:
   
  ApportVersion: 2.14.7-0ubuntu8
  Architecture: amd64
  CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
  CompositorRunning: compiz
  CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
  CompositorUnredirectFSW: true
  CurrentDesktop: Unity
  Date: Fri Jan  9 06:32:23 2015
  DistUpgraded: Fresh install
  DistroCodename: utopic
  DistroVariant: ubuntu
  DkmsStatus:
   virtualbox, 4.3.18, 3.16.0-25-generic, x86_64: installed
   virtualbox, 4.3.18, 3.16.0-28-generic, x86_64: installed
   virtualbox-guest, 4.3.18, 3.16.0-25-generic, x86_64: installed
   virtualbox-guest, 4.3.18, 3.16.0-28-generic, x86_64: installed
  GraphicsCard:
   Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
     Subsystem: CLEVO/KAPOK Computer Device [1558:0240]
  InstallationDate: Installed on 2014-11-11 (58 days ago)
  InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
  MachineType: System76, Inc. Pangolin Performance
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-28-generic root=UUID=6fb59d06-ec00-44f4-abcc-0da0f018be93 ro acpi_os_name=Linux acpi_osi= quiet splash vt.handoff=7
  SourcePackage: unity
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 06/25/2012
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: 4.6.5
  dmi.board.asset.tag: Tag 12345
  dmi.board.name: Pangolin Performance
  dmi.board.vendor: System76, Inc.
  dmi.board.version: panp9
  dmi.chassis.asset.tag: No Asset Tag
  dmi.chassis.type: 10
  dmi.chassis.vendor: No Enclosure
  dmi.chassis.version: N/A
  dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr4.6.5:bd06/25/2012:svnSystem76,Inc.:pnPangolinPerformance:pvrpanp9:rvnSystem76,Inc.:rnPangolinPerformance:rvrpanp9:cvnNoEnclosure:ct10:cvrN/A:
  dmi.product.name: Pangolin Performance
  dmi.product.version: panp9
  dmi.sys.vendor: System76, Inc.
  version.compiz: compiz 1:0.9.12+14.10.20140918-0ubuntu1
  version.ia32-libs: ia32-libs N/A
  version.libdrm2: libdrm2 2.4.56-1
  version.libgl1-mesa-dri: libgl1-mesa-dri 10.3.0-0ubuntu3
  version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
  version.libgl1-mesa-glx: libgl1-mesa-glx 10.3.0-0ubuntu3
  version.xserver-xorg-core: xserver-xorg-core 2:1.16.0-1ubuntu1.2
  version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.9.0-1ubuntu2
  version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.4.0-2ubuntu2
  version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.914-1~exp1ubuntu4.1
  version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.11-1ubuntu2
  xserver.bootTime: Wed Jan  7 13:23:17 2015
  xserver.configfile: default
  xserver.errors:
   
  xserver.logfile: /var/log/Xorg.0.log
  xserver.outputs:
   product id                                 826 
   vendor                                     LGD
  xserver.version: 2:1.16.0-1ubuntu1.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1409030/+subscriptions


Follow ups

References