diff --git a/README.md b/README.md index 8de0f22..c86a368 100644 --- a/README.md +++ b/README.md @@ -101,8 +101,14 @@ requires 'cn.ieclipse.pde.explorer 4.1.0' but it could not be found ## 问题提交 +提交问题前,请参考[常见问题](https://github.com/Jamling/SmartIM/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98) + 任何问题包括建议均可以在[Issue](https://github.com/Jamling/SmartQQ4Eclipse/issues)中提交 如果为Issue,建议带上eclipse版本及本插件版本信息(可以在Preference->SmartQQ中查看并复制版本信息) +## 开发 + +如果您对本项目感兴趣,请fork本项目,源代码下载完成之后,会有编译错误,需要将依赖的smartim-core等三个工程从build path中移除,并将libs下的core-x.x.x.jar, smartqq-x.x.x.jar, wechat.x.x.x.jar添加到build path. + [Eclipse Explorer]: https://github.com/Jamling/eclipse-explorer diff --git a/cn.ieclipse.smartqq.feature/feature.xml b/cn.ieclipse.smartqq.feature/feature.xml index 8488512..744d130 100644 --- a/cn.ieclipse.smartqq.feature/feature.xml +++ b/cn.ieclipse.smartqq.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/cn.ieclipse.smartqq/META-INF/MANIFEST.MF b/cn.ieclipse.smartqq/META-INF/MANIFEST.MF index 3671e7f..059f10f 100644 --- a/cn.ieclipse.smartqq/META-INF/MANIFEST.MF +++ b/cn.ieclipse.smartqq/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SmartQQ Bundle-SymbolicName: cn.ieclipse.smartqq;singleton:=true -Bundle-Version: 3.1.3.qualifier +Bundle-Version: 3.1.4.qualifier Bundle-Activator: cn.ieclipse.smartim.IMPlugin Bundle-Vendor: ieclipse.cn Require-Bundle: org.eclipse.ui, diff --git a/cn.ieclipse.smartqq/src/cn/ieclipse/smartim/common/Notifications.java b/cn.ieclipse.smartqq/src/cn/ieclipse/smartim/common/Notifications.java index f85de2c..932a380 100644 --- a/cn.ieclipse.smartqq/src/cn/ieclipse/smartim/common/Notifications.java +++ b/cn.ieclipse.smartqq/src/cn/ieclipse/smartim/common/Notifications.java @@ -1,13 +1,9 @@ package cn.ieclipse.smartim.common; -import java.awt.Insets; -import java.awt.Toolkit; import java.lang.reflect.Method; import java.util.Timer; import java.util.TimerTask; -import javax.swing.JFrame; - import org.eclipse.core.runtime.Platform; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; @@ -40,9 +36,9 @@ public class Notifications extends Shell { public static void main(String args[]) { try { final Display display = Display.getDefault(); -// Notifications.getInstance(new Shell(display)).setMock(true) -// .setMessage(null, "test"); -// Notifications.notify("title", "message"); + // Notifications.getInstance(new Shell(display)).setMock(true) + // .setMessage(null, "test"); + // Notifications.notify("title", "message"); Notifications instance = new Notifications(display); instance.open(); instance.layout(); @@ -69,7 +65,7 @@ public static void main(String args[]) { * @wbp.parser.constructor */ public Notifications(Display display) { - this(display, SWT.ON_TOP | SWT.CLOSE | SWT.TITLE); + this(display, SWT.ON_TOP | SWT.CLOSE | SWT.TITLE); } /** @@ -107,18 +103,19 @@ protected void createContents() { setSize(300, 150); setLayout(new GridLayout(2, false)); - if (Platform.OS_LINUX.equals(Platform.getOS())) - { + if (Platform.OS_LINUX.equals(Platform.getOS())) { fIcon = new Label(this, SWT.NONE); - fIcon.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); - fIcon.setImage(SWTResourceManager.getImage(org.eclipse.ui.IWorkbench.class, - "/icons/full/etool16/delete_edit.png")); + fIcon.setLayoutData( + new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); + fIcon.setImage( + SWTResourceManager.getImage(org.eclipse.ui.IWorkbench.class, + "/icons/full/etool16/delete_edit.png")); fIcon.addMouseListener(new MouseAdapter() { - @Override - public void mouseDown(MouseEvent e) { - setVisible(false); - } - }); + @Override + public void mouseDown(MouseEvent e) { + setVisible(false); + } + }); fTitle = new Label(this, SWT.NONE); fTitle.setText("通知"); @@ -157,10 +154,13 @@ public void widgetSelected(SelectionEvent e) { } }); - Insets sd = Toolkit.getDefaultToolkit().getScreenInsets( - new JFrame().getGraphicsConfiguration()); + Rectangle screen = Display.getDefault().getClientArea(); - screen.height = screen.height - sd.bottom; + if (Platform.OS_LINUX.equals(Platform.getOS())) { + java.awt.Insets sd = java.awt.Toolkit.getDefaultToolkit() + .getScreenInsets(new java.awt.Frame().getGraphicsConfiguration()); + screen.height = screen.height - sd.bottom; + } ta = new TranslateAnimation(screen.width, screen.width - getSize().x, screen.height, screen.height - getSize().y).setTarget(this) .setDuration(300); @@ -219,7 +219,7 @@ private void doSetMessage(String title, CharSequence text) { if (title != null) { this.setText(title); if (fTitle != null) { - fTitle.setText(title); + fTitle.setText(title); } } this.fText.setText(text == null ? "" : text.toString());