]> git.0d.be Git - empathy.git/commitdiff
Add option to disable displaying events in the notif area (#585914)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 5 Jul 2010 14:48:41 +0000 (16:48 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 7 Jul 2010 08:45:04 +0000 (10:45 +0200)
data/org.gnome.Empathy.gschema.xml.in
libempathy/empathy-gsettings.h
src/empathy-preferences.c
src/empathy-preferences.ui

index c5d95fd180d78f2847525e84960a94605bed6a4a..3026116e031420ac33a34f4915e5352aadb893f6 100644 (file)
       <_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>
index ca6dc0f2297d10d6bfba2f31f7520979c085c90f..126936e116b8d894bca2ebcc123c8523fbc8b3ab 100644 (file)
@@ -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"
index e45e5405d8b744fc813eb5cbaefd803d2f294833..8714aced07be329d82e3adf7c3088deaf2a556b5 100644 (file)
@@ -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,
index e39d36d8ab3b30a486178643ebc223e44d40010b..822e89db7368425dfe1cb90b99f9a98133a50e80 100644 (file)
                                 <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>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
-                                <property name="position">1</property>
+                                <property name="position">2</property>
                               </packing>
                             </child>
                           </object>