[gnome-commander/GSettings] Change of show_devbuttons is now directly saved in GSettings and vice versa
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/GSettings] Change of show_devbuttons is now directly saved in GSettings and vice versa
- Date: Sat, 4 Jun 2016 17:24:29 +0000 (UTC)
commit 4c78eb6abf0dcc8e8d68d1aaa4a373bee0bc7599
Author: Uwe Scholz <uwescholz src gnome org>
Date: Sat Jun 4 19:24:04 2016 +0200
Change of show_devbuttons is now directly saved in GSettings and vice versa
src/gnome-cmd-data.cc | 15 +++++++++++++++
src/gnome-cmd-user-actions.cc | 1 +
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index d769ca4..a810c7d 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -195,6 +195,16 @@ void on_icon_size_changed ()
main_win->update_view();
}
+void on_show_devbuttons_changed ()
+{
+ gboolean show_devbuttons;
+
+ show_devbuttons = g_settings_get_boolean (gnome_cmd_data.options.gcmd_settings->general,
GCMD_SETTINGS_SHOW_DEVBUTTONS);
+ gnome_cmd_data.show_devbuttons = show_devbuttons;
+ main_win->fs(ACTIVE)->update_show_devbuttons();
+ main_win->fs(INACTIVE)->update_show_devbuttons();
+}
+
void on_horizontal_orientation_changed ()
{
gboolean horizontal_orientation;
@@ -313,6 +323,11 @@ static void gcmd_connect_gsettings_signals(GcmdSettings *gs)
NULL);
g_signal_connect (gs->general,
+ "changed::show-devbuttons",
+ G_CALLBACK (on_show_devbuttons_changed),
+ NULL);
+
+ g_signal_connect (gs->general,
"changed::horizontal-orientation",
G_CALLBACK (on_horizontal_orientation_changed),
NULL);
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 20aeb5b..6adbec3 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -1535,6 +1535,7 @@ void view_conbuttons (GtkMenuItem *menuitem, gpointer not_used)
GtkCheckMenuItem *checkitem = (GtkCheckMenuItem *) menuitem;
gnome_cmd_data.show_devbuttons = checkitem->active;
+ g_settings_set_boolean (gcmd_user_actions.settings->general, GCMD_SETTINGS_SHOW_DEVBUTTONS,
gnome_cmd_data.show_devbuttons);
get_fs (ACTIVE)->update_show_devbuttons();
get_fs (INACTIVE)->update_show_devbuttons();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]