mirror of https://github.com/deavminet/gustav.git
Now show property values too
This commit is contained in:
parent
1420e8e86f
commit
58951da6b0
|
@ -26,6 +26,8 @@ import pango.PgAttributeList;
|
|||
import pango.PgAttribute;
|
||||
import Connection;
|
||||
|
||||
import gogga;
|
||||
|
||||
public final class Channel
|
||||
{
|
||||
private DClient client;
|
||||
|
@ -135,6 +137,7 @@ public final class Channel
|
|||
import gtk.FileChooserDialog; /* TODO: Set parent */
|
||||
FileChooserDialog fileChooser = new FileChooserDialog("Send file to "~channelName, null, FileChooserAction.OPEN);
|
||||
fileChooser.run();
|
||||
gprintln("Selected file: "~fileChooser.getFilename());
|
||||
}
|
||||
|
||||
import gtk.EditableIF;
|
||||
|
|
|
@ -32,20 +32,35 @@ public final class ProfileWindow
|
|||
/* Create a Box for contents */
|
||||
Box profileBox = new Box(GtkOrientation.VERTICAL, 1);
|
||||
|
||||
|
||||
/* Create a Image for the profile picture */
|
||||
Image profileImage = new Image("/home/deavmi/Downloads/logo.png");
|
||||
profileBox.add(profileImage);
|
||||
// profileImage.
|
||||
|
||||
/* Create the username label */
|
||||
Label usernameTitle = new Label("");
|
||||
usernameTitle.setMarkup("<span size=\"20000\">"~username~"</span>");
|
||||
profileBox.add(usernameTitle);
|
||||
|
||||
|
||||
Image profileImage = new Image("/home/deavmi/Downloads/5207740.jpg");
|
||||
//profileWindow.add(profileImage);
|
||||
|
||||
|
||||
/* Display all props (keys) */
|
||||
string[] props = connection.getClient().getProperties(username);
|
||||
profileBox.add(new Label(to!(string)(props)));
|
||||
|
||||
/* Display all prop values */
|
||||
string[] propValues;
|
||||
foreach(string property; props)
|
||||
{
|
||||
propValues ~= connection.getClient().getProperty(username, property);
|
||||
}
|
||||
profileBox.add(new Label(to!(string)(propValues)));
|
||||
|
||||
|
||||
|
||||
profileWindow.add(profileBox);
|
||||
profileWindow.showAll();
|
||||
// profileWindow.unmaximize();
|
||||
// profileWindow.setAttachedTo()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue