From 700ccfa3c03833186356ac08d45421c3095c4814 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Tue, 20 Oct 2020 08:06:16 +0200 Subject: [PATCH] Cleaned up --- source/Channel.d | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/source/Channel.d b/source/Channel.d index 49788d3..bfaabcc 100644 --- a/source/Channel.d +++ b/source/Channel.d @@ -155,19 +155,13 @@ public final class Channel 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 */ string userHover = (cast(Label)poes).getText(); /* Fetch the status message */ string[] statusMessage = split(client.getMemberInfo(userHover), ","); - writeln(statusMessage); /* First one is prescence */ string prescence = statusMessage[0]; @@ -175,27 +169,13 @@ public final class Channel /* Netx is status message */ string status = statusMessage[1]; - d.setIconFromIconName(statusToGtkIcon(prescence), GtkIconSize.DIALOG); + /* Set the icon */ + tooltip.setIconFromIconName(statusToGtkIcon(prescence), GtkIconSize.DIALOG); - // d.setText(); - d.setMarkup(""~userHover~"\n"~prescence~"\n"~status~""); + /* Set the text */ + tooltip.setMarkup(""~userHover~"\n"~prescence~"\n"~status~""); - // /* The notification box */ - // 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); - - - + /* TODO: Point of return value? */ return 1; }