mirror of https://github.com/deavminet/gustav.git
Added direct message button to UserNode
This commit is contained in:
parent
4ff60a02c9
commit
e75aee2221
|
@ -237,7 +237,19 @@ public final class Connection : Thread
|
|||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Opens a new tab for a new direct message
|
||||
*
|
||||
* (To be called by a handler, which auto-mutexes)
|
||||
*
|
||||
* 1. Will add a new area
|
||||
* 2. Will add a new tab to the notebook switcher
|
||||
* 3. Will switch the current tab to said tab
|
||||
*/
|
||||
public void addDirectMessage_unsafe(string username)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -317,7 +329,9 @@ public final class Connection : Thread
|
|||
}
|
||||
}
|
||||
|
||||
/* TODO: Update this to do an `instanceof` check for the correct MessageArea sub-type */
|
||||
/**
|
||||
* Attempts to find the Channel object you are looking for
|
||||
*/
|
||||
public Channel findChannel(string channelName)
|
||||
{
|
||||
Channel result;
|
||||
|
|
|
@ -52,9 +52,10 @@ public final class UserNode
|
|||
|
||||
private void initBox()
|
||||
{
|
||||
/* Create a new Box */
|
||||
box = new Box(GtkOrientation.HORIZONTAL, 10);
|
||||
|
||||
/* Layout [Button (Prescence Icon)] - Label <username> */
|
||||
/* Layout [Button (Prescence Icon)] - Label <username> - [Button (Reply Icon)]*/
|
||||
UserButton userButton = new UserButton(username);
|
||||
Image userButtonImg = new Image("user-available", GtkIconSize.BUTTON);
|
||||
userButton.setImage(userButtonImg);
|
||||
|
@ -76,6 +77,13 @@ public final class UserNode
|
|||
/* Add both components */
|
||||
box.add(userButton);
|
||||
box.add(userLabel);
|
||||
|
||||
|
||||
/* Add the direct message button */
|
||||
Button messageButton = new Button();
|
||||
Image messageButtonImg = new Image("mail-forward", GtkIconSize.BUTTON);
|
||||
messageButton.setImage(messageButtonImg);
|
||||
box.add(messageButton);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue