aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorMarco Barisione <marco@barisione.org>2008-03-10 21:25:37 +0800
committerMarco Barisione <marco@barisione.org>2008-03-10 21:25:37 +0800
commitf56c86585f39e071fcb80c057d47db77b260c361 (patch)
treec1443e1cf8db97f6afc9302bdde2b5c84bdd61bb /libempathy-gtk
parentb20343a46bbdb14cf251b808351e47451463d9f0 (diff)
downloadgsoc2013-empathy-f56c86585f39e071fcb80c057d47db77b260c361.tar
gsoc2013-empathy-f56c86585f39e071fcb80c057d47db77b260c361.tar.gz
gsoc2013-empathy-f56c86585f39e071fcb80c057d47db77b260c361.tar.bz2
gsoc2013-empathy-f56c86585f39e071fcb80c057d47db77b260c361.tar.lz
gsoc2013-empathy-f56c86585f39e071fcb80c057d47db77b260c361.tar.xz
gsoc2013-empathy-f56c86585f39e071fcb80c057d47db77b260c361.tar.zst
gsoc2013-empathy-f56c86585f39e071fcb80c057d47db77b260c361.zip
Set to unsensitive the 'Show avatars' option when using compact mode. Fixes bug #521570 (Marco Barisione).
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-preferences.c40
1 files changed, 33 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-preferences.c b/libempathy-gtk/empathy-preferences.c
index 50c9d5660..bd28ddd50 100644
--- a/libempathy-gtk/empathy-preferences.c
+++ b/libempathy-gtk/empathy-preferences.c
@@ -151,8 +151,30 @@ enum {
};
static void
+preferences_add_id (EmpathyPreferences *preferences, guint id)
+{
+ preferences->notify_ids = g_list_prepend (preferences->notify_ids,
+ GUINT_TO_POINTER (id));
+}
+
+static void
+preferences_compact_contact_list_changed_cb (EmpathyConf *conf,
+ const gchar *key,
+ gpointer user_data)
+{
+ EmpathyPreferences *preferences = user_data;
+ gboolean value;
+
+ if (empathy_conf_get_bool (empathy_conf_get (), key, &value)) {
+ gtk_widget_set_sensitive (preferences->checkbutton_show_avatars, !value);
+ }
+}
+
+static void
preferences_setup_widgets (EmpathyPreferences *preferences)
{
+ guint id;
+
preferences_hookup_toggle_button (preferences,
EMPATHY_PREFS_SOUNDS_FOR_MESSAGES,
preferences->checkbutton_sounds_for_messages);
@@ -204,6 +226,17 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
preferences_hookup_toggle_button (preferences,
EMPATHY_PREFS_AUTOCONNECT,
preferences->checkbutton_autoconnect);
+
+ id = empathy_conf_notify_add (empathy_conf_get (),
+ EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
+ preferences_compact_contact_list_changed_cb,
+ preferences);
+ if (id) {
+ preferences_add_id (preferences, id);
+ }
+ preferences_compact_contact_list_changed_cb (empathy_conf_get (),
+ EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
+ preferences);
}
static void
@@ -624,13 +657,6 @@ preferences_notify_sensitivity_cb (EmpathyConf *conf,
}
static void
-preferences_add_id (EmpathyPreferences *preferences, guint id)
-{
- preferences->notify_ids = g_list_prepend (preferences->notify_ids,
- GUINT_TO_POINTER (id));
-}
-
-static void
preferences_hookup_spin_button (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget)