Now using User properties sub-protocol for prescence and status

This commit is contained in:
Tristan B. Kildaire 2020-10-20 11:34:22 +02:00
parent f51a118348
commit 4d2ff21cc8
4 changed files with 9 additions and 5 deletions

View File

@ -5,7 +5,7 @@
"copyright": "Copyright © 2020, Tristan B. Kildaire",
"dependencies": {
"gtk-d": "~>3.9.0",
"libdnet": "~>0.1.8"
"libdnet": "~>0.1.12"
},
"description": "GTK graphical DNET client",
"license": "GPL v3",

View File

@ -3,7 +3,7 @@
"versions": {
"bformat": "1.0.8",
"gtk-d": "3.9.0",
"libdnet": "0.1.8",
"libdnet": "0.1.12",
"tristanable": "0.1.1"
}
}

View File

@ -170,10 +170,10 @@ public final class Channel
string[] statusMessage = split(client.getMemberInfo(userHover), ",");
/* First one is prescence */
string prescence = statusMessage[0];
string prescence = client.getProperty(userHover, "pres");//statusMessage[0];
/* Netx is status message */
string status = statusMessage[1];
string status = client.getProperty(userHover, "status");//statusMessage[1];
/* Set the icon */
tooltip.setIconFromIconName(statusToGtkIcon(prescence), GtkIconSize.DIALOG);

View File

@ -241,6 +241,8 @@ public class GUI : Thread
/* TODO: Add handler for clicking label that lets you join the channel */
channelsList.addOnSelectedRowsChanged(&selectChannel);
//channelsList.add
win.showAll();
}
@ -282,7 +284,9 @@ public class GUI : Thread
Connection currentConnection = connections[notebook.getCurrentPage()];
/* Set the status */
currentConnection.getClient().setStatus(x.getLabel()~",Hey there");
currentConnection.getClient().setStatus(x.getLabel()~",Hey there"); /* TODO: Remove */
currentConnection.getClient().setProperty("pres", x.getLabel());
currentConnection.getClient().setProperty("status", x.getLabel()~"is plikking");
}
private MenuBar initializeMenuBar()