mirror of https://github.com/deavminet/gustav.git
Added stub handler for clicking channel in channel list.
This commit is contained in:
parent
7f8ae349fe
commit
00482eeccc
|
@ -239,6 +239,7 @@ public final class Channel
|
|||
public void channelJoin(string username)
|
||||
{
|
||||
/* The label to add */
|
||||
/* TODO: Bababooey these `-->` being parsed as HTML for Pango */
|
||||
Label joinLabel = new Label("--> <i>"~username~" joined the channel</i>");
|
||||
joinLabel.setHalign(GtkAlign.START);
|
||||
joinLabel.setUseMarkup(true);
|
||||
|
@ -255,6 +256,7 @@ public final class Channel
|
|||
public void channelLeave(string username)
|
||||
{
|
||||
/* The label to add */
|
||||
/* TODO: Bababooey these `-->` being parsed as HTML for Pango */
|
||||
Label leaveLabel = new Label("<-- <i>"~username~" left the channel</i>");
|
||||
leaveLabel.setHalign(GtkAlign.START);
|
||||
leaveLabel.setUseMarkup(true);
|
||||
|
|
17
source/gui.d
17
source/gui.d
|
@ -144,22 +144,26 @@ public class GUI : Thread
|
|||
statusBox.setTitle("Status");
|
||||
|
||||
|
||||
/* Set available button */
|
||||
ToolButton setAvail = new ToolButton("");
|
||||
setAvail.setLabel("available");
|
||||
setAvail.setIconName("user-available");
|
||||
toolbar.add(setAvail);
|
||||
|
||||
/* Set away button */
|
||||
ToolButton setAway = new ToolButton("");
|
||||
setAway.setLabel("away");
|
||||
setAway.setIconName("user-away");
|
||||
toolbar.add(setAway);
|
||||
|
||||
/* Set busy button */
|
||||
ToolButton setBusy = new ToolButton("");
|
||||
setBusy.setLabel("busy");
|
||||
setBusy.setIconName("user-busy");
|
||||
toolbar.add(setBusy);
|
||||
|
||||
|
||||
/* Assign actions */
|
||||
setAvail.addOnClicked(&setStatus);
|
||||
setAway.addOnClicked(&setStatus);
|
||||
setBusy.addOnClicked(&setStatus);
|
||||
|
@ -169,6 +173,7 @@ public class GUI : Thread
|
|||
|
||||
|
||||
|
||||
/* List channels button */
|
||||
ToolButton channelListButton = new ToolButton("");
|
||||
channelListButton.setIconName("emblem-documents");
|
||||
channelListButton.setTooltipText("List channels");
|
||||
|
@ -281,7 +286,17 @@ public class GUI : Thread
|
|||
channelsList.showAll();
|
||||
}
|
||||
|
||||
win.show();
|
||||
/* TODO: Add handler for clicking label that lets you join the channel */
|
||||
channelsList.addOnRowSelected(&selectChannelNG);
|
||||
|
||||
win.showAll();
|
||||
}
|
||||
|
||||
import gtk.ListBoxRow;
|
||||
|
||||
private void selectChannelNG(ListBoxRow row, ListBox)
|
||||
{
|
||||
writeln(row);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue