[gnome-panel] panel: don't use org.gnome.nautilus.desktop schema



commit 4611348e7389a5aad0cab54059453ba1969e5924
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Feb 4 20:30:37 2018 +0200

    panel: don't use org.gnome.nautilus.desktop schema
    
    It was removed from Nautilus in 3.28.

 gnome-panel/panel-menu-items.c |   17 -----------------
 gnome-panel/panel-schemas.h    |    3 ---
 gnome-panel/panel-util.c       |   12 +-----------
 3 files changed, 1 insertions(+), 31 deletions(-)
---
diff --git a/gnome-panel/panel-menu-items.c b/gnome-panel/panel-menu-items.c
index 3901736..f9162e2 100644
--- a/gnome-panel/panel-menu-items.c
+++ b/gnome-panel/panel-menu-items.c
@@ -69,7 +69,6 @@ G_DEFINE_TYPE (PanelDesktopMenuItem, panel_desktop_menu_item, PANEL_TYPE_IMAGE_M
 
 struct _PanelPlaceMenuItemPrivate {
        GtkWidget   *menu;
-       GSettings   *settings;
 
        GtkRecentManager *recent_manager;
 
@@ -1138,12 +1137,6 @@ panel_place_menu_item_recreate_menu (GtkWidget *widget)
 }
 
 static void
-panel_place_menu_item_key_changed (GSettings *settings, const gchar *key, GtkWidget *place_item)
-{
-       panel_place_menu_item_recreate_menu (place_item);
-}
-
-static void
 panel_place_menu_item_gtk_bookmarks_changed (GFileMonitor *handle,
                                             GFile        *file,
                                             GFile        *other_file,
@@ -1203,8 +1196,6 @@ panel_place_menu_item_dispose (GObject *object)
 {
   PanelPlaceMenuItem *menuitem = (PanelPlaceMenuItem *) object;
 
-  g_clear_object (&menuitem->priv->settings);
-
   if (menuitem->priv->bookmarks_monitor != NULL)
     {
       g_file_monitor_cancel (menuitem->priv->bookmarks_monitor);
@@ -1268,17 +1259,9 @@ panel_place_menu_item_init (PanelPlaceMenuItem *menuitem)
        GFile *bookmark;
        char  *bookmarks_filename;
        GError *error;
-       GSettings *settings;
 
        menuitem->priv = PANEL_PLACE_MENU_ITEM_GET_PRIVATE (menuitem);
 
-       settings = g_settings_new (GNOME_NAUTILUS_DESKTOP_SCHEMA);
-
-       menuitem->priv->settings = settings;
-
-       g_signal_connect (settings, "changed::" GNOME_NAUTILUS_DESKTOP_HOME_ICON_NAME_KEY,
-                         G_CALLBACK (panel_place_menu_item_key_changed), menuitem);
-
        menuitem->priv->recent_manager = gtk_recent_manager_get_default ();
 
        bookmarks_filename = panel_gtk_get_bookmark_file ();
diff --git a/gnome-panel/panel-schemas.h b/gnome-panel/panel-schemas.h
index 47762a1..ffb7af6 100644
--- a/gnome-panel/panel-schemas.h
+++ b/gnome-panel/panel-schemas.h
@@ -67,9 +67,6 @@
 #define PANEL_MENU_BUTTON_CUSTOM_ICON_KEY "custom-icon"
 #define PANEL_MENU_BUTTON_MENU_PATH_KEY   "menu-path"
 
-#define GNOME_NAUTILUS_DESKTOP_SCHEMA             "org.gnome.nautilus.desktop"
-#define GNOME_NAUTILUS_DESKTOP_HOME_ICON_NAME_KEY "home-icon-name"
-
 #define GNOME_DESKTOP_WM_KEYBINDINGS_SCHEMA                    "org.gnome.desktop.wm.keybindings"
 #define GNOME_DESKTOP_WM_KEYBINDINGS_ACTIVATE_WINDOW_MENU_KEY  "activate-window-menu"
 #define GNOME_DESKTOP_WM_KEYBINDINGS_TOGGLE_MAXIMIZED_KEY      "toggle-maximized"
diff --git a/gnome-panel/panel-util.c b/gnome-panel/panel-util.c
index 3642777..70b1e6b 100644
--- a/gnome-panel/panel-util.c
+++ b/gnome-panel/panel-util.c
@@ -719,18 +719,8 @@ panel_util_get_file_display_for_common_files (GFile *file)
 
        compare = g_file_new_for_path (g_get_home_dir ());
        if (g_file_equal (file, compare)) {
-               GSettings *settings = g_settings_new (GNOME_NAUTILUS_DESKTOP_SCHEMA);
-               char *home_foler_name = g_settings_get_string (settings, 
GNOME_NAUTILUS_DESKTOP_HOME_ICON_NAME_KEY);
-
                g_object_unref (compare);
-               g_object_unref (settings);
-
-               if (PANEL_GLIB_STR_EMPTY (home_foler_name)) {
-                       g_free (home_foler_name);
-                       return g_strdup (_("Home Folder"));
-               } else {
-                       return home_foler_name;
-               }
+               return g_strdup (_("Home"));
        }
        g_object_unref (compare);
 


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