Lines 7-12
Link Here
|
7 |
* |
7 |
* |
8 |
* Contributors: |
8 |
* Contributors: |
9 |
* Composent, Inc. - initial API and implementation |
9 |
* Composent, Inc. - initial API and implementation |
|
|
10 |
* Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 192762 |
10 |
******************************************************************************/ |
11 |
******************************************************************************/ |
11 |
package org.eclipse.ecf.presence.ui.chatroom; |
12 |
package org.eclipse.ecf.presence.ui.chatroom; |
12 |
|
13 |
|
Lines 84-89
Link Here
|
84 |
import org.eclipse.swt.layout.GridData; |
85 |
import org.eclipse.swt.layout.GridData; |
85 |
import org.eclipse.swt.widgets.Composite; |
86 |
import org.eclipse.swt.widgets.Composite; |
86 |
import org.eclipse.swt.widgets.Display; |
87 |
import org.eclipse.swt.widgets.Display; |
|
|
88 |
import org.eclipse.swt.widgets.List; |
87 |
import org.eclipse.swt.widgets.Menu; |
89 |
import org.eclipse.swt.widgets.Menu; |
88 |
import org.eclipse.swt.widgets.ScrollBar; |
90 |
import org.eclipse.swt.widgets.ScrollBar; |
89 |
import org.eclipse.swt.widgets.Text; |
91 |
import org.eclipse.swt.widgets.Text; |
Lines 106-111
Link Here
|
106 |
|
108 |
|
107 |
public static final String VIEW_ID = "org.eclipse.ecf.presence.ui.chatroom.ChatRoomManagerView"; //$NON-NLS-1$ |
109 |
public static final String VIEW_ID = "org.eclipse.ecf.presence.ui.chatroom.ChatRoomManagerView"; //$NON-NLS-1$ |
108 |
|
110 |
|
|
|
111 |
public static final String PARTICIPANTS_MENU_ID = "org.eclipse.ecf.presence.ui.chatroom.participantsView"; //$NON-NLS-1$ |
112 |
|
109 |
private static final int RATIO_WRITE_PANE = 1; |
113 |
private static final int RATIO_WRITE_PANE = 1; |
110 |
|
114 |
|
111 |
private static final int RATIO_READ_PANE = 9; |
115 |
private static final int RATIO_READ_PANE = 9; |
Lines 236-241
Link Here
|
236 |
|
240 |
|
237 |
makeActions(); |
241 |
makeActions(); |
238 |
hookContextMenu(); |
242 |
hookContextMenu(); |
|
|
243 |
if (withParticipants) { |
244 |
hookParticipantsContextMenu(); |
245 |
} |
239 |
} |
246 |
} |
240 |
|
247 |
|
241 |
private StyledText createStyledTextWidget(Composite parent) { |
248 |
private StyledText createStyledTextWidget(Composite parent) { |
Lines 331-337
Link Here
|
331 |
}; |
338 |
}; |
332 |
getSite().registerContextMenu(menuMgr, selectionProvider); |
339 |
getSite().registerContextMenu(menuMgr, selectionProvider); |
333 |
} |
340 |
} |
334 |
|
341 |
|
|
|
342 |
private void hookParticipantsContextMenu() { |
343 |
MenuManager menuMgr = new MenuManager(); |
344 |
menuMgr.setRemoveAllWhenShown(true); |
345 |
List list = (List) listViewer.getControl(); |
346 |
Menu menu = menuMgr.createContextMenu(list); |
347 |
list.setMenu(menu); |
348 |
getSite().registerContextMenu(PARTICIPANTS_MENU_ID, menuMgr, listViewer); |
349 |
} |
350 |
|
335 |
private void makeActions() { |
351 |
private void makeActions() { |
336 |
tabSelectAll = new Action() { |
352 |
tabSelectAll = new Action() { |
337 |
public void run() { |
353 |
public void run() { |