+ if (type == ENTRY_TYPE_EDIT_CUSTOM)
+ {
+ /* recover the status that was unset because COL_STATUS_TEXT
+ * is "". Unfortunately if you try and set COL_STATUS_TEXT to
+ * NULL, it generates a g_critical. I wonder if there is a
+ * better way around this. */
+ 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--;
+
+ /* attempt to get the toplevel for this widget */
+ GtkWidget *window = gtk_widget_get_toplevel (GTK_WIDGET (self));
+ if (!GTK_WIDGET_TOPLEVEL (window) || !GTK_IS_WINDOW (window))
+ {
+ window = NULL;
+ }
+
+ presence_chooser_dialog_show (GTK_WINDOW (window));
+ }
+ else if (type == ENTRY_TYPE_CUSTOM)