示例#1
0
        void HandleMucViewProfileActionTriggered()
        {
            var jid    = !String.IsNullOrEmpty(m_SelectedParticipant.RealJID) ? m_SelectedParticipant.RealJID : m_SelectedParticipant.NickJID;
            var window = new ProfileWindow(m_Handler.Account,jid);

            window.Show();
        }
示例#2
0
        void HandleViewProfileActionTriggered()
        {
            var window = new ProfileWindow(m_Handler.Account,((ChatHandler)m_Handler).Jid);

            window.Show();
        }
示例#3
0
 void HandleViewProfileActionTriggered()
 {
     var window = new ProfileWindow(m_Handler.Account, ((ChatHandler)m_Handler).Jid);
     window.Show();
 }
示例#4
0
        void HandleRosterItemMenuTriggered(QAction action)
        {
            // FIXME: Actions should be handled in the controller.

            if (m_MenuDownItem == null)
                return;

            if (action == m_ViewProfileAction) {
                var window = new ProfileWindow(m_MenuDownItem.Account, m_MenuDownItem.Item.JID);
                window.Show();
            } else if (action == m_IMAction) {
                Gui.TabbedChatsWindow.StartChat(m_MenuDownItem.Account, m_MenuDownItem.Item.JID);
            } else if (m_InviteActions.Contains(action)) {
                foreach (Room room in m_MenuDownItem.Account.ConferenceManager.Rooms) {
                    if (room.JID.Bare == action.Text) {
                        Console.WriteLine("Invite: " + m_MenuDownItem.Item.JID);
                        room.Invite(m_MenuDownItem.Item.JID, String.Empty);
                        return;
                    }
                }
            } else if (action == m_EditGroupsAction) {
                var win = new EditGroupsWindow(m_MenuDownItem.Account, m_MenuDownItem.Item);
                win.Show();
            } else if (action == m_RemoveAction) {
                if (QMessageBox.Question(this.TopLevelWidget(), "Synapse", "Are you sure you want to remove this friend?", (uint)QMessageBox.StandardButton.Yes | (uint)QMessageBox.StandardButton.No) == QMessageBox.StandardButton.Yes) {
                    m_MenuDownItem.Account.RemoveRosterItem(m_MenuDownItem.Item.JID);
                }
            }
        }
示例#5
0
 void HandleMucViewProfileActionTriggered()
 {
     var jid = !String.IsNullOrEmpty(m_SelectedParticipant.RealJID) ? m_SelectedParticipant.RealJID : m_SelectedParticipant.NickJID;
     var window = new ProfileWindow(m_Handler.Account, jid);
     window.Show();
 }