aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-13 17:32:00 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-17 18:34:20 +0800
commit62f67957957bd4616bd2b8371cdf37cb3ef8c972 (patch)
tree23be9e7de01f5183bea63ce737f0e6e0d4a8128d
parent7abe2062d5933836bf6d3eb5de28179bf3aa4a64 (diff)
downloadgsoc2013-empathy-62f67957957bd4616bd2b8371cdf37cb3ef8c972.tar
gsoc2013-empathy-62f67957957bd4616bd2b8371cdf37cb3ef8c972.tar.gz
gsoc2013-empathy-62f67957957bd4616bd2b8371cdf37cb3ef8c972.tar.bz2
gsoc2013-empathy-62f67957957bd4616bd2b8371cdf37cb3ef8c972.tar.lz
gsoc2013-empathy-62f67957957bd4616bd2b8371cdf37cb3ef8c972.tar.xz
gsoc2013-empathy-62f67957957bd4616bd2b8371cdf37cb3ef8c972.tar.zst
gsoc2013-empathy-62f67957957bd4616bd2b8371cdf37cb3ef8c972.zip
add preference to disable logging (#567858)
-rw-r--r--libempathy/empathy-gsettings.h3
-rw-r--r--src/empathy-preferences.c11
-rw-r--r--src/empathy-preferences.ui14
3 files changed, 28 insertions, 0 deletions
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index 126936e11..21d08ed5d 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -89,6 +89,9 @@ G_BEGIN_DECLS
#define EMPATHY_PREFS_ACCOUNTS_SCHEMA EMPATHY_PREFS_SCHEMA ".accounts"
+#define EMPATHY_PREFS_LOGGER_SCHEMA "org.freedesktop.Telepathy.Logger"
+#define EMPATHY_PREFS_LOGGER_ENABLED "enabled"
+
G_END_DECLS
#endif /* __EMPATHY_GSETTINGS_H__ */
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index cf767a3ea..acf5eab21 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -60,6 +60,7 @@ struct _EmpathyPreferencesPriv {
GtkWidget *checkbutton_separate_chat_windows;
GtkWidget *checkbutton_events_notif_area;
GtkWidget *checkbutton_autoconnect;
+ GtkWidget *checkbutton_logging;
GtkWidget *checkbutton_sounds_enabled;
GtkWidget *checkbutton_sounds_disabled_away;
@@ -85,6 +86,7 @@ struct _EmpathyPreferencesPriv {
GSettings *gsettings_notify;
GSettings *gsettings_sound;
GSettings *gsettings_ui;
+ GSettings *gsettings_logger;
};
static void preferences_setup_widgets (EmpathyPreferences *preferences);
@@ -294,6 +296,12 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
priv->checkbutton_location_reduce_accuracy,
"sensitive",
G_SETTINGS_BIND_GET);
+
+ g_settings_bind (priv->gsettings_logger,
+ EMPATHY_PREFS_LOGGER_ENABLED,
+ priv->checkbutton_logging,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
}
static void
@@ -837,6 +845,7 @@ empathy_preferences_finalize (GObject *self)
g_object_unref (priv->gsettings_notify);
g_object_unref (priv->gsettings_sound);
g_object_unref (priv->gsettings_ui);
+ g_object_unref (priv->gsettings_logger);
G_OBJECT_CLASS (empathy_preferences_parent_class)->finalize (self);
}
@@ -886,6 +895,7 @@ empathy_preferences_init (EmpathyPreferences *preferences)
"checkbutton_separate_chat_windows", &priv->checkbutton_separate_chat_windows,
"checkbutton_events_notif_area", &priv->checkbutton_events_notif_area,
"checkbutton_autoconnect", &priv->checkbutton_autoconnect,
+ "checkbutton_logging", &priv->checkbutton_logging,
"checkbutton_notifications_enabled", &priv->checkbutton_notifications_enabled,
"checkbutton_notifications_disabled_away", &priv->checkbutton_notifications_disabled_away,
"checkbutton_notifications_focus", &priv->checkbutton_notifications_focus,
@@ -914,6 +924,7 @@ empathy_preferences_init (EmpathyPreferences *preferences)
priv->gsettings_notify = g_settings_new (EMPATHY_PREFS_NOTIFICATIONS_SCHEMA);
priv->gsettings_sound = g_settings_new (EMPATHY_PREFS_SOUNDS_SCHEMA);
priv->gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA);
+ priv->gsettings_logger = g_settings_new (EMPATHY_PREFS_LOGGER_SCHEMA);
preferences_themes_setup (preferences);
diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui
index 0871d9412..d22166320 100644
--- a/src/empathy-preferences.ui
+++ b/src/empathy-preferences.ui
@@ -133,6 +133,20 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_logging">
+ <property name="label" translatable="yes">Log conversations</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>