Skip to content

Commit

Permalink
처음 로그인시에 도움말(정보)화면 오픈되도록 수정.
Browse files Browse the repository at this point in the history
  • Loading branch information
hangum committed Jun 17, 2016
1 parent 0aecd35 commit 62eb8c5
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 59 deletions.
Expand Up @@ -269,7 +269,7 @@ public void widgetSelected(SelectionEvent e) {
*/
private void generateGoogleOTP() {
if(!btnGetOptCode.getSelection()) {
getShell().setSize(370, 289);
getShell().setSize(370, 294);
textSecretKey.setText(""); //$NON-NLS-1$
labelQRCodeURL.setText(""); //$NON-NLS-1$

Expand All @@ -278,13 +278,13 @@ private void generateGoogleOTP() {

String strEmail = textEMail.getText();
if("".equals(strEmail)) { //$NON-NLS-1$
getShell().setSize(370, 289);
getShell().setSize(370, 294);
btnGetOptCode.setSelection(false);
textEMail.setFocus();
MessageDialog.openWarning(getParentShell(), Messages.get().Warning, Messages.get().NewUserDialog_7);
return;
} else if(!ValidChecker.isValidEmailAddress(strEmail)) {
getShell().setSize(370, 289);
getShell().setSize(370, 294);
btnGetOptCode.setSelection(false);
textEMail.setFocus();
MessageDialog.openWarning(getParentShell(), Messages.get().Warning, Messages.get().NewUserDialog_15);
Expand Down Expand Up @@ -498,7 +498,7 @@ protected void createButtonsForButtonBar(Composite parent) {
*/
@Override
protected Point getInitialSize() {
return new Point(370, 290);
return new Point(370, 294);
}

/**
Expand Down
Expand Up @@ -34,12 +34,12 @@ public class PreferenceDefine extends AdminPreferenceDefine {

/** default home page */
public static final String DEFAULT_HOME_PAGE = "DEFAULT_HOME_PAGE";
public static final String DEFAULT_HOME_PAGE_VALUE = "http://hangum.github.io/TadpoleForDBTools/";//https://sites.google.com/site/tadpolefordb/home";//"https://www.github.com/hangum/TadpoleForDBTools/wiki";
public static final String DEFAULT_HOME_PAGE_VALUE = "http://hangum.github.io/TadpoleForDBTools/index2.html";//https://sites.google.com/site/tadpolefordb/home";//"https://www.github.com/hangum/TadpoleForDBTools/wiki";
// public static final String DEFAULT_HOME_PAGE_EN_VALUE = "https://sites.google.com/site/tadpolefordbtoolsen";

/** default home page use */
public static final String DEFAULT_HOME_PAGE_USE = "DEFAULT_HOME_PAGE_USE";
public static final String DEFAULT_HOME_PAGE_USE_VALUE = "false";
public static final String DEFAULT_HOME_PAGE_USE_VALUE = "true";

/** RDB Result type */
public static final String RDB_RESULT_TYPE = "RDB_RESULT_TYPE";
Expand Down
Expand Up @@ -70,7 +70,7 @@ GeneralPreferencePage_0 = \uB294 \uC22B\uC790\uC774\uC5B4\uC57C \uD569\uB2C8\uB2

GeneralPreferencePage_2 = \uB370\uC774\uD130\uB97C \uC218\uC815\uD558\uB294 \uC911\uC5D0 \uC5D0\uB7EC\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.

GeneralPreferencePage_btnCheckButton_text = \uD648\uD398\uC774\uC9C0 \uC0AC\uC6A9\uC5EC\uBD80
GeneralPreferencePage_btnCheckButton_text = \uC0AC\uC6A9\uC5EC\uBD80

GeneralPreferencePage_grpEmailAccount_text = SMTP \uC11C\uBC84

Expand Down
Expand Up @@ -70,7 +70,7 @@ GeneralPreferencePage_0 = \uB294 \uC22B\uC790\uC774\uC5B4\uC57C \uD569\uB2C8\uB2

GeneralPreferencePage_2 = \uB370\uC774\uD130\uB97C \uC218\uC815\uD558\uB294 \uC911\uC5D0 \uC5D0\uB7EC\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.

GeneralPreferencePage_btnCheckButton_text = \uD648\uD398\uC774\uC9C0 \uC0AC\uC6A9\uC5EC\uBD80
GeneralPreferencePage_btnCheckButton_text = \uC0AC\uC6A9\uC5EC\uBD80

GeneralPreferencePage_grpEmailAccount_text = SMTP \uC11C\uBC84

Expand Down
Expand Up @@ -310,6 +310,8 @@ GroupDBSelected = Choose a group database.

GroupName = Group Name

HELP = HELP

Header = Header

HomePage = Website
Expand Down
Expand Up @@ -320,6 +320,8 @@ GroupDBSelected = \uADF8\uB8F9 \uB370\uC774\uD130\uBCA0\uC774\uC2A4 \uC120\uD0DD

GroupName = \uADF8\uB8F9 \uC774\uB984

HELP = \uB3C4\uC6C0\uB9D0

Header = \uD5E4\uB354

# GenerateSQLUpdateAction_13 = An error has occured while generating UPDATE Query.
Expand Down
Expand Up @@ -607,6 +607,8 @@ public class Messages {

public String MainEditorServiceEndGoPay;

public String HELP;

public static Messages get() {
return RWT.NLS.getISO8859_1Encoded(BUNDLE_NAME, Messages.class);
}
Expand Down
Expand Up @@ -28,14 +28,17 @@
import org.eclipse.ui.part.EditorPart;

import com.hangum.tadpole.commons.google.analytics.AnalyticCaller;
import com.hangum.tadpole.engine.query.sql.TadpoleSystem_UserInfoData;
import com.hangum.tadpole.preference.Messages;
import com.hangum.tadpole.preference.define.PreferenceDefine;
import com.hangum.tadpole.preference.get.GetPreferenceGeneral;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

/**
* 기본 introduction
*
* - 홈페이지에 PLAN정보기술 홈페이지와 올챙이 홈을 랜덤하게 표시되도록 수정합니다. (http://www.pitmongo.co.kr/)
* - 도네이션 회사들은 어떻게 하지?
*
* @author hangum
*
*/
Expand All @@ -44,10 +47,8 @@ public class IntroEditor extends EditorPart {
public static final String ID = "com.hangum.tadpole.rdb.core.editor.intor"; //$NON-NLS-1$
private Text textURL;
private Browser browser;
private Button btnCheckButton;

/** default dona home */
// public static String[] ARRAY_DONATION_HOME_PAGE = {"http://www.xenonix.com"}; //$NON-NLS-1$ //$NON-NLS-2$

public IntroEditor() {
super();
}
Expand Down Expand Up @@ -114,62 +115,43 @@ public void keyReleased(KeyEvent e) {
compositeBody.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
compositeBody.setLayout(new GridLayout(1, false));

browser = new Browser(compositeBody, SWT.NONE);
browser = new Browser(compositeBody, SWT.BORDER);
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

// Group grpDonor = new Group(parent, SWT.BORDER);
// grpDonor.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
// grpDonor.setText(com.hangum.tadpole.rdb.core.Messages.get().IntroEditor_0);
// GridLayout gl_grpDonor = new GridLayout(2, false);
// gl_grpDonor.verticalSpacing = 2;
// gl_grpDonor.marginHeight = 2;
// gl_grpDonor.horizontalSpacing = 2;
// gl_grpDonor.marginWidth = 2;
// grpDonor.setLayout(gl_grpDonor);

// CLabel lblWwwcubridorg = new CLabel(grpDonor, SWT.BORDER);
// lblWwwcubridorg.setData( RWT.MARKUP_ENABLED, Boolean.TRUE );
// lblWwwcubridorg.setImage(ResourceManager.getPluginImage(Activator.PLUGIN_ID, "resources/donor/CUBRID.png")); //$NON-NLS-1$
btnCheckButton = new Button(compositeBody, SWT.CHECK);
btnCheckButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
updateHomePage();
}
});
btnCheckButton.setText(Messages.get().GeneralPreferencePage_btnCheckButton_text);
btnCheckButton.setSelection(true);

// CLabel lblOpenSourceCunsulting = new CLabel(grpDonor, SWT.BORDER);
// lblOpenSourceCunsulting.setImage(ResourceManager.getPluginImage(Activator.PLUGIN_ID, "resources/donor/OpenSourceConsulting.png")); //$NON-NLS-1$
//
// CLabel lblXenonix = new CLabel(grpDonor, SWT.BORDER);
// lblXenonix.setImage(ResourceManager.getPluginImage(Activator.PLUGIN_ID, "resources/donor/xenonix_logo.png")); //$NON-NLS-1$
//
// // dumy
// CLabel lblTadpole = new CLabel(grpDonor, SWT.BORDER);
//// lblTadpole.setImage(ResourceManager.getPluginImage(Activator.PLUGIN_ID, "resources/donor/TadpoleDBHub.png")); //$NON-NLS-1$
//
//// // image text
//// CLabel labelCubrid = new CLabel(grpDonor, SWT.NONE);
//// labelCubrid.setData( RWT.MARKUP_ENABLED, Boolean.TRUE );
//// labelCubrid.setText(Messages.get().IntroEditor_label_text);
//
//// CLabel labelOsci = new CLabel(grpDonor, SWT.NONE);
//// labelOsci.setData( RWT.MARKUP_ENABLED, Boolean.TRUE );
//
// CLabel labelXenonix = new CLabel(grpDonor, SWT.NONE);
// labelXenonix.setData( RWT.MARKUP_ENABLED, Boolean.TRUE );
// labelXenonix.setText("<a href='http://www.xenonix.com' target='_blank'>http://www.xenonix.com</a>");
//
// // dumy
// CLabel labelAllDonerList= new CLabel(grpDonor, SWT.NONE);
// labelAllDonerList.setData( RWT.MARKUP_ENABLED, Boolean.TRUE );
// labelAllDonerList.setText("<a href='https://github.com/hangum/TadpoleForDBTools/wiki/Donor-List' target='_blank'>All donor</a>");

setBrowserURL();

// google analytic
AnalyticCaller.track(this.getClass().getName());
}

/**
* update home page
*/
private void updateHomePage() {
try {
String txtHomePageUse = ""+btnCheckButton.getSelection();
TadpoleSystem_UserInfoData.updateValue(PreferenceDefine.DEFAULT_HOME_PAGE_USE, txtHomePageUse);
} catch(Exception e) {
logger.error("update home page", e);
}
}

/**
* broswer set
*/
private void setBrowserURL() {
setBrowserURL(GetPreferenceGeneral.getDefaultHomePage());
textURL.setText(GetPreferenceGeneral.getDefaultHomePage());
setBrowserURL(GetPreferenceGeneral.getDefaultHomePage());
}

/**
Expand All @@ -182,7 +164,10 @@ private void setBrowserURL(String url) {

boolean boolStartHttp = StringUtils.startsWith(url, "http"); //$NON-NLS-1$
if(boolStartHttp) browser.setUrl(url);
else browser.setUrl("http://" + url); //$NON-NLS-1$
else {
textURL.setText("http://" + url);
browser.setUrl("http://" + url); //$NON-NLS-1$
}
}

@Override
Expand Down
Expand Up @@ -35,7 +35,7 @@ public ImageDescriptor getImageDescriptor() {

@Override
public String getName() {
return Messages.get().HomePage;
return Messages.get().HELP;
}

@Override
Expand All @@ -45,7 +45,7 @@ public IPersistableElement getPersistable() {

@Override
public String getToolTipText() {
return Messages.get().HomePage;
return Messages.get().HELP;
}

}
Expand Up @@ -310,6 +310,8 @@ GroupDBSelected = Choose a group database.

GroupName = Group Name

HELP = HELP

Header = Header

HomePage = Website
Expand Down
Expand Up @@ -320,6 +320,8 @@ GroupDBSelected = \uADF8\uB8F9 \uB370\uC774\uD130\uBCA0\uC774\uC2A4 \uC120\uD0DD

GroupName = \uADF8\uB8F9 \uC774\uB984

HELP = \uB3C4\uC6C0\uB9D0

Header = \uD5E4\uB354

# GenerateSQLUpdateAction_13 = An error has occured while generating UPDATE Query.
Expand Down

0 comments on commit 62eb8c5

Please sign in to comment.