[gedit] MacOS: remove "max-recents" gsetting



commit 36f727480d185e07e8cf338a405ae564f43a8ddb
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Dec 2 11:05:46 2019 +0100

    MacOS: remove "max-recents" gsetting
    
    That GSettings key was used only in
    gedit_recent_configuration_init_default(), and that function is now used
    only for Mac OS.
    
    I don't think it makes sense to be able to change that configuration.

 data/org.gnome.gedit.gschema.xml.in |  5 -----
 gedit/gedit-recent.c                | 12 +-----------
 gedit/gedit-settings.h              |  1 -
 3 files changed, 1 insertion(+), 17 deletions(-)
---
diff --git a/data/org.gnome.gedit.gschema.xml.in b/data/org.gnome.gedit.gschema.xml.in
index 1eb2140f9..f7b0f670c 100644
--- a/data/org.gnome.gedit.gschema.xml.in
+++ b/data/org.gnome.gedit.gschema.xml.in
@@ -182,11 +182,6 @@
     <key name="bottom-panel-visible" type="b">
       <default>false</default>
     </key>
-    <key name="max-recents" type="u">
-      <default>5</default>
-      <summary>Maximum Recent Files</summary>
-      <description>Specifies the maximum number of recently opened files that will be displayed in the 
“Recent Files” submenu.</description>
-    </key>
   </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.gedit.preferences.print" 
path="/org/gnome/gedit/preferences/print/">
     <key name="print-syntax-highlighting" type="b">
diff --git a/gedit/gedit-recent.c b/gedit/gedit-recent.c
index 6e77e25af..9cf593778 100644
--- a/gedit/gedit-recent.c
+++ b/gedit/gedit-recent.c
@@ -160,8 +160,6 @@ populate_filter_info (GtkRecentInfo        *info,
 void
 gedit_recent_configuration_init_default (GeditRecentConfiguration *config)
 {
-       GSettings *settings;
-
        config->manager = gtk_recent_manager_get_default ();
 
        if (config->filter != NULL)
@@ -174,15 +172,7 @@ gedit_recent_configuration_init_default (GeditRecentConfiguration *config)
        gtk_recent_filter_add_mime_type (config->filter, "text/plain");
        g_object_ref_sink (config->filter);
 
-       settings = g_settings_new ("org.gnome.gedit.preferences.ui");
-
-       g_settings_get (settings,
-                       GEDIT_SETTINGS_MAX_RECENTS,
-                       "u",
-                       &config->limit);
-
-       g_object_unref (settings);
-
+       config->limit = 5;
        config->show_not_found = TRUE;
        config->show_private = FALSE;
        config->local_only = FALSE;
diff --git a/gedit/gedit-settings.h b/gedit/gedit-settings.h
index 879963965..33885d99f 100644
--- a/gedit/gedit-settings.h
+++ b/gedit/gedit-settings.h
@@ -76,7 +76,6 @@ void                   gedit_settings_set_list                        (GSettings     
*settings,
 #define GEDIT_SETTINGS_STATUSBAR_VISIBLE               "statusbar-visible"
 #define GEDIT_SETTINGS_SIDE_PANEL_VISIBLE              "side-panel-visible"
 #define GEDIT_SETTINGS_BOTTOM_PANEL_VISIBLE            "bottom-panel-visible"
-#define GEDIT_SETTINGS_MAX_RECENTS                     "max-recents"
 #define GEDIT_SETTINGS_PRINT_SYNTAX_HIGHLIGHTING       "print-syntax-highlighting"
 #define GEDIT_SETTINGS_PRINT_HEADER                    "print-header"
 #define GEDIT_SETTINGS_PRINT_WRAP_MODE                 "print-wrap-mode"


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