forked from AuroraMiddleware/gtk
settings: add a gtk-recent-files-enabled GtkSetting
Backed by an XSetting, so g-s-d can set it according to the GSettings value. https://bugzilla.gnome.org/show_bug.cgi?id=693724
This commit is contained in:
parent
ff2a387154
commit
c896adc9e9
@ -75,7 +75,8 @@ static const struct {
|
|||||||
{"Gtk/ShellShowsAppMenu", "gtk-shell-shows-app-menu"},
|
{"Gtk/ShellShowsAppMenu", "gtk-shell-shows-app-menu"},
|
||||||
{"Gtk/ShellShowsMenubar", "gtk-shell-shows-menubar"},
|
{"Gtk/ShellShowsMenubar", "gtk-shell-shows-menubar"},
|
||||||
{"Gtk/EnablePrimaryPaste", "gtk-enable-primary-paste"},
|
{"Gtk/EnablePrimaryPaste", "gtk-enable-primary-paste"},
|
||||||
{"Gtk/RecentFilesMaxAge", "gtk-recent-files-max-age"}
|
{"Gtk/RecentFilesMaxAge", "gtk-recent-files-max-age"},
|
||||||
|
{"Gtk/RecentFilesEnabled", "gtk-recent-files-enabled"}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
@ -211,7 +211,8 @@ enum {
|
|||||||
PROP_IM_STATUS_STYLE,
|
PROP_IM_STATUS_STYLE,
|
||||||
PROP_SHELL_SHOWS_APP_MENU,
|
PROP_SHELL_SHOWS_APP_MENU,
|
||||||
PROP_SHELL_SHOWS_MENUBAR,
|
PROP_SHELL_SHOWS_MENUBAR,
|
||||||
PROP_ENABLE_PRIMARY_PASTE
|
PROP_ENABLE_PRIMARY_PASTE,
|
||||||
|
PROP_RECENT_FILES_ENABLED
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --- prototypes --- */
|
/* --- prototypes --- */
|
||||||
@ -1406,6 +1407,23 @@ gtk_settings_class_init (GtkSettingsClass *class)
|
|||||||
NULL);
|
NULL);
|
||||||
g_assert (result == PROP_ENABLE_PRIMARY_PASTE);
|
g_assert (result == PROP_ENABLE_PRIMARY_PASTE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSettings:gtk-recent-files-enabled:
|
||||||
|
*
|
||||||
|
* Whether GTK+ should keep track of items inside the recently used
|
||||||
|
* resources list. If set to %FALSE, the list will always be empty.
|
||||||
|
*
|
||||||
|
* Since: 3.8
|
||||||
|
*/
|
||||||
|
result = settings_install_property_parser (class,
|
||||||
|
g_param_spec_boolean ("gtk-recent-files-enabled",
|
||||||
|
P_("Recent Files Enabled"),
|
||||||
|
P_("Whether GTK+ remembers recent files"),
|
||||||
|
TRUE,
|
||||||
|
GTK_PARAM_READWRITE),
|
||||||
|
NULL);
|
||||||
|
g_assert (result == PROP_RECENT_FILES_ENABLED);
|
||||||
|
|
||||||
g_type_class_add_private (class, sizeof (GtkSettingsPrivate));
|
g_type_class_add_private (class, sizeof (GtkSettingsPrivate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user