empathy r2281 - in trunk: data libempathy-gtk src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2281 - in trunk: data libempathy-gtk src
- Date: Fri, 30 Jan 2009 17:07:23 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 30 17:07:23 2009
New Revision: 2281
URL: http://svn.gnome.org/viewvc/empathy?rev=2281&view=rev
Log:
Modify code to handle new preferences.
Modified:
trunk/data/empathy.schemas.in
trunk/libempathy-gtk/empathy-conf.h
trunk/src/empathy-preferences.c
trunk/src/empathy-preferences.glade
Modified: trunk/data/empathy.schemas.in
==============================================================================
--- trunk/data/empathy.schemas.in (original)
+++ trunk/data/empathy.schemas.in Fri Jan 30 17:07:23 2009
@@ -217,15 +217,45 @@
</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>
Modified: trunk/libempathy-gtk/empathy-conf.h
==============================================================================
--- trunk/libempathy-gtk/empathy-conf.h (original)
+++ trunk/libempathy-gtk/empathy-conf.h Fri Jan 30 17:07:23 2009
@@ -45,6 +45,9 @@
};
#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"
Modified: trunk/src/empathy-preferences.c
==============================================================================
--- trunk/src/empathy-preferences.c (original)
+++ trunk/src/empathy-preferences.c Fri Jan 30 17:07:23 2009
@@ -59,6 +59,10 @@
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;
@@ -186,6 +190,23 @@
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);
preferences_hookup_toggle_button (preferences,
@@ -1061,6 +1082,9 @@
"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,
Modified: trunk/src/empathy-preferences.glade
==============================================================================
--- trunk/src/empathy-preferences.glade (original)
+++ trunk/src/empathy-preferences.glade Fri Jan 30 17:07:23 2009
@@ -269,7 +269,7 @@
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkCheckButton" id="checkbutton_notifications_away">
+ <widget class="GtkCheckButton" id="checkbutton_notifications_disabled_away">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Disable notifications when _away or busy</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]