changeset 153:07cedffb1c63

implemented UI for configuring icon update.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 25 Jul 2008 16:53:43 +0900
parents 588da540685a
children d6ecbdee0afa
files pidgin-twitter.c pidgin-twitter.h prefs.ui
diffstat 3 files changed, 459 insertions(+), 167 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.c	Fri Jul 25 07:05:04 2008 +0900
+++ b/pidgin-twitter.c	Fri Jul 25 16:53:43 2008 +0900
@@ -1809,7 +1809,7 @@
 
     size = purple_prefs_get_int(OPT_ICON_SIZE);
     if(size == 0)
-        size = 48; /* twitter icon size */
+        size = DEFAULT_ICON_SIZE;
 
     dest = gdk_pixbuf_scale_simple(src, size, size, GDK_INTERP_HYPER);
     gdk_pixbuf_unref (src);
@@ -2562,6 +2562,9 @@
     gchar *filename;
     GtkWidget *window, *notebook, *e;
     const gchar *text;
+    GtkSpinButton *spin;
+    GtkObject *adjust;
+    gint value;
 
     builder = gtk_builder_new();
 
@@ -2587,11 +2590,13 @@
 
     gtk_container_remove(GTK_CONTAINER(window), notebook);
 
-    g_signal_connect(notebook, "destroy",
-                     G_CALLBACK(gtk_widget_destroyed), &notebook);
+//    g_signal_connect(notebook, "destroy",
+//                     G_CALLBACK(gtk_widget_destroyed), &notebook);
+
 
     /* connect to signals */
 
+
     /* account page */
     e = GTK_WIDGET(gtk_builder_get_object (builder, "account_twitter"));
     g_object_set_data(G_OBJECT(e), "pref", OPT_SCREEN_NAME_TWITTER);
@@ -2658,8 +2663,11 @@
     g_signal_connect(e, "toggled",
                      G_CALLBACK(bool_toggled_cb), &e);
 
-    /* utility page */
-    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_show_icon"));
+
+
+
+    /* icon page */
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "icon_show_icon"));
     g_object_set_data(G_OBJECT(e), "pref", OPT_SHOW_ICON);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
                                  purple_prefs_get_bool(OPT_SHOW_ICON));
@@ -2667,15 +2675,15 @@
                      G_CALLBACK(bool_toggled_cb), &e);
 
     /* setup spin */
-    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_icon_size_spin"));
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "icon_icon_size_spin"));
     g_object_set_data(G_OBJECT(e), "pref", OPT_ICON_SIZE);
 
-    GtkSpinButton *spin = GTK_SPIN_BUTTON(e);
-
-    int value = purple_prefs_get_int(OPT_ICON_SIZE);
+    spin = GTK_SPIN_BUTTON(e);
+
+    value = purple_prefs_get_int(OPT_ICON_SIZE);
     twitter_debug("spin value = %d\n", value);
 
-	GtkObject *adjust = gtk_adjustment_new(value, 16, 128, 4, 1, 1);
+	adjust = gtk_adjustment_new(value, 16, 128, 4, 1, 1);
     gtk_spin_button_set_adjustment(spin, GTK_ADJUSTMENT(adjust));
     gtk_widget_set_size_request(GTK_WIDGET(spin), 50, -1);
 
@@ -2689,37 +2697,58 @@
     purple_prefs_connect_callback(plugin, OPT_ICON_SIZE,
                                   icon_size_prefs_cb, NULL);
 
-
-
-    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_counter"));
-    g_object_set_data(G_OBJECT(e), "pref", OPT_COUNTER);
+    /* enable update */
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "icon_enable_update"));
+    g_object_set_data(G_OBJECT(e), "pref", OPT_UPDATE_ICON);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
-                                 purple_prefs_get_bool(OPT_COUNTER));
+                                 purple_prefs_get_bool(OPT_UPDATE_ICON));
     g_signal_connect(e, "toggled",
                      G_CALLBACK(bool_toggled_cb), &e);
