[gnome-utils/gsettings-tutorial: 21/22] [gsettings-tutorial] Make skip_scan_uri setting instant-apply
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-utils/gsettings-tutorial: 21/22] [gsettings-tutorial] Make skip_scan_uri setting instant-apply
- Date: Sat, 17 Apr 2010 00:08:39 +0000 (UTC)
commit bcbfad87e43e806eb4c81b262ec8a793123a7783
Author: Vincent Untz <vuntz gnome org>
Date: Fri Apr 16 19:43:17 2010 -0400
[gsettings-tutorial] Make skip_scan_uri setting instant-apply
baobab/src/baobab-prefs.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/baobab/src/baobab-prefs.c b/baobab/src/baobab-prefs.c
index dd9d4da..e873ee2 100644
--- a/baobab/src/baobab-prefs.c
+++ b/baobab/src/baobab-prefs.c
@@ -34,8 +34,6 @@
#include "baobab-prefs.h"
-static gboolean props_changed;
-
static GtkTreeView *tree_props;
static GtkListStore *model_props;
static GtkListStore *create_props_model (void);
@@ -64,9 +62,6 @@ filechooser_response_cb (GtkDialog *dialog,
"baobab.xml", "baobab-preferences");
break;
case GTK_RESPONSE_CLOSE:
- if (props_changed) {
- save_skip_can_uri (baobab.settings_properties);
- }
default:
gtk_widget_destroy (GTK_WIDGET (dialog));
break;
@@ -80,8 +75,6 @@ create_props (void)
GtkBuilder *builder;
GError *error = NULL;
- props_changed = FALSE;
-
/* UI stuff */
builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, BAOBAB_DIALOG_SCAN_UI_FILE, &error);
@@ -224,11 +217,12 @@ check_toggled (GtkCellRendererToggle *cell,
goto clean_up;
/* set new value */
- props_changed = TRUE;
toggle ^= 1;
gtk_list_store_set (GTK_LIST_STORE (model_props), &iter, COL_CHECK,
toggle, -1);
+ save_skip_can_uri (baobab.settings_properties);
+
clean_up:
g_free (mountpoint);
gtk_tree_path_free (path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]