[gnome-tweak-tool] Show the XKB option group description instead of ID as tweak summary
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Show the XKB option group description instead of ID as tweak summary
- Date: Sun, 2 Dec 2012 18:52:50 +0000 (UTC)
commit fe467c625269ef113d7c4412aae0a116cabfd2d1
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Sep 25 20:00:58 2012 +0200
Show the XKB option group description instead of ID as tweak summary
https://bugzilla.gnome.org/show_bug.cgi?id=678171
gtweak/tweaks/tweak_typing.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_typing.py b/gtweak/tweaks/tweak_typing.py
index cdd3661..799c7d7 100644
--- a/gtweak/tweaks/tweak_typing.py
+++ b/gtweak/tweaks/tweak_typing.py
@@ -27,7 +27,11 @@ from gtweak.gsettings import GSettingsSetting, GSettingsMissingError, GSettingsF
class _XkbOption(Tweak):
def __init__(self, group_id, parent_settings, xkb_info, **options):
- Tweak.__init__(self, group_id, "", **options) # FIXME: should be the id's description
+ try:
+ desc = xkb_info.description_for_group(group_id)
+ except AttributeError:
+ desc = group_id
+ Tweak.__init__(self, desc, desc, **options)
self._group_id = group_id
self._parent_settings = parent_settings
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]