-    purple_prefs_connect_callback(plugin, OPT_COUNTER, /* xxx */
-                                  counter_prefs_cb, NULL);
-
-    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_pseudo"));
-    g_object_set_data(G_OBJECT(e), "pref", OPT_ESCAPE_PSEUDO);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
-                                 purple_prefs_get_bool(OPT_ESCAPE_PSEUDO));
-    g_signal_connect(e, "toggled",
-                     G_CALLBACK(bool_toggled_cb), &e);
-
-    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_oops"));
-    g_object_set_data(G_OBJECT(e), "pref", OPT_SUPPRESS_OOPS);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
-                                 purple_prefs_get_bool(OPT_SUPPRESS_OOPS));
-    g_signal_connect(e, "toggled",
-                     G_CALLBACK(bool_toggled_cb), &e);
-
-    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_notify"));
-    g_object_set_data(G_OBJECT(e), "pref", OPT_PREVENT_NOTIFICATION);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
-                                 purple_prefs_get_bool(OPT_PREVENT_NOTIFICATION));
-    g_signal_connect(e, "toggled",
-                     G_CALLBACK(bool_toggled_cb), &e);
+
+    /* setup count spin */
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "icon_max_count_spin"));
+    g_object_set_data(G_OBJECT(e), "pref", OPT_ICON_MAX_COUNT);
+
+    spin = GTK_SPIN_BUTTON(e);
+
+    value = purple_prefs_get_int(OPT_ICON_MAX_COUNT);
+    twitter_debug("spin value = %d\n", value);
+
+	adjust = gtk_adjustment_new(value, 2, 10000, 1, 10, 10);
+    gtk_spin_button_set_adjustment(spin, GTK_ADJUSTMENT(adjust));
+    gtk_widget_set_size_request(GTK_WIDGET(spin), 50, -1);
+
+    if(value == 0) {
+        value = DEFAULT_ICON_MAX_COUNT;
+        purple_prefs_set_int(OPT_ICON_MAX_COUNT, value);
+    }
+    gtk_spin_button_set_value(GTK_SPIN_BUTTON(e), (gdouble)value);
+    g_signal_connect(e, "value-changed",
+                     G_CALLBACK(spin_changed_cb), &e);
+
+
+    /* setup days spin */
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "icon_max_days_spin"));
+    g_object_set_data(G_OBJECT(e), "pref", OPT_ICON_MAX_DAYS);
+
+    spin = GTK_SPIN_BUTTON(e);
+
+    value = purple_prefs_get_int(OPT_ICON_MAX_DAYS);
+    twitter_debug("spin value = %d\n", value);
+
+	adjust = gtk_adjustment_new(value, 1, 180, 1, 10, 10);
+    gtk_spin_button_set_adjustment(spin, GTK_ADJUSTMENT(adjust));
+    gtk_widget_set_size_request(GTK_WIDGET(spin), 50, -1);
+
+    if(value == 0) {
+        value = DEFAULT_ICON_MAX_DAYS;
+        purple_prefs_set_int(OPT_ICON_MAX_DAYS, value);
+    }
+    gtk_spin_button_set_value(GTK_SPIN_BUTTON(e), (gdouble)value);
+    g_signal_connect(e, "value-changed",
+                     G_CALLBACK(spin_changed_cb), &e);
+
+
 
 
     /* sound page */
@@ -2770,6 +2799,43 @@
                      G_CALLBACK(combo_changed_cb), &e);
 
 
+
+
+
+    /* utility page */
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_counter"));
+    g_object_set_data(G_OBJECT(e), "pref", OPT_COUNTER);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
+                                 purple_prefs_get_bool(OPT_COUNTER));
+    g_signal_connect(e, "toggled",
+                     G_CALLBACK(bool_toggled_cb), &e);
+    purple_prefs_connect_callback(plugin, OPT_COUNTER, /* xxx */
+                                  counter_prefs_cb, NULL);
+
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_pseudo"));
+    g_object_set_data(G_OBJECT(e), "pref", OPT_ESCAPE_PSEUDO);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
+                                 purple_prefs_get_bool(OPT_ESCAPE_PSEUDO));
+    g_signal_connect(e, "toggled",
+                     G_CALLBACK(bool_toggled_cb), &e);
+
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_oops"));
+    g_object_set_data(G_OBJECT(e), "pref", OPT_SUPPRESS_OOPS);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
+                                 purple_prefs_get_bool(OPT_SUPPRESS_OOPS));
+    g_signal_connect(e, "toggled",
+                     G_CALLBACK(bool_toggled_cb), &e);
+
+    e = GTK_WIDGET(gtk_builder_get_object (builder, "utility_notify"));
+    g_object_set_data(G_OBJECT(e), "pref", OPT_PREVENT_NOTIFICATION);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(e),
+                                 purple_prefs_get_bool(OPT_PREVENT_NOTIFICATION));
+    g_signal_connect(e, "toggled",
+                     G_CALLBACK(bool_toggled_cb), &e);
+
+
+
+
     gtk_widget_show_all(notebook);
     return notebook;
 }
