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 pango.PgAttribute;
|
||||||
import Connection;
|
import Connection;
|
||||||
|
|
||||||
|
import gogga;
|
||||||
|
|
||||||
public final class Channel
|
public final class Channel
|
||||||
{
|
{
|
||||||
private DClient client;
|
private DClient client;
|
||||||
|
@ -135,6 +137,7 @@ public final class Channel
|
||||||
import gtk.FileChooserDialog; /* TODO: Set parent */
|
import gtk.FileChooserDialog; /* TODO: Set parent */
|
||||||
FileChooserDialog fileChooser = new FileChooserDialog("Send file to "~channelName, null, FileChooserAction.OPEN);
|
FileChooserDialog fileChooser = new FileChooserDialog("Send file to "~channelName, null, FileChooserAction.OPEN);
|
||||||
fileChooser.run();
|
fileChooser.run();
|
||||||
|
gprintln("Selected file: "~fileChooser.getFilename());
|
||||||
}
|
}
|
||||||
|
|
||||||
import gtk.EditableIF;
|
import gtk.EditableIF;
|
||||||
|
|
|
@ -32,20 +32,35 @@ public final class ProfileWindow
|
||||||
/* Create a Box for contents */
|
/* Create a Box for contents */
|
||||||
Box profileBox = new Box(GtkOrientation.VERTICAL, 1);
|
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 */
|
/* Create the username label */
|
||||||
Label usernameTitle = new Label("");
|
Label usernameTitle = new Label("");
|
||||||
usernameTitle.setMarkup("<span size=\"20000\">"~username~"</span>");
|
usernameTitle.setMarkup("<span size=\"20000\">"~username~"</span>");
|
||||||
profileBox.add(usernameTitle);
|
profileBox.add(usernameTitle);
|
||||||
|
|
||||||
|
|
||||||
Image profileImage = new Image("/home/deavmi/Downloads/5207740.jpg");
|
/* Display all props (keys) */
|
||||||
//profileWindow.add(profileImage);
|
|
||||||
|
|
||||||
|
|
||||||
string[] props = connection.getClient().getProperties(username);
|
string[] props = connection.getClient().getProperties(username);
|
||||||
profileBox.add(new Label(to!(string)(props)));
|
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.add(profileBox);
|
||||||
profileWindow.showAll();
|
profileWindow.showAll();
|
||||||
|
// profileWindow.unmaximize();
|
||||||
|
// profileWindow.setAttachedTo()
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue