mirror of https://github.com/deavminet/gustav.git
Use the delegate as intended
This commit is contained in:
parent
4c687b06eb
commit
21f60747a6
|
@ -26,26 +26,8 @@ public final class UserNode
|
||||||
initBox();
|
initBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class UserButton : Button
|
private void userButtonClick(Button)
|
||||||
{
|
{
|
||||||
private string username;
|
|
||||||
|
|
||||||
this(string username)
|
|
||||||
{
|
|
||||||
this.username = username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string getUsername()
|
|
||||||
{
|
|
||||||
return username;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void userButtonClick(Button e)
|
|
||||||
{
|
|
||||||
/* The Button will only ever be a UserButton */
|
|
||||||
UserButton button = cast(UserButton)e;
|
|
||||||
|
|
||||||
/* Create a new ProfileWindow */
|
/* Create a new ProfileWindow */
|
||||||
ProfileWindow profileWindow = new ProfileWindow(connection, username);
|
ProfileWindow profileWindow = new ProfileWindow(connection, username);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +38,7 @@ public final class UserNode
|
||||||
box = new Box(GtkOrientation.HORIZONTAL, 10);
|
box = new Box(GtkOrientation.HORIZONTAL, 10);
|
||||||
|
|
||||||
/* Layout [Button (Prescence Icon)] - Label <username> - [Button (Reply Icon)]*/
|
/* Layout [Button (Prescence Icon)] - Label <username> - [Button (Reply Icon)]*/
|
||||||
UserButton userButton = new UserButton(username);
|
Button userButton = new Button();
|
||||||
Image userButtonImg = new Image("user-available", GtkIconSize.BUTTON);
|
Image userButtonImg = new Image("user-available", GtkIconSize.BUTTON);
|
||||||
userButton.setImage(userButtonImg);
|
userButton.setImage(userButtonImg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue