[gnome-tweak-tool] Display list of shell extensions sorted by name



commit 5dce29ca24f20d05ee2e66e7e7f2a36bad492b2c
Author: Thomas Leberbauer <slosd freedig org>
Date:   Tue Mar 5 00:53:28 2013 +0100

    Display list of shell extensions sorted by name
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695170

 gtweak/tweaks/tweak_shell_extensions.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_shell_extensions.py b/gtweak/tweaks/tweak_shell_extensions.py
index 3d07ce7..7b6d1f2 100644
--- a/gtweak/tweaks/tweak_shell_extensions.py
+++ b/gtweak/tweaks/tweak_shell_extensions.py
@@ -7,6 +7,7 @@ import json
 from gi.repository import Gtk
 from gi.repository import GLib
 
+from operator import itemgetter
 from gtweak.utils import extract_zip_file, execute_subprocess
 from gtweak.gshellwrapper import GnomeShell, GnomeShellFactory
 from gtweak.tweakmodel import Tweak, TweakGroup
@@ -177,7 +178,8 @@ class ShellExtensionTweakGroup(TweakGroup):
 
             try:
                 #add a tweak for each installed extension
-                for extension in shell.list_extensions().values():
+                extensions = sorted(shell.list_extensions().values(), key=itemgetter("name"))
+                for extension in extensions:
                     try:
                         extension_tweaks.append(
                             _ShellExtensionTweak(shell, extension, size_group=sg))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]