@@ -2836,20 +2902,19 @@
     purple_prefs_add_bool(OPT_COUNTER, TRUE);
     purple_prefs_add_bool(OPT_SUPPRESS_OOPS, TRUE);
     purple_prefs_add_bool(OPT_PREVENT_NOTIFICATION, FALSE);
-    purple_prefs_add_bool(OPT_SHOW_ICON, TRUE);
 
     purple_prefs_add_bool(OPT_API_BASE_POST, FALSE);
+    purple_prefs_add_int(OPT_API_BASE_GET_INTERVAL, TWITTER_DEFAULT_INTERVAL);
     purple_prefs_add_string(OPT_SCREEN_NAME_TWITTER, EMPTY);
     purple_prefs_add_string(OPT_PASSWORD_TWITTER, EMPTY);
-
-    purple_prefs_add_int(OPT_ICON_SIZE, DEFAULT_ICON_SIZE);
     purple_prefs_add_string(OPT_SCREEN_NAME_WASSR, EMPTY);
     purple_prefs_add_string(OPT_SCREEN_NAME_IDENTICA, EMPTY);
-    purple_prefs_add_int(OPT_API_BASE_GET_INTERVAL, TWITTER_DEFAULT_INTERVAL);
-
+
+    purple_prefs_add_bool(OPT_SHOW_ICON, TRUE);
+    purple_prefs_add_int(OPT_ICON_SIZE, DEFAULT_ICON_SIZE);
+    purple_prefs_add_bool(OPT_UPDATE_ICON, TRUE);
     purple_prefs_add_int(OPT_ICON_MAX_COUNT, DEFAULT_ICON_MAX_COUNT);
     purple_prefs_add_int(OPT_ICON_MAX_DAYS, DEFAULT_ICON_MAX_DAYS);
-
 }
 
 PURPLE_INIT_PLUGIN(pidgin_twitter, init_plugin, info)
--- a/pidgin-twitter.h	Fri Jul 25 07:05:04 2008 +0900
+++ b/pidgin-twitter.h	Fri Jul 25 16:53:43 2008 +0900
@@ -112,6 +112,7 @@
 #define OPT_PASSWORD_TWITTER    OPT_PIDGINTWITTER "/password_twitter"
 #define OPT_SHOW_ICON           OPT_PIDGINTWITTER "/show_icon"
 #define OPT_ICON_SIZE           OPT_PIDGINTWITTER "/icon_size"
+#define OPT_UPDATE_ICON         OPT_PIDGINTWITTER "/update_icon"
 #define OPT_ICON_MAX_COUNT      OPT_PIDGINTWITTER "/icon_max_count"
 #define OPT_ICON_MAX_DAYS       OPT_PIDGINTWITTER "/icon_max_days"
 #define OPT_API_BASE_GET_INTERVAL OPT_PIDGINTWITTER "/api_base_get_interval"
--- a/prefs.ui	Fri Jul 25 07:05:04 2008 +0900
+++ b/prefs.ui	Fri Jul 25 16:53:43 2008 +0900
@@ -218,6 +218,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="label" translatable="yes">Get/post statuses via API</property>
+                    <property name="response_id">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 </child>
@@ -273,7 +274,8 @@
         <child type="tab">
           <object class="GtkLabel" id="label1">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Account</property>
+            <property name="label" translatable="yes">&lt;b&gt;Account&lt;/b&gt;</property>
+            <property name="use_markup">True</property>
           </object>
           <packing>
             <property name="tab_fill">False</property>
@@ -311,6 +313,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="label" translatable="yes">Translate @username to link</property>
+                    <property name="response_id">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 </child>
@@ -331,6 +334,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="label" translatable="yes">Translate sender name to link</property>
+                    <property name="response_id">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 </child>
@@ -351,6 +355,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="label" translatable="yes">Translate #channel name to link (wassr only)</property>
+                    <property name="response_id">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 </child>
@@ -369,7 +374,8 @@
         <child type="tab">
           <object class="GtkLabel" id="label2">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Translation</property>
+            <property name="label" translatable="yes">&lt;b&gt;Translation&lt;/b&gt;</property>
+            <property name="use_markup">True</property>
           </object>
           <packing>
             <property name="position">1</property>
@@ -377,16 +383,16 @@
           </packing>
         </child>
         <child>
-          <object class="GtkVBox" id="vbox4">
+          <object class="GtkVBox" id="vbox1">
             <property name="visible">True</property>
             <child>
-              <object class="GtkAlignment" id="alignment16">
+              <object class="GtkAlignment" id="alignment12">
                 <property name="visible">True</property>
-                <property name="top_padding">4</property>
-                <property name="bottom_padding">4</property>
+                <property name="top_padding">8</property>
+                <property name="bottom_padding">8</property>
                 <property name="left_padding">4</property>
                 <child>
