When editing custom messages, preseed the entry with the current status
authorDavyd Madeley <davyd@madeley.id.au>
Fri, 10 Apr 2009 16:54:11 +0000 (16:54 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 10 Apr 2009 16:54:11 +0000 (16:54 +0000)
From: Davyd Madeley <davyd@madeley.id.au>

svn path=/trunk/; revision=2785

libempathy-gtk/empathy-presence-chooser.c

index d362280106de7394f508df7d628862149c184fa3..98a609f57ae1941fcf8410e6d0fbeb1cdc2a8321 100644 (file)
@@ -269,6 +269,7 @@ set_status_editing (EmpathyPresenceChooser *self, gboolean editing)
                        /* unset the focus */
                        gtk_window_set_focus (GTK_WINDOW (window), NULL);
                }
+               gtk_editable_set_position (GTK_EDITABLE (entry), 0);
 
                priv->editing_status = FALSE;
        }
@@ -404,6 +405,12 @@ changed_cb (GtkComboBox *self, gpointer user_data)
                                GTK_ENTRY_ICON_PRIMARY,
                                icon_name);
 
+               /* preseed the status */
+               const char *status = empathy_idle_get_status (priv->idle);
+               priv->block_set_editing++;
+               gtk_entry_set_text (GTK_ENTRY (entry), status);
+               priv->block_set_editing--;
+
                /* grab the focus */
                gtk_widget_grab_focus (entry);