Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 186944 Details for
Bug 306039
[Widgets] Windows 7 Jump List items impose "standard" on arguments passed to new instance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
TaskBar patch
taskbar_patch.txt (text/plain), 4.05 KB, created by
Lukasz Milewski
on 2011-01-17 15:23:36 EST
(
hide
)
Description:
TaskBar patch
Filename:
MIME Type:
Creator:
Lukasz Milewski
Created:
2011-01-17 15:23:36 EST
Size:
4.05 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.swt >Index: Eclipse SWT/common/org/eclipse/swt/SWT.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java,v >retrieving revision 1.205 >diff -u -r1.205 SWT.java >--- Eclipse SWT/common/org/eclipse/swt/SWT.java 3 Jan 2011 12:49:07 -0000 1.205 >+++ Eclipse SWT/common/org/eclipse/swt/SWT.java 17 Jan 2011 20:22:08 -0000 >@@ -3971,7 +3971,39 @@ > */ > public static final String SKIN_ID = "org.eclipse.swt.skin.id"; > >- >+ /** >+ * Key value for setting and getting the executable information >+ * for items in TaskBar. >+ * >+ * @see org.eclipse.swt.widgets.Widget#getData(String) >+ * @see org.eclipse.swt.widgets.Widget#setData(String, Object) >+ * >+ * @since 3.7 >+ */ >+ public static final String TASKBAR_ITEM_EXECUTABLE = "org.eclipse.swt.win32.taskbar.executable"; >+ >+ /** >+ * Key value for setting and getting the arguments information >+ * for items in TaskBar. >+ * >+ * @see org.eclipse.swt.widgets.Widget#getData(String) >+ * @see org.eclipse.swt.widgets.Widget#setData(String, Object) >+ * >+ * @since 3.7 >+ */ >+ public static final String TASKBAR_ITEM_ARGUMENTS = "org.eclipse.swt.win32.taskbar.arguments"; >+ >+ /** >+ * Key value for setting and getting the icon file name >+ * for items in TaskBar. >+ * >+ * @see org.eclipse.swt.widgets.Widget#getData(String) >+ * @see org.eclipse.swt.widgets.Widget#setData(String, Object) >+ * >+ * @since 3.7 >+ */ >+ public static final String TASKBAR_ITEM_ICON = "org.eclipse.swt.win32.taskbar.icon"; >+ > /** > * Answers a concise, human readable description of the error code. > * >Index: Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java,v >retrieving revision 1.8 >diff -u -r1.8 TaskBar.java >--- Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java 4 Mar 2010 22:46:11 -0000 1.8 >+++ Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java 17 Jan 2011 20:22:08 -0000 >@@ -148,10 +148,25 @@ > key = PKEY_Title; > > /*IShellLink::SetPath*/ >- hr = OS.VtblCall (20, pLink, EXE_PATH); >+ char[] exePath = EXE_PATH; >+ if (item.getData(SWT.TASKBAR_ITEM_EXECUTABLE) != null) { >+ exePath = ((String) item.getData(SWT.TASKBAR_ITEM_EXECUTABLE)).toCharArray(); >+ } >+ >+ hr = OS.VtblCall (20, pLink, exePath); > if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT); > >- text = Display.LAUNCHER_PREFIX + Display.TASKBAR_EVENT + item.id; >+ if (item.getData(SWT.TASKBAR_ITEM_ARGUMENTS) != null) { >+ StringBuffer argsBuffer = new StringBuffer(); >+ String[] args = (String[]) item.getData(SWT.TASKBAR_ITEM_ARGUMENTS); >+ for (int i = 0; i < args.length; i++) { >+ argsBuffer.append(args[i] + " "); >+ } >+ text = argsBuffer.toString().trim(); >+ } else { >+ text = Display.LAUNCHER_PREFIX + Display.TASKBAR_EVENT + item.id; >+ } >+ > length = text.length (); > buffer = new char [length + 1]; > text.getChars (0, length, buffer, 0); >@@ -169,10 +184,18 @@ > // hr = OS.VtblCall (7, pLink, buffer); > // if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT); > // } >- >+ > Image image = item.getImage (); >- if (image != null && directory != null) { >- String imageFilename = directory + "\\menu" + item.id + ".ico" ; >+ if (item.getData(SWT.TASKBAR_ITEM_ICON) != null) { >+ String imageFilename = (String) item.getData(SWT.TASKBAR_ITEM_ICON); >+ length = imageFilename.length (); >+ buffer = new char [length + 1]; >+ imageFilename.getChars (0, length, buffer, 0); >+ /*IShellLink::SetIconLocation*/ >+ hr = OS.VtblCall (17, pLink, buffer, 0); >+ if (hr != OS.S_OK) error (SWT.ERROR_INVALID_ARGUMENT); >+ } else if (image != null && directory != null) { >+ String imageFilename = directory + "\\menu" + item.id + ".ico"; > ImageData data; > if (item.hBitmap != 0) { > Image image2 = Image.win32_new (display, SWT.BITMAP, item.hBitmap);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 306039
:
186943
|
186944
|
187285
|
187286