-                  <object class="GtkLabel" id="label18">
+                  <object class="GtkLabel" id="label23">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">&lt;b&gt;Icon&lt;/b&gt;</property>
@@ -394,35 +400,40 @@
                   </object>
                 </child>
               </object>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
             </child>
             <child>
-              <object class="GtkAlignment" id="alignment17">
+              <object class="GtkAlignment" id="alignment39">
                 <property name="visible">True</property>
                 <property name="left_padding">20</property>
                 <child>
-                  <object class="GtkCheckButton" id="utility_show_icon">
+                  <object class="GtkCheckButton" id="icon_show_icon">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="label" translatable="yes">Show icon in conversation</property>
+                    <property name="response_id">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 </child>
               </object>
               <packing>
+                <property name="expand">False</property>
                 <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkHBox" id="hbox5">
+              <object class="GtkHBox" id="hbox10">
                 <property name="visible">True</property>
                 <child>
-                  <object class="GtkAlignment" id="alignment18">
+                  <object class="GtkAlignment" id="alignment40">
                     <property name="visible">True</property>
-                    <property name="left_padding">20</property>
+                    <property name="left_padding">40</property>
                     <child>
-                      <object class="GtkLabel" id="label12">
+                      <object class="GtkLabel" id="label24">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Icon size in pixel</property>
+                        <property name="label" translatable="yes">Icon size</property>
                       </object>
                     </child>
                   </object>
@@ -432,11 +443,174 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkAlignment" id="alignment19">
+                  <object class="GtkAlignment" id="alignment41">
+                    <property name="visible">True</property>
+                    <property name="right_padding">4</property>
+                    <child>
+                      <object class="GtkSpinButton" id="icon_icon_size_spin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="climb_rate">1</property>
+                        <property name="snap_to_ticks">True</property>
+                        <property name="numeric">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">GTK_PACK_END</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment45">
                     <property name="visible">True</property>
                     <property name="right_padding">20</property>
                     <child>
-                      <object class="GtkSpinButton" id="utility_icon_size_spin">
+                      <object class="GtkLabel" id="label27">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">pixel</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">GTK_PACK_END</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment17">
+                <property name="visible">True</property>
+                <property name="top_padding">12</property>
+                <property name="bottom_padding">8</property>
+                <property name="left_padding">4</property>
+                <child>
+                  <object class="GtkLabel" id="label26">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Icon Update&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment42">
+                <property name="visible">True</property>
+                <property name="left_padding">20</property>
+                <child>
+                  <object class="GtkCheckButton" id="icon_enable_update">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Enable icon update</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+
+
+            <child>
+              <object class="GtkHBox" id="hbox11">
+                <property name="visible">True</property>
+
+
+
+
+                <child>
+                  <object class="GtkAlignment" id="alignment43">
+                    <property name="visible">True</property>
+                    <property name="left_padding">40</property>
+                    <child>
+                      <object class="GtkLabel" id="label25">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Update every</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+
+
+
+
+
+                <child>
+                  <object class="GtkAlignment" id="alignment44">
+                    <property name="visible">True</property>
+                    <property name="left_padding">30</property>
+                    <property name="right_padding">4</property>
+                    <child>
+                      <object class="GtkSpinButton" id="icon_max_count_spin">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="climb_rate">1</property>
+                        <property name="snap_to_ticks">True</property>
+                        <property name="numeric">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+
+
+
+
+                <child>
+                  <object class="GtkAlignment" id="alignment19">
+                    <property name="visible">True</property>
+                    <property name="left_padding">4</property>
+                    <property name="right_padding">4</property>
+                    <child>
+                      <object class="GtkLabel" id="label3">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">times or</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">GTK_PACK_END</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+
+
+
+
+                <child>
+                  <object class="GtkAlignment" id="alignment16">
+                    <property name="visible">True</property>
+                    <property name="left_padding">4</property>
+                    <child>
+                      <object class="GtkSpinButton" id="icon_max_days_spin">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="climb_rate">1</property>
@@ -452,130 +626,52 @@
                     <property name="position">1</property>
                   </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkAlignment" id="alignment20">
-                <property name="visible">True</property>
-                <property name="top_padding">8</property>
-                <property name="bottom_padding">4</property>
-                <property name="left_padding">4</property>
+
+
+
+
                 <child>
-                  <object class="GtkLabel" id="label19">
+                  <object class="GtkAlignment" id="alignment18">
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Counter&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="left_padding">4</property>
+                    <property name="right_padding">20</property>
+                    <child>
+                      <object class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">days</property>
+                      </object>
+                    </child>
                   </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="pack_type">GTK_PACK_END</property>
