An unset presence type *does* make sense, but not in these
contexts. As an aside, there is no icon for an unset presence, so
nothing is displayed, which is bad.
Fixes bug #597819
status = empathy_idle_get_status (priv->idle);
flash_state = empathy_idle_get_flash_state (priv->idle);
+ /* An unset presence here doesn't make any sense. Force it to appear as
+ * offline. */
+ if (state == TP_CONNECTION_PRESENCE_TYPE_UNSET) {
+ state = TP_CONNECTION_PRESENCE_TYPE_OFFLINE;
+ }
+
/* look through the model and attempt to find a matching state */
model = gtk_combo_box_get_model (GTK_COMBO_BOX (chooser));
for (valid = gtk_tree_model_get_iter_first (model, &iter);
TpConnectionPresenceType state;
state = empathy_idle_get_state (priv->idle);
+
+ /* An unset presence type here doesn't make sense. Force it
+ * to be offline. */
+ if (state == TP_CONNECTION_PRESENCE_TYPE_UNSET) {
+ state = TP_CONNECTION_PRESENCE_TYPE_OFFLINE;
+ }
+
icon_name = empathy_icon_name_for_presence (state);
}