</schema>
<schema>
- <key>/schemas/apps/empathy/notifications/popup_when_contact_available</key>
- <applyto>/apps/empathy/notifications/popup_when_contact_available</applyto>
+ <key>/schemas/apps/empathy/notifications/notifications_enabled</key>
+ <applyto>/apps/empathy/notifications/notifications_enabled</applyto>
<owner>empathy</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
- <short>Enable popup when contact is available</short>
+ <short>Enable popup notifications for new messages</short>
<long>
- Whether or not to show a popup when a contact becomes available.
+ Whether or not to show a popup notification when receiving a new
+ message.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/empathy/notifications/notifications_disabled_away</key>
+ <applyto>/apps/empathy/notifications/notifications_disabled_away</applyto>
+ <owner>empathy</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Disable popup notifications when away</short>
+ <long>
+ Whether or not to show popup notifications when away or busy.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/empathy/notifications/notifications_focus</key>
+ <applyto>/apps/empathy/notifications/notifications_focus</applyto>
+ <owner>empathy</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Popup notifications if the chat isn't focused</short>
+ <long>
+ Whether or not to show a popup notification when receiving a new
+ message even if the chat is already opened, but not focused.
</long>
</locale>
</schema>
};
#define EMPATHY_PREFS_PATH "/apps/empathy"
+#define EMPATHY_PREFS_NOTIFICATIONS_ENABLED EMPATHY_PREFS_PATH "/notifications/notifications_enabled"
+#define EMPATHY_PREFS_NOTIFICATIONS_DISABLED_AWAY EMPATHY_PREFS_PATH "/notifications/notifications_disabled_away"
+#define EMPATHY_PREFS_NOTIFICATIONS_FOCUS EMPATHY_PREFS_PATH "/notifications/notifications_focus"
#define EMPATHY_PREFS_SOUNDS_ENABLED EMPATHY_PREFS_PATH "/sounds/sounds_enabled"
#define EMPATHY_PREFS_SOUNDS_DISABLED_AWAY EMPATHY_PREFS_PATH "/sounds/sounds_disabled_away"
#define EMPATHY_PREFS_SOUNDS_INCOMING_MESSAGE EMPATHY_PREFS_PATH "/sounds/sounds_incoming_message"
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;
{
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);
"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,