+                    <property name="position">0</property>
+                  </packing>
                 </child>
-              </object>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkAlignment" id="alignment21">
-                <property name="visible">True</property>
-                <property name="left_padding">20</property>
-                <child>
-                  <object class="GtkCheckButton" id="utility_counter">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Show text counter widget</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                </child>
+
+
+
+
               </object>
               <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkAlignment" id="alignment22">
-                <property name="visible">True</property>
-                <property name="top_padding">8</property>
-                <property name="bottom_padding">4</property>
-                <property name="left_padding">4</property>
-                <child>
-                  <object class="GtkLabel" id="label20">
-                    <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Misc&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
+                <property name="expand">False</property>
                 <property name="position">5</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkAlignment" id="alignment23">
-                <property name="visible">True</property>
-                <property name="left_padding">20</property>
-                <child>
-                  <object class="GtkCheckButton" id="utility_pseudo">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Escape pseudo command in twitter</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">6</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkAlignment" id="alignment24">
-                <property name="visible">True</property>
-                <property name="left_padding">20</property>
-                <child>
-                  <object class="GtkCheckButton" id="utility_oops">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Suppress oops message</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">7</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkAlignment" id="alignment25">
-                <property name="visible">True</property>
-                <property name="bottom_padding">10</property>
-                <property name="left_padding">20</property>
-                <child>
-                  <object class="GtkCheckButton" id="utility_notify">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">Do not notify incoming message</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">8</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="position">2</property>
           </packing>
         </child>
         <child type="tab">
-          <object class="GtkLabel" id="label3">
+          <object class="GtkLabel" id="label22">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Utility</property>
+            <property name="label" translatable="yes">&lt;b&gt;Icon&lt;/b&gt;</property>
+            <property name="use_markup">True</property>
           </object>
           <packing>
-            <property name="position">2</property>
+            <property name="position">4</property>
             <property name="tab_fill">False</property>
           </packing>
         </child>
@@ -607,6 +703,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="label" translatable="yes">Play sound on a reply to a recipient in the list</property>
+                    <property name="response_id">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 </child>
@@ -738,6 +835,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="label" translatable="yes">Play sound if the sender of the message is in the list</property>
+                    <property name="response_id">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                 </child>
@@ -851,13 +949,141 @@
         <child type="tab">
           <object class="GtkLabel" id="label4">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Sound</property>
+            <property name="label" translatable="yes">&lt;b&gt;Sound&lt;/b&gt;</property>
+            <property name="use_markup">True</property>
           </object>
           <packing>
             <property name="position">3</property>
             <property name="tab_fill">False</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkVBox" id="vbox4">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkAlignment" id="alignment20">
+                <property name="visible">True</property>
+                <property name="top_padding">8</property>
+                <property name="bottom_padding">4</property>
+                <property name="left_padding">4</property>
+                <child>
+                  <object class="GtkLabel" id="label19">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Counter&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment21">
+                <property name="visible">True</property>
+                <property name="left_padding">20</property>
+                <child>
+                  <object class="GtkCheckButton" id="utility_counter">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Show text counter widget</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment22">
+                <property name="visible">True</property>
+                <property name="top_padding">8</property>
+                <property name="bottom_padding">4</property>
+                <property name="left_padding">4</property>
+                <child>
+                  <object class="GtkLabel" id="label20">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Misc&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment23">
+                <property name="visible">True</property>
+                <property name="left_padding">20</property>
+                <child>
+                  <object class="GtkCheckButton" id="utility_pseudo">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Escape pseudo command in twitter</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment24">
+                <property name="visible">True</property>
+                <property name="left_padding">20</property>
+                <child>
+                  <object class="GtkCheckButton" id="utility_oops">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Suppress oops message</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkAlignment" id="alignment25">
+                <property name="visible">True</property>
+                <property name="bottom_padding">10</property>
+                <property name="left_padding">20</property>
+                <child>
+                  <object class="GtkCheckButton" id="utility_notify">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="label" translatable="yes">Do not notify incoming message</property>
+                    <property name="response_id">0</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">5</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">4</property>
+          </packing>
+        </child>
+        <child type="tab">
+          <object class="GtkLabel" id="label12">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">&lt;b&gt;Utility&lt;/b&gt;</property>
+            <property name="use_markup">True</property>
+          </object>
+          <packing>
+            <property name="position">4</property>
+            <property name="tab_fill">False</property>
+          </packing>
+        </child>
       </object>
     </child>
   </object>