Cleaned up

This commit is contained in:
Tristan B. Kildaire 2020-10-20 08:06:16 +02:00
parent 65eb2d2518
commit 700ccfa3c0
1 changed files with 6 additions and 26 deletions

View File

@ -155,19 +155,13 @@ public final class Channel
return userLabel; return userLabel;
} }
private bool userLabelHoverHandler(int,int,bool, Tooltip d, Widget poes) private bool userLabelHoverHandler(int,int,bool, Tooltip tooltip, Widget poes)
{ {
import std.stdio;
writeln("ttoltip activatd");
/* The username hovered over */ /* The username hovered over */
string userHover = (cast(Label)poes).getText(); string userHover = (cast(Label)poes).getText();
/* Fetch the status message */ /* Fetch the status message */
string[] statusMessage = split(client.getMemberInfo(userHover), ","); string[] statusMessage = split(client.getMemberInfo(userHover), ",");
writeln(statusMessage);
/* First one is prescence */ /* First one is prescence */
string prescence = statusMessage[0]; string prescence = statusMessage[0];
@ -175,27 +169,13 @@ public final class Channel
/* Netx is status message */ /* Netx is status message */
string status = statusMessage[1]; string status = statusMessage[1];
d.setIconFromIconName(statusToGtkIcon(prescence), GtkIconSize.DIALOG); /* Set the icon */
tooltip.setIconFromIconName(statusToGtkIcon(prescence), GtkIconSize.DIALOG);
// d.setText(); /* Set the text */
d.setMarkup("<b>"~userHover~"</b>\n"~prescence~"\n<i>"~status~"</i>"); tooltip.setMarkup("<b>"~userHover~"</b>\n"~prescence~"\n<i>"~status~"</i>");
// /* The notification box */ /* TODO: Point of return value? */
// Box notificationBox = new Box(GtkOrientation.VERTICAL, 1);
// Label title = new Label((cast(Label)poes).getText());
// Label status = new Label("status goes here");
// notificationBox.add(title);
// notificationBox.add(status);
// import gtk.Style;
// // title.setStyle(new Style());
// d.setCustom(notificationBox);
return 1; return 1;
} }