]> git.0d.be Git - empathy.git/blobdiff - src/empathy-preferences.c
Add en_GB in gitignore
[empathy.git] / src / empathy-preferences.c
index f3d0d10a5e69cebacd6eaa81917a3e065b4d7695..0ad8e9bdf0edbaaa0bd7468f90e0003a03075a64 100644 (file)
@@ -59,6 +59,10 @@ typedef struct {
        GtkWidget *checkbutton_sounds_disabled_away;
        GtkWidget *treeview_sounds;
 
+       GtkWidget *checkbutton_notifications_enabled;
+       GtkWidget *checkbutton_notifications_disabled_away;
+       GtkWidget *checkbutton_notifications_focus;
+
        GtkWidget *treeview_spell_checker;
 
        GList     *notify_ids;
@@ -153,10 +157,10 @@ 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 logs in"), EMPATHY_PREFS_SOUNDS_CONTACT_LOGIN },
-       { N_("Contact logs out"), EMPATHY_PREFS_SOUNDS_CONTACT_LOGOUT },
-       { N_("Logging in a network"), EMPATHY_PREFS_SOUNDS_SERVICE_LOGIN },
-       { N_("Logging off a network"), EMPATHY_PREFS_SOUNDS_SERVICE_LOGOUT }
+       { N_("Contact goes 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 }
 };
 
 static void
@@ -185,6 +189,23 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
 {
        guint id;
 
+       preferences_hookup_toggle_button (preferences,
+                                         EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
+                                         preferences->checkbutton_notifications_enabled);
+       preferences_hookup_toggle_button (preferences,
+                                         EMPATHY_PREFS_NOTIFICATIONS_DISABLED_AWAY,
+                                         preferences->checkbutton_notifications_disabled_away);
+       preferences_hookup_toggle_button (preferences,
+                                         EMPATHY_PREFS_NOTIFICATIONS_FOCUS,
+                                         preferences->checkbutton_notifications_focus);
+
+       preferences_hookup_sensitivity (preferences,
+                                       EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
+                                       preferences->checkbutton_notifications_disabled_away);
+       preferences_hookup_sensitivity (preferences,
+                                       EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
+                                       preferences->checkbutton_notifications_focus);
+
        preferences_hookup_toggle_button (preferences,
                                          EMPATHY_PREFS_SOUNDS_ENABLED,
                                          preferences->checkbutton_sounds_enabled);
@@ -288,10 +309,10 @@ preferences_sound_load (EmpathyPreferences *preferences)
        for (i = 0; i < G_N_ELEMENTS (sound_entries); i++) {
                empathy_conf_get_bool (conf, sound_entries[i].key, &set);
 
-               gtk_list_store_append (store, &iter);
-               gtk_list_store_set (store, &iter, COL_SOUND_ENABLED, set,
-                                   COL_SOUND_NAME, sound_entries[i].name,
-                                   COL_SOUND_KEY, sound_entries[i].key, -1);
+               gtk_list_store_insert_with_values (store, &iter, i,
+                                                  COL_SOUND_NAME, gettext (sound_entries[i].name),
+                                                  COL_SOUND_KEY, sound_entries[i].key,
+                                                  COL_SOUND_ENABLED, set, -1);
        }
 }
 
@@ -1061,6 +1082,9 @@ empathy_preferences_show (GtkWindow *parent)
                "checkbutton_autoconnect", &preferences->checkbutton_autoconnect,
                "radiobutton_contact_list_sort_by_name", &preferences->radiobutton_contact_list_sort_by_name,
                "radiobutton_contact_list_sort_by_state", &preferences->radiobutton_contact_list_sort_by_state,
+               "checkbutton_notifications_enabled", &preferences->checkbutton_notifications_enabled,
+               "checkbutton_notifications_disabled_away", &preferences->checkbutton_notifications_disabled_away,
+               "checkbutton_notifications_focus", &preferences->checkbutton_notifications_focus,
                "checkbutton_sounds_enabled", &preferences->checkbutton_sounds_enabled,
                "checkbutton_sounds_disabled_away", &preferences->checkbutton_sounds_disabled_away,
                "treeview_sounds", &preferences->treeview_sounds,