How can I register OverlayIcon.dll and call it to display overlay icon on the selected file/folder? - overlay-icon-disappear

I read this article in http://www.codeproject.com/KB/shell/overlayicon.aspx. I have some questions that I cannot answer. Please help me?
First, after I build the project. I received an OverlayIcon.dll. I used regsrv32 to register it to Windows. How can I call or do something to enable overlay icon on file?
Whether I will use other program to call functions to enable overlay function on the dll or not ?
And I want to know the location of the file/directory that will be affected by the overlay?
If I select a file and right-click on it, how can I code to enable overlay icon on it?
Please help me, I'm very grateful to you.
Thanks in advance.

You should have implemented the IShellIconOverlayIdentifier::IsMemberOf(LPCWSTR pwszPath, DWORD dwAttrib) method, that tells explorer to show (or not to) the overlay icon.
In pwszPath you have the full path of the file that is currently being analyzed, starting from there you should have all the info in order to determine if the file needs the overlay.
Just return S_OK to display the icon, or S_FALSE to avoid it.
I've successfully used that article "as is".
Be also sure that the .dll is built according to your cpu architecture.

Related

Where is the sap.m.sample.BusyDialogLight.C as mentioned in explored?

In the SAPUI5 control explorer in the busy dialog section there is mention of a sap.m.sample.BusyDialogLight.C control. Essentially this is an unframed dialog with the busy indicator 3-blue blobs image over it. I intend to use this whilst long JSON fetches are running.
My version of OpenUI5 which is v1.40.10 does not have a file or folder with that name in the sap.m.* folders. It only has sap.m.BusyDialog.js which I read (dbg version) and see no obvious mention of a light model.
So can anyone tell me if there is actually a BusyDialogLight control and how to define it?
This is just the controller which handles the view. The name used there is the same as in the view's controllerName attribute. And light is in this context just the BusyDialog without text and buttons.

Hiding workflow re-assign button in Maximo

Is it possible to hide the re-assign button in the workflow dialog box for the users? and if so how?
Thanks
my solution may not be the best one, but it works for me. I hid the button using CSS.
Just go to the Application Designer app and use Export system XML action from Select Action dropdown. Then pick LIBRARY XML and save it somewhere on your disk. Open it (using WordPad preferably, Notepad is causing some issues when importing back to Maximo) and CTRL+F find Complete workflow assignment dialog. Go down a bit and you'll see <pushbutton> with label Reassignment:
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" value="reassign"/>
Add textcss="reassign_btn" (the name is up to you of course)
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" textcss="reassign_btn" value="reassign"/>
Then save the file and import LIBRARY.xml back to the Maximo using Application Designer app again. Then just edit your maximo.css file (located somewhere in \applications\maximo\maximouiweb\webmodule\webclient\ depending on which skin you are using) and add:
.reassign_btn { visibility: hidden; }
Hope this helps :-)

How to programmatically change help contents in Eclipse?

I have an eclipse plugin and I would like to programmatically disable help content TOC's based on a variable I define. In a nut shell, I want to prevent some help docs from showing up in the help contents if a specific type of user is accessing the plugin.
Preferably I would like to do this in the ApplicationWorkbenchAdvisor somewhere.
One thought would be to modify the "primary" value to be false if the variable were set.
Not sure if it would work, but try using the org.eclipse.ui.activities extension point. The tutorial from Vogella tells it is possible to hide only UI elements like wizards, views and so on, but it is from 2009.. Not sure if hiding TOC is now possible. If you try it out, would be nice to give a feedback ;)

Faking a GTK_RESPONSE_OK in a GTK dialog

I want to have a gtk_file_chooser_dialog that does not browse into a folder if it has a specific name. For this I hooked up my dialog with a callback when a current-folder-changed signal is emitted. In the callback function I successfully detect if the selected folder has the specific name. However, I can't figure out how to tell the dialog to close itself and return a specific response code (e.g. GTK_RESPONSE_OK).
I have unsuccessfully tried (among other things):
g_signal_emit_by_name(G_OBJECT(my_dialog), "response", GTK_RESPONSE_OK);
Has anyone a better idea ? I would appreciate any pointers into the right direction..
cheers
You're trying too hard. Just use:
gtk_dialog_response(GTK_DIALOG(my_dialog), GTK_RESPONSE_OK);
See the splendid documentation.

avoid chrome popup extension to close

Is there a function that allow me to select text when the extension
stays open. Normally when I Use the extension popup and I Click outside the
extension the extension close. Is there a wat to avoid this.
Thank you so much
Unfortunately there is currently no way to keep the popup open once you focus out of it. This is by design.
If you would like to always show something while interacting with the page, perhaps the experimental Info bars or even Desktop Notifications would work?
Hope that helped!
The only way to keep it open is to right click over the extension icon (button) and select "Inspect popup" the extension popup then show up and remain open but of course the debugger window show and this not a fix obviously still it will maybe inspire a hack... if someone is skilled enough and share the solution with all of us.
I encountered the same problem and I've thought of a possible solution (though not tested it):
Use your background.html to store the content of the popup action and upon loading the popup, you fetch the content via the default messaging for chrome extensions.
When doing all kinds of other stuff, like XHR's or something, I think you should do that in background.html too, so the requests won't abort if you close and you can do something with the result. Then when a user re-opens the popup, he'll see the result of his previous action instead of the default screen.
Anyone tried something like did already?
As far as I know you can't persist a pop up menu but my workaround has been using a content script to append a menu on page load. After the menu is appended you can toggle the menu via messaging between the background script and the content script.
If you want to encapsulate the menu from the page it's deployed on you could wrap your menu in an iframe. This could add complexity to your project since you would have to deal with cross origin issues and permissions.
There is an alternative hack for this. You can make use of chrome local storage to store the metadata as needed. Upon restart you can read that metadata and render the desired content. You will also probably clear that metadata after you have completed performing the operations based on that.