[gnome-software] Add YaST as a default folder in gnome-shell overview



commit 9c243cfa031c5fd7e287a14c3ad65cedc24be428
Author: Dominique Leuenberger <dimstar opensuse org>
Date:   Fri Feb 17 13:18:40 2017 +0100

    Add YaST as a default folder in gnome-shell overview
    
    YaST installs quite some .desktop files, as each admin module can be
    launched directly or from the YaST main application.
    
    In gnome-shell, All application view, this clutters the view. In this
    case it is welcome to collect all the YaST modules inside a folder to
    declutter the setup.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770638

 src/gs-folders.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-folders.c b/src/gs-folders.c
index 7c6f6ca..703650d 100644
--- a/src/gs-folders.c
+++ b/src/gs-folders.c
@@ -551,6 +551,7 @@ gs_folders_convert (void)
                const gchar * const children[] = {
                        "Utilities",
                        "Sundry",
+                       "YaST",
                        NULL
                };
                const gchar * const utilities_categories[] = {
@@ -620,6 +621,11 @@ gs_folders_convert (void)
                        "vino-preferences.desktop",
                        NULL
                };
+               const gchar * const yast_categories[] = {
+                       "X-SuSE-YaST",
+                       NULL
+               };
+
                gchar *path;
                gchar *child_path;
                GSettings *child;
@@ -636,7 +642,7 @@ gs_folders_convert (void)
 
                g_object_unref (child);
                g_free (child_path);
-               
+
                child_path = g_strconcat (path, "folders/Sundry/", NULL);
                child = g_settings_new_with_path (APP_FOLDER_CHILD_SCHEMA, child_path);
                g_settings_set_string (child, "name", "X-GNOME-Sundry.directory");
@@ -646,6 +652,15 @@ gs_folders_convert (void)
 
                g_object_unref (child);
                g_free (child_path);
+
+               child_path = g_strconcat (path, "folders/YaST/", NULL);
+               child = g_settings_new_with_path (APP_FOLDER_CHILD_SCHEMA, child_path);
+               g_settings_set_string (child, "name", "suse-yast.directory");
+               g_settings_set_boolean (child, "translate", TRUE);
+               g_settings_set_strv (child, "categories", yast_categories);
+
+               g_object_unref (child);
+               g_free (child_path);
                
        }
 }


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