]> git.0d.be Git - empathy.git/blobdiff - src/empathy-preferences.c
Merge remote-tracking branch 'glassrose/add-All-service-selection-in-debug-window'
[empathy.git] / src / empathy-preferences.c
index 3eb9e608dbc49e1f788f64f37b6970795f0a1ef7..77ec49c264edaa52d9c336261141e108bca849a6 100644 (file)
@@ -39,7 +39,6 @@
 #include <libempathy-gtk/empathy-ui-utils.h>
 #include <libempathy-gtk/empathy-theme-manager.h>
 #include <libempathy-gtk/empathy-spell.h>
-#include <libempathy-gtk/empathy-contact-list-store.h>
 #include <libempathy-gtk/empathy-gtk-enum-types.h>
 #include <libempathy-gtk/empathy-theme-adium.h>
 
@@ -68,7 +67,7 @@ struct _EmpathyPreferencesPriv {
 
        GtkWidget *checkbutton_show_smileys;
        GtkWidget *checkbutton_show_contacts_in_rooms;
-       GtkWidget *checkbutton_separate_chat_windows;
+       GtkWidget *radiobutton_chats_new_windows;
        GtkWidget *checkbutton_events_notif_area;
        GtkWidget *checkbutton_autoconnect;
        GtkWidget *checkbutton_logging;
@@ -83,8 +82,6 @@ struct _EmpathyPreferencesPriv {
        GtkWidget *checkbutton_notifications_contact_signin;
        GtkWidget *checkbutton_notifications_contact_signout;
 
-       GtkWidget *scale_call_volume;
-       GtkWidget *adj_call_volume;
        GtkWidget *echo_cancellation;
 
        GtkWidget *treeview_spell_checker;
@@ -169,7 +166,7 @@ static SoundEventEntry sound_entries [] = {
        { N_("Message received"), EMPATHY_PREFS_SOUNDS_INCOMING_MESSAGE },
        { N_("Message sent"), EMPATHY_PREFS_SOUNDS_OUTGOING_MESSAGE },
        { N_("New conversation"), EMPATHY_PREFS_SOUNDS_NEW_CONVERSATION },
-       { N_("Contact goes online"), EMPATHY_PREFS_SOUNDS_CONTACT_LOGIN },
+       { N_("Contact comes online"), EMPATHY_PREFS_SOUNDS_CONTACT_LOGIN },
        { N_("Contact goes offline"), EMPATHY_PREFS_SOUNDS_CONTACT_LOGOUT },
        { N_("Account connected"), EMPATHY_PREFS_SOUNDS_SERVICE_LOGIN },
        { N_("Account disconnected"), EMPATHY_PREFS_SOUNDS_SERVICE_LOGOUT }
@@ -251,7 +248,7 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
 
        g_settings_bind (priv->gsettings_ui,
                         EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS,
-                        priv->checkbutton_separate_chat_windows,
+                        priv->radiobutton_chats_new_windows,
                         "active",
                         G_SETTINGS_BIND_DEFAULT);
 
@@ -272,12 +269,6 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
                         "active",
                         G_SETTINGS_BIND_DEFAULT);
 
-       g_settings_bind (priv->gsettings_call,
-                        EMPATHY_PREFS_CALL_SOUND_VOLUME,
-                        priv->adj_call_volume,
-                        "value",
-                        G_SETTINGS_BIND_DEFAULT);
-
        g_settings_bind (priv->gsettings_call,
                         EMPATHY_PREFS_CALL_ECHO_CANCELLATION,
                         priv->echo_cancellation,
@@ -687,7 +678,8 @@ static void
 preferences_preview_theme_append_message (EmpathyChatView *view,
                                          EmpathyContact *sender,
                                          EmpathyContact *receiver,
-                                         const gchar *text)
+                                         const gchar *text,
+                                         gboolean should_highlight)
 {
        EmpathyMessage *message;
 
@@ -697,7 +689,7 @@ preferences_preview_theme_append_message (EmpathyChatView *view,
                "body", text,
                NULL);
 
-       empathy_chat_view_append_message (view, message);
+       empathy_chat_view_append_message (view, message, should_highlight);
        g_object_unref (message);
 }
 
@@ -744,19 +736,20 @@ preferences_preview_theme_changed_cb (EmpathyThemeManager *manager,
 
        preferences_preview_theme_append_message (priv->chat_theme_preview,
                /* translators: Quote from Romeo & Julier, for chat theme preview */
-               juliet, romeo, _("O Romeo, Romeo, wherefore art thou Romeo?"));
+               juliet, romeo, _("O Romeo, Romeo, wherefore art thou Romeo?"),
+               TRUE /* this message mentions Romeo */);
        preferences_preview_theme_append_message (priv->chat_theme_preview,
                /* translators: Quote from Romeo & Julier, for chat theme preview */
-               juliet, romeo, _("Deny thy father and refuse thy name;"));
+               juliet, romeo, _("Deny thy father and refuse thy name;"), FALSE);
        preferences_preview_theme_append_message (priv->chat_theme_preview,
                /* translators: Quote from Romeo & Julier, for chat theme preview */
-               juliet, romeo, _("Or if thou wilt not, be but sworn my love"));
+               juliet, romeo, _("Or if thou wilt not, be but sworn my love"), FALSE);
        preferences_preview_theme_append_message (priv->chat_theme_preview,
                /* translators: Quote from Romeo & Julier, for chat theme preview */
-               juliet, romeo, _("And I'll no longer be a Capulet."));
+               juliet, romeo, _("And I'll no longer be a Capulet."), FALSE);
        preferences_preview_theme_append_message (priv->chat_theme_preview,
                /* translators: Quote from Romeo & Julier, for chat theme preview */
-               romeo, juliet, _("Shall I hear more, or shall I speak at this?"));
+               romeo, juliet, _("Shall I hear more, or shall I speak at this?"), FALSE);
 
        /* translators: Quote from Romeo & Julier, for chat theme preview */
        empathy_chat_view_append_event (priv->chat_theme_preview, _("Juliet has disconnected"));
@@ -1108,13 +1101,6 @@ preferences_themes_setup (EmpathyPreferences *preferences)
                          preferences);
 }
 
-static gchar *
-preferences_call_format_volume_cb (GtkScale *scale,
-                                  gdouble value)
-{
-       return g_strdup_printf ("%g%%", value);
-}
-
 static void
 empathy_preferences_response (GtkDialog *widget,
                              gint response)
@@ -1162,8 +1148,6 @@ empathy_preferences_init (EmpathyPreferences *preferences)
        GtkBuilder                *gui;
        gchar                     *filename;
        GtkWidget                 *page;
-       GtkWidget                 *call_volume_scale_box;
-       GtkWidget                 *call_volume_bar_box;
 
        priv = preferences->priv = G_TYPE_INSTANCE_GET_PRIVATE (preferences,
                        EMPATHY_TYPE_PREFERENCES, EmpathyPreferencesPriv);
@@ -1188,7 +1172,7 @@ empathy_preferences_init (EmpathyPreferences *preferences)
                "combobox_chat_theme_variant", &priv->combobox_chat_theme_variant,
                "hbox_chat_theme_variant", &priv->hbox_chat_theme_variant,
                "sw_chat_theme_preview", &priv->sw_chat_theme_preview,
-               "checkbutton_separate_chat_windows", &priv->checkbutton_separate_chat_windows,
+               "radiobutton_chats_new_windows", &priv->radiobutton_chats_new_windows,
                "checkbutton_events_notif_area", &priv->checkbutton_events_notif_area,
                "checkbutton_autoconnect", &priv->checkbutton_autoconnect,
                "checkbutton_logging", &priv->checkbutton_logging,
@@ -1206,10 +1190,6 @@ empathy_preferences_init (EmpathyPreferences *preferences)
                "checkbutton_location_resource_network", &priv->checkbutton_location_resource_network,
                "checkbutton_location_resource_cell", &priv->checkbutton_location_resource_cell,
                "checkbutton_location_resource_gps", &priv->checkbutton_location_resource_gps,
-               "call_volume_scale_box", &call_volume_scale_box,
-               "call_volume_bar_box", &call_volume_bar_box,
-               "call_volume_scale", &priv->scale_call_volume,
-               "call_volume_adjustment", &priv->adj_call_volume,
                "call_echo_cancellation", &priv->echo_cancellation,
                NULL);
        g_free (filename);
@@ -1235,15 +1215,6 @@ empathy_preferences_init (EmpathyPreferences *preferences)
                          preferences, 0);
        preferences_preview_theme_changed_cb (priv->theme_manager, preferences);
 
-       g_signal_connect (priv->scale_call_volume, "format-value",
-                         G_CALLBACK (preferences_call_format_volume_cb),
-                         preferences);
-
-#ifndef HAVE_CALL
-       gtk_widget_hide (call_volume_scale_box);
-       gtk_widget_hide (call_volume_bar_box);
-#endif
-
        preferences_themes_setup (preferences);
 
        preferences_setup_widgets (preferences);