Now show property values too

This commit is contained in:
Tristan B. Kildaire 2021-01-28 11:30:43 +02:00
parent 1420e8e86f
commit 58951da6b0
2 changed files with 22 additions and 4 deletions

View File

@ -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;

View File

@ -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()
}
}