[empathy] Add preference to show account balances



commit f1225d5e0ca93beef95c12392f1c154499463d9c
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Tue May 15 13:42:42 2012 +1000

    Add preference to show account balances
    
    Set this 'true' by default.

 data/org.gnome.Empathy.gschema.xml |    2 +-
 libempathy/empathy-gsettings.h     |    1 +
 src/empathy-preferences.c          |    2 ++
 src/empathy-preferences.ui         |   32 ++++++++++++++++++++++++--------
 4 files changed, 28 insertions(+), 9 deletions(-)
---
diff --git a/data/org.gnome.Empathy.gschema.xml b/data/org.gnome.Empathy.gschema.xml
index e7d045e..4945197 100644
--- a/data/org.gnome.Empathy.gschema.xml
+++ b/data/org.gnome.Empathy.gschema.xml
@@ -60,7 +60,7 @@
       <description>Whether to show protocols for contacts in the contact list.</description>
     </key>
     <key name="show-balance-in-roster" type="b">
-      <default>false</default>
+      <default>true</default>
       <summary>Show Balance in contact list</summary>
       <description>Whether to show account balances in the contact list.</description>
     </key>
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index 2863cf9..4178b67 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -76,6 +76,7 @@ G_BEGIN_DECLS
 #define EMPATHY_PREFS_UI_AVATAR_DIRECTORY          "avatar-directory"
 #define EMPATHY_PREFS_UI_SHOW_AVATARS              "show-avatars"
 #define EMPATHY_PREFS_UI_SHOW_PROTOCOLS            "show-protocols"
+#define EMPATHY_PREFS_UI_SHOW_BALANCES             "show-balance-in-roster"
 #define EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST      "compact-contact-list"
 #define EMPATHY_PREFS_UI_CHAT_WINDOW_PANED_POS     "chat-window-paned-pos"
 #define EMPATHY_PREFS_UI_SHOW_OFFLINE              "show-offline"
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index e022221..ee80054 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -220,6 +220,8 @@ preferences_setup_widgets (EmpathyPreferences *preferences,
 		     "radiobutton_normal_size_avatars");
 	BIND_ACTIVE (ui, UI_COMPACT_CONTACT_LIST,
 		     "radiobutton_compact_size");
+	BIND_ACTIVE (ui, UI_SHOW_BALANCES,
+		     "checkbutton_show_balances");
 
 	BIND_ACTIVE (chat, CHAT_SHOW_SMILEYS,
 		     "checkbutton_show_smileys");
diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui
index 4241239..a06911f 100644
--- a/src/empathy-preferences.ui
+++ b/src/empathy-preferences.ui
@@ -61,6 +61,22 @@
                       </packing>
                     </child>
                     <child>
+                      <object class="GtkCheckButton" id="checkbutton_show_balances">
+                        <property name="label" translatable="yes">Show account balances</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
                       <object class="GtkBox" id="box3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
@@ -116,7 +132,7 @@
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
-                        <property name="position">2</property>
+                        <property name="position">3</property>
                       </packing>
                     </child>
                     <child>
@@ -126,12 +142,6 @@
                         <property name="column_spacing">3</property>
                         <property name="n_columns">2</property>
                         <child>
-                          <placeholder/>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                        <child>
                           <object class="GtkLabel" id="label11">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
@@ -201,11 +211,17 @@
                             <property name="height">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">True</property>
-                        <property name="position">3</property>
+                        <property name="position">4</property>
                       </packing>
                     </child>
                   </object>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]