tootle-linux-client/src/API/StatusVisibility.vala

53 lines
1.3 KiB
Vala
Raw Normal View History

2018-04-15 13:29:55 +02:00
public enum Tootle.StatusVisibility {
PUBLIC,
UNLISTED,
PRIVATE,
DIRECT;
public string to_string() {
switch (this) {
case PUBLIC:
return "public";
case UNLISTED:
return "unlisted";
case PRIVATE:
return "private";
case DIRECT:
return "direct";
default:
assert_not_reached();
}
}
public string get_desc() {
switch (this) {
case PUBLIC:
return _("Post to public timelines");
case UNLISTED:
return _("Don\'t post to public timelines");
case PRIVATE:
return _("Post to followers only");
case DIRECT:
return _("Post to mentioned users only");
default:
assert_not_reached();
}
}
public string get_icon() {
switch (this) {
case PUBLIC:
return "network-workgroup-symbolic";
case UNLISTED:
2018-04-15 14:28:23 +02:00
return "view-private-symbolic";
2018-04-15 13:29:55 +02:00
case PRIVATE:
2018-04-15 14:28:23 +02:00
return "security-medium-symbolic";
2018-04-15 13:29:55 +02:00
case DIRECT:
return "user-available-symbolic";
default:
assert_not_reached();
}
}
}