From 2ffdfc58b3cbddbe6fe9899f02d0f6efb59da721 Mon Sep 17 00:00:00 2001 From: Gabriel Millaire Date: Sat, 23 May 2009 14:10:20 -0400 Subject: Added a preference in the conf and schema (show contact list in rooms) --- data/empathy.schemas.in | 14 ++++++++++++++ libempathy-gtk/empathy-conf.h | 1 + src/empathy-preferences.c | 6 ++++++ 3 files changed, 21 insertions(+) diff --git a/data/empathy.schemas.in b/data/empathy.schemas.in index 81ea5e864..57944b75e 100644 --- a/data/empathy.schemas.in +++ b/data/empathy.schemas.in @@ -288,6 +288,20 @@ + + + /schemas/apps/empathy/conversation/show_contacts_in_rooms + /apps/empathy/conversation/show_contacts_in_rooms + empathy + bool + true + + Show contact list in rooms + + Whether or not to show the contact list in chat rooms. + + + /schemas/apps/empathy/conversation/theme diff --git a/libempathy-gtk/empathy-conf.h b/libempathy-gtk/empathy-conf.h index 47949139e..e40c2283d 100644 --- a/libempathy-gtk/empathy-conf.h +++ b/libempathy-gtk/empathy-conf.h @@ -59,6 +59,7 @@ struct _EmpathyConfClass { #define EMPATHY_PREFS_SOUNDS_CONTACT_LOGOUT EMPATHY_PREFS_PATH "/sounds/sounds_contact_logout" #define EMPATHY_PREFS_POPUPS_WHEN_AVAILABLE EMPATHY_PREFS_PATH "/notifications/popups_when_available" #define EMPATHY_PREFS_CHAT_SHOW_SMILEYS EMPATHY_PREFS_PATH "/conversation/graphical_smileys" +#define EMPATHY_PREFS_CHAT_SHOW_CONTACTS_IN_ROOMS EMPATHY_PREFS_PATH "/conversation/show_contacts_in_rooms" #define EMPATHY_PREFS_CHAT_THEME EMPATHY_PREFS_PATH "/conversation/theme" #define EMPATHY_PREFS_CHAT_ADIUM_PATH EMPATHY_PREFS_PATH "/conversation/adium_path" #define EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES EMPATHY_PREFS_PATH "/conversation/spell_checker_languages" diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c index 4c88db675..30466193b 100644 --- a/src/empathy-preferences.c +++ b/src/empathy-preferences.c @@ -52,6 +52,7 @@ typedef struct { GtkWidget *checkbutton_show_avatars; GtkWidget *checkbutton_compact_contact_list; GtkWidget *checkbutton_show_smileys; + GtkWidget *checkbutton_show_contacts_in_rooms; GtkWidget *combobox_chat_theme; GtkWidget *hbox_adium_theme; GtkWidget *filechooserbutton_adium_theme; @@ -236,6 +237,10 @@ preferences_setup_widgets (EmpathyPreferences *preferences) preferences_hookup_toggle_button (preferences, EMPATHY_PREFS_CHAT_SHOW_SMILEYS, preferences->checkbutton_show_smileys); + + preferences_hookup_toggle_button (preferences, + EMPATHY_PREFS_CHAT_SHOW_CONTACTS_IN_ROOMS, + preferences->checkbutton_show_contacts_in_rooms); preferences_hookup_radio_button (preferences, EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM, @@ -1190,6 +1195,7 @@ empathy_preferences_show (GtkWindow *parent) "checkbutton_show_avatars", &preferences->checkbutton_show_avatars, "checkbutton_compact_contact_list", &preferences->checkbutton_compact_contact_list, "checkbutton_show_smileys", &preferences->checkbutton_show_smileys, + "checkbutton_show_contacts_in_rooms", &preferences->checkbutton_show_contacts_in_rooms, "combobox_chat_theme", &preferences->combobox_chat_theme, "hbox_adium_theme", &preferences->hbox_adium_theme, "filechooserbutton_adium_theme", &preferences->filechooserbutton_adium_theme, -- cgit v1.2.3