+static void presence_changed(GtkComboBox *combo_box, gpointer data)
+{
+ XMPPPresence *pres;
+ XMPPConnection *connection = data;
+ OFAutoreleasePool *pool = [OFAutoreleasePool new];
+
+ const char *status = gtk_combo_box_get_active_id(combo_box);
+
+ if (!strcmp(status, "unavailable"))
+ pres = [XMPPPresence presenceWithType: @"unavailable"];
+ else {
+ pres = [XMPPPresence presence];
+ if (strcmp(status, "available"))
+ [pres addShow: @(status)];
+ }
+
+ [connection sendStanza: pres];
+
+ [pool release];
+}
+