[gedit] GeditSettings: add peek_file_chooser_state_settings()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] GeditSettings: add peek_file_chooser_state_settings()
- Date: Sun, 7 Jun 2020 02:07:23 +0000 (UTC)
commit 5d94d6af4503a5558b212605f8978e64a9189ce1
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Jun 7 01:05:54 2020 +0200
GeditSettings: add peek_file_chooser_state_settings()
gedit/gedit-settings.c | 11 +++++++++++
gedit/gedit-settings.h | 13 ++++++++-----
2 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/gedit/gedit-settings.c b/gedit/gedit-settings.c
index d01405fbc..5083e1ecb 100644
--- a/gedit/gedit-settings.c
+++ b/gedit/gedit-settings.c
@@ -36,6 +36,7 @@ struct _GeditSettings
GSettings *settings_interface;
GSettings *settings_editor;
GSettings *settings_ui;
+ GSettings *settings_file_chooser_state;
};
/* GeditSettings is a singleton. */
@@ -51,6 +52,7 @@ gedit_settings_dispose (GObject *object)
g_clear_object (&self->settings_interface);
g_clear_object (&self->settings_editor);
g_clear_object (&self->settings_ui);
+ g_clear_object (&self->settings_file_chooser_state);
G_OBJECT_CLASS (gedit_settings_parent_class)->dispose (object);
}
@@ -249,6 +251,7 @@ gedit_settings_init (GeditSettings *self)
{
self->settings_editor = g_settings_new ("org.gnome.gedit.preferences.editor");
self->settings_ui = g_settings_new ("org.gnome.gedit.preferences.ui");
+ self->settings_file_chooser_state = g_settings_new ("org.gnome.gedit.state.file-chooser");
self->settings_interface = g_settings_new ("org.gnome.desktop.interface");
@@ -318,6 +321,14 @@ _gedit_settings_peek_editor_settings (GeditSettings *self)
return self->settings_editor;
}
+GSettings *
+_gedit_settings_peek_file_chooser_state_settings (GeditSettings *self)
+{
+ g_return_val_if_fail (GEDIT_IS_SETTINGS (self), NULL);
+
+ return self->settings_file_chooser_state;
+}
+
gchar *
gedit_settings_get_system_font (GeditSettings *self)
{
diff --git a/gedit/gedit-settings.h b/gedit/gedit-settings.h
index 204b54103..82a885319 100644
--- a/gedit/gedit-settings.h
+++ b/gedit/gedit-settings.h
@@ -33,16 +33,19 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GeditSettings, gedit_settings, GEDIT, SETTINGS, GObject)
G_GNUC_INTERNAL
-GeditSettings * _gedit_settings_get_singleton (void);
+GeditSettings * _gedit_settings_get_singleton (void);
-void gedit_settings_unref_singleton (void);
+void gedit_settings_unref_singleton (void);
G_GNUC_INTERNAL
-GSettings * _gedit_settings_peek_editor_settings (GeditSettings *self);
+GSettings * _gedit_settings_peek_editor_settings (GeditSettings *self);
-gchar * gedit_settings_get_system_font (GeditSettings *self);
+G_GNUC_INTERNAL
+GSettings * _gedit_settings_peek_file_chooser_state_settings (GeditSettings *self);
+
+gchar * gedit_settings_get_system_font (GeditSettings *self);
-GSList * gedit_settings_get_candidate_encodings (gboolean *default_candidates);
+GSList * gedit_settings_get_candidate_encodings (gboolean *default_candidates);
/* key constants */
#define GEDIT_SETTINGS_USE_DEFAULT_FONT "use-default-font"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]