Skip to content

Commit

Permalink
RAD-451: Allow IM ding on every message
Browse files Browse the repository at this point in the history
  • Loading branch information
lkalif committed Mar 8, 2014
1 parent 8f27062 commit d19a45d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
24 changes: 15 additions & 9 deletions Radegast/Core/IMTextManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ namespace Radegast
{
public class IMTextManager
{
private RadegastInstance instance;
private RadegastNetcom netcom { get { return instance.Netcom; } }
private ITextPrinter textPrinter;
private IMTextManagerType Type;
private UUID sessionID;
private string sessionName;
private bool AutoResponseSent = false;
private ArrayList textBuffer;
public bool DingOnAllIncoming = false;

private bool showTimestamps;
RadegastInstance instance;
RadegastNetcom netcom { get { return instance.Netcom; } }
ITextPrinter textPrinter;
IMTextManagerType Type;
UUID sessionID;
string sessionName;
bool AutoResponseSent = false;
ArrayList textBuffer;

bool showTimestamps;

public IMTextManager(RadegastInstance instance, ITextPrinter textPrinter, IMTextManagerType type, UUID sessionID, string sessionName)
{
Expand Down Expand Up @@ -154,6 +156,10 @@ private void ProcessIncomingIM(InstantMessageEventArgs e)
}
}

if (DingOnAllIncoming)
{
instance.MediaManager.PlayUISound(UISounds.IM);
}
PrintIM(DateTime.Now, instance.Names.Get(e.IM.FromAgentID, e.IM.FromAgentName), e.IM.FromAgentID, msg);

if (!AutoResponseSent && Type == IMTextManagerType.Agent && e.IM.FromAgentID != UUID.Zero && e.IM.FromAgentName != "Second Life")
Expand Down
16 changes: 15 additions & 1 deletion Radegast/GUI/Consoles/IMTabWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Radegast/GUI/Consoles/IMTabWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,5 +289,10 @@ private void cbxInput_SizeChanged(object sender, EventArgs e)
{
pnlChatInput.Height = cbxInput.Height + 9;
}

private void cbAlwaysDing_CheckedChanged(object sender, EventArgs e)
{
textManager.DingOnAllIncoming = ((CheckBox)sender).Checked;
}
}
}

0 comments on commit d19a45d

Please sign in to comment.