[Title] Added dialog icon
authorkh5325.kim <kh5325.kim@samsung.com>
Wed, 21 Mar 2012 12:48:16 +0000 (21:48 +0900)
committerkh5325.kim <kh5325.kim@samsung.com>
Wed, 21 Mar 2012 12:48:16 +0000 (21:48 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#] 4466
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManager.java

index 7ca5bbb..2cc40d3 100644 (file)
@@ -37,8 +37,10 @@ import java.util.concurrent.CopyOnWriteArrayList;
 import org.eclipse.cdt.managedbuilder.core.IConfiguration;
 import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -74,6 +76,7 @@ import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.ui.console.MessageConsoleStream;
 
+import org.osgi.framework.Bundle;
 import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.console.ConsoleManager;
 
@@ -230,6 +233,14 @@ public class PackageManager extends Dialog {
                this.tabIndex = tabIndex;
        }
        
+       private void setImage(Shell parentShell) {
+               try {
+                       Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID);
+                       parentShell.setImage(new Image(Display.getCurrent(), FileLocator.toFileURL(bundle.getEntry("icons/package_installer.gif")).getPath()));
+               } catch (Exception e) {
+               }
+       }
+       
        protected void setShellStyle(int newShellStyle) {
                int newStyle = newShellStyle & ~SWT.APPLICATION_MODAL;
                newStyle |= SWT.MODELESS;
@@ -255,6 +266,7 @@ public class PackageManager extends Dialog {
                newShell.setText("Package Manager");
                newShell.setLocation(100, 100);
                newShell.setSize(960, 600);
+               setImage(newShell);
        }
        
        @Override