projects
/
moonshot-ui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactored the IdCard services list to fix new bugs and (hopefully) prevent even...
[moonshot-ui.git]
/
src
/
moonshot-idcard-widget.vala
diff --git
a/src/moonshot-idcard-widget.vala
b/src/moonshot-idcard-widget.vala
index
3b07ce5
..
7a34cf2
100644
(file)
--- a/
src/moonshot-idcard-widget.vala
+++ b/
src/moonshot-idcard-widget.vala
@@
-66,8
+66,6
@@
class IdCardWidget : Box
public void expand()
{
public void expand()
{
- logger.trace("expand");
-
is_selected = true;
update_id_card_label();
is_selected = true;
update_id_card_label();
@@
-77,8
+75,6
@@
class IdCardWidget : Box
public void collapse()
{
public void collapse()
{
- logger.trace("collapse");
-
is_selected = false;
update_id_card_label();
is_selected = false;
update_id_card_label();
@@
-127,7
+123,7
@@
class IdCardWidget : Box
{
// !!TODO: Use a table to format the labels and values
string services_text = "Services: ";
{
// !!TODO: Use a table to format the labels and values
string services_text = "Services: ";
- string service_spacer = " ";
+ string service_spacer = "
\n
";
var label_text = Markup.printf_escaped("<big>%s</big>", this.id_card.display_name);
var label_text = Markup.printf_escaped("<big>%s</big>", this.id_card.display_name);
@@
-136,14
+132,7
@@
class IdCardWidget : Box
label_text += "\nUsername: " + id_card.username;
label_text += "\nRealm: " + id_card.issuer;
label_text += "\nUsername: " + id_card.username;
label_text += "\nRealm: " + id_card.issuer;
- var sep = "";
- for (int i = 0; i < id_card.services.length; i++)
- {
- services_text += sep;
- services_text += id_card.services[i];
-
- sep = "\n" + service_spacer;
- }
+ services_text += this.id_card.get_services_string(service_spacer);
label_text += "\n" + services_text;
}
label_text += "\n" + services_text;
}