[file-roller: 1/3] Remember If Showing Other Options
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 1/3] Remember If Showing Other Options
- Date: Tue, 6 Apr 2021 17:16:26 +0000 (UTC)
commit cfe2ec75a9aed5f8813f0e34af27a342a0e1d587
Author: programmer-ceds <programmer_ceds yahoo co uk>
Date: Mon Jan 4 15:56:18 2021 +0000
Remember If Showing Other Options
data/org.gnome.FileRoller.gschema.xml | 10 ++++++++++
src/fr-new-archive-dialog.c | 4 +++-
src/preferences.h | 1 +
3 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/data/org.gnome.FileRoller.gschema.xml b/data/org.gnome.FileRoller.gschema.xml
index 385d1bd5..2cc4c7d0 100644
--- a/data/org.gnome.FileRoller.gschema.xml
+++ b/data/org.gnome.FileRoller.gschema.xml
@@ -140,6 +140,11 @@
<summary>Encrypt the archive header</summary>
<description>Whether to encrypt the archive header. If the header is encrypted the password will be
required to list the archive content as well.</description>
</key>
+ <key name="expand-options" type="b">
+ <default>false</default>
+ <summary>Show/hide the extra options</summary>
+ <description>Whether to show other options. If set the extra options will be shown.</description>
+ </key>
</schema>
<schema id="org.gnome.FileRoller.Dialogs" path="/org/gnome/file-roller/dialogs/">
@@ -172,6 +177,11 @@
<summary>Encrypt the archive header</summary>
<description>Whether to encrypt the archive header. If the header is encrypted the password will be
required to list the archive content as well.</description>
</key>
+ <key name="expand-options" type="b">
+ <default>false</default>
+ <summary>Show/hide the extra options</summary>
+ <description>Whether to show other options. If set the extra options will be shown.</description>
+ </key>
<key name="volume-size" type="i">
<default>0</default>
<summary>Default volume size</summary>
diff --git a/src/fr-new-archive-dialog.c b/src/fr-new-archive-dialog.c
index 11918163..a2139c86 100644
--- a/src/fr-new-archive-dialog.c
+++ b/src/fr-new-archive-dialog.c
@@ -87,6 +87,7 @@ fr_new_archive_dialog_unmap (GtkWidget *widget)
self = FR_NEW_ARCHIVE_DIALOG (widget);
g_settings_set_boolean (self->settings, PREF_NEW_ENCRYPT_HEADER, gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (GET_WIDGET ("encrypt_header_checkbutton"))));
+ g_settings_set_boolean (self->settings, PREF_NEW_EXPAND_OPTIONS, gtk_expander_get_expanded
(GTK_EXPANDER (GET_WIDGET ("other_options_expander"))));
g_settings_set_int (self->settings, PREF_NEW_VOLUME_SIZE, gtk_spin_button_get_value (GTK_SPIN_BUTTON
(GET_WIDGET ("volume_spinbutton"))) * MEGABYTE);
n_format = get_selected_format (self);
@@ -250,7 +251,8 @@ _fr_new_archive_dialog_construct (FrNewArchiveDialog *self,
folder = _g_file_get_home ();
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (GET_WIDGET ("parent_filechooserbutton")),
folder, NULL);
- gtk_expander_set_expanded (GTK_EXPANDER (GET_WIDGET ("other_options_expander")), FALSE);
+ gtk_expander_set_expanded (GTK_EXPANDER (GET_WIDGET ("other_options_expander")),
+ g_settings_get_boolean (self->settings, PREF_NEW_EXPAND_OPTIONS));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (GET_WIDGET ("encrypt_header_checkbutton")),
g_settings_get_boolean (self->settings, PREF_NEW_ENCRYPT_HEADER));
diff --git a/src/preferences.h b/src/preferences.h
index ed0fbe25..0c107d33 100644
--- a/src/preferences.h
+++ b/src/preferences.h
@@ -69,6 +69,7 @@
#define PREF_NEW_DEFAULT_EXTENSION "default-extension"
#define PREF_NEW_ENCRYPT_HEADER "encrypt-header"
#define PREF_NEW_VOLUME_SIZE "volume-size"
+#define PREF_NEW_EXPAND_OPTIONS "expand-options"
#define NAUTILUS_SCHEMA "org.gnome.nautilus.preferences"
#define NAUTILUS_CLICK_POLICY "click-policy"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]