protected IWorkbenchWindowConfigurer getWindowConfigurer() {
return super.getWindowConfigurer();
}
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
store = GOIMPlugin.getDefault().getPreferenceStore();
if(PlatformUI.getWorkbench().getWorkbenchWindowCount() < 1) {
// I guess this is the main window .. so .. let's set an appropriate size for contact lists
configurer.setInitialSize(new Point(300, 500));
String style = store.getString(PreferenceConstants.P_MAIN_WINDOW_STYLE);
if(style.equals(PreferenceConstants.P_MAIN_WINDOW_STYLE_VALUE_OSDEFAULT)) {
} else if(style.equals(PreferenceConstants.P_MAIN_WINDOW_STYLE_VALUE_TOOL)) {
configurer.setShellStyle(configurer.getShellStyle() | SWT.TOOL);
} else if(style.equals(PreferenceConstants.P_MAIN_WINDOW_STYLE_VALUE_NOBORDER)) {
configurer.setShellStyle(SWT.TOOL | SWT.RESIZE);
}
configurer.setData("isMainWindow",true);
} else {
// This is a secondary window which may be used for chat windows.. so .. make it wider ...
configurer.setInitialSize(new Point(500,400));
}
configurer.setShowMenuBar(store.getBoolean(PreferenceConstants.P_MAIN_WINDOW_DISPLAY_MENUBAR));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setShowPerspectiveBar(true);
configurer.setTitle("Gamers Own Instant Messenger");
logger.finest("WorkbenchWindow.preWindowOpen");
}