aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-05 22:48:41 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-07 16:45:04 +0800
commit5b029371a79ba91901cf88f7362f86632e94e223 (patch)
tree829ec56ae6de17472a3dcf96306d5f280d3b10ac
parentdbf13d34105beedc112b8d6005c0b8ff0646aa0f (diff)
downloadgsoc2013-empathy-5b029371a79ba91901cf88f7362f86632e94e223.tar
gsoc2013-empathy-5b029371a79ba91901cf88f7362f86632e94e223.tar.gz
gsoc2013-empathy-5b029371a79ba91901cf88f7362f86632e94e223.tar.bz2
gsoc2013-empathy-5b029371a79ba91901cf88f7362f86632e94e223.tar.lz
gsoc2013-empathy-5b029371a79ba91901cf88f7362f86632e94e223.tar.xz
gsoc2013-empathy-5b029371a79ba91901cf88f7362f86632e94e223.tar.zst
gsoc2013-empathy-5b029371a79ba91901cf88f7362f86632e94e223.zip
Add option to disable displaying events in the notif area (#585914)
-rw-r--r--data/org.gnome.Empathy.gschema.xml.in6
-rw-r--r--libempathy/empathy-gsettings.h1
-rw-r--r--src/empathy-preferences.c8
-rw-r--r--src/empathy-preferences.ui17
4 files changed, 31 insertions, 1 deletions
diff --git a/data/org.gnome.Empathy.gschema.xml.in b/data/org.gnome.Empathy.gschema.xml.in
index c5d95fd18..3026116e0 100644
--- a/data/org.gnome.Empathy.gschema.xml.in
+++ b/data/org.gnome.Empathy.gschema.xml.in
@@ -75,6 +75,12 @@
<_summary>Open new chats in separate windows</_summary>
<_description>Always open a separate chat window for new chats.</_description>
</key>
+ <key name="events-notify-area" type="b">
+ <default>true</default>
+ <_summary>Display incoming events in the status area</_summary>
+ <_description>Display incoming events in the status area. If false
+present them right away to the user.</_description>
+ </key>
<key name="chat-window-paned-pos" type="i">
<default>0</default>
<_summary>The position for the chat window side pane</_summary>
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index ca6dc0f22..126936e11 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -65,6 +65,7 @@ G_BEGIN_DECLS
#define EMPATHY_PREFS_UI_SCHEMA EMPATHY_PREFS_SCHEMA ".ui"
#define EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS "separate-chat-windows"
+#define EMPATHY_PREFS_UI_EVENTS_NOTIFY_AREA "events-notify-area"
#define EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN "main-window-hidden"
#define EMPATHY_PREFS_UI_AVATAR_DIRECTORY "avatar-directory"
#define EMPATHY_PREFS_UI_SHOW_AVATARS "show-avatars"
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index e45e5405d..8714aced0 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -58,6 +58,7 @@ struct _EmpathyPreferencesPriv {
GtkWidget *checkbutton_show_contacts_in_rooms;
GtkWidget *combobox_chat_theme;
GtkWidget *checkbutton_separate_chat_windows;
+ GtkWidget *checkbutton_events_notif_area;
GtkWidget *checkbutton_autoconnect;
GtkWidget *checkbutton_sounds_enabled;
@@ -221,6 +222,12 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
"active",
G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_ui,
+ EMPATHY_PREFS_UI_EVENTS_NOTIFY_AREA,
+ priv->checkbutton_events_notif_area,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
g_settings_bind (priv->gsettings_chat,
EMPATHY_PREFS_CHAT_SHOW_SMILEYS,
priv->checkbutton_show_smileys,
@@ -877,6 +884,7 @@ empathy_preferences_init (EmpathyPreferences *preferences)
"checkbutton_show_contacts_in_rooms", &priv->checkbutton_show_contacts_in_rooms,
"combobox_chat_theme", &priv->combobox_chat_theme,
"checkbutton_separate_chat_windows", &priv->checkbutton_separate_chat_windows,
+ "checkbutton_events_notif_area", &priv->checkbutton_events_notif_area,
"checkbutton_autoconnect", &priv->checkbutton_autoconnect,
"checkbutton_notifications_enabled", &priv->checkbutton_notifications_enabled,
"checkbutton_notifications_disabled_away", &priv->checkbutton_notifications_disabled_away,
diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui
index e39d36d8a..822e89db7 100644
--- a/src/empathy-preferences.ui
+++ b/src/empathy-preferences.ui
@@ -104,6 +104,21 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_events_notif_area">
+ <property name="label" translatable="yes">Display incoming events in the notification area</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child>
<object class="GtkCheckButton" id="checkbutton_autoconnect">
<property name="label" translatable="yes">_Automatically connect on startup</property>
@@ -115,7 +130,7 @@
<property name="draw_indicator">True</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>