Thunderbird extension: add button in message reader toolbar - xul

I'm trying to add a button in the message reader toolbar :
I successfully added a button in the mail toolbar, using the chrome.manifest and XUL files. I just don't know how to access this particular toolbar. I have tried finiding it using the DOM Inspector, to no avail.
My button doesn't appear in the "Customize" box either.
My question is therefore: how can I add a button to this particular toolbar?

After looking some more with the DOM Inspector I finally got it.
The toolbar and toolbox ids are header-view-toolbar and header-view toolbox and the classes are inline-toolbar and inline-toolbox. The CSS class for buttons is msgHeaderView-button. The XUL for adding a button there should look like this:
<toolbarpalette id="header-view-toolbar">
<toolbarbutton id="my-button"/>
</toolbarpalette>
<toolbarbutton id="my-button"
label="This is my button!"
tooltiptext="Click on it!"
oncommand="MyButton[1]()"
class="toolbarbutton-1 msgHeaderView-button my-button"
/>

Related

robotframework- unable to click a button on a modal dialogue box

when I open a particular webpage it has a EULA form that appears on top of the home page in the form of a modal in HTML/CSS. I have tried the XPath of the accept button but it says element not found also tried using handle alert.
is there a unique way to handle a dialogue box in robotframework?
image of HTML in inspect view
SeleniumLibrary.Set Focus To Element ${button_on_popup_page}
SeleniumLibrary.Click Element ${button_on_popup_page}
I figured it out, shown in the above code. I first set focus to the button and then used the click element. This seemed to work.

dojox form uploader button is clickable only on the border, but not on the full button

I am using IE8
I have created dojo button as below
It has displayed button "Select Files".
Problem
When I click on top border of button its working fine. When I click on any other places on button file picker dialogbox is not displaying.
When I right click on button and select zoom in option once, I am able to click on all the coordinates of button(after selecting zoom option, it works similar to html button).
Note: I have used flash for multiple file selection.
Please tell how to make this button work by clicking in any place.
Have you checked if there is other element's borders in front of the button? Try to check with the developer tools option activated on your browser and select "inspect element" (or similar). If another element is detected when you hover over the button, you have your answer.
Apart from that I have no more ideas.

Print Document opened in QLPreviewController with Right menu button?

I have opened the document (PDF) in QLPreviewController. I want to print that document on clicking right button on the top of the screen. I need code example to print it. I don't want email option over there. thats why I cannot use UIDocumentInteractionController.
With QLPreviewController, what you see is what you get.
You are either stuck with the share button and all the options it gives (print, email, etc) or you rewrite that button yourself using UIActivityViewController.
In your instance of QLPreviewController, you can overwrite that button in viewDidAppear by doing :
[self.navigationItem setRightBarButtonItem:nil];
Note this just removes the button altogether but you can create your own button and add your own sharing options to it as well. See this for more info.

Using Robotium with a contextual menu

I'm testing an application with Robotium, and I have a custom listview with checkboxes. When I click on a checkbox it loads a contextual menu giving the user buttons to modify and delete those items.
I can get Robotium to click the checkbox which loads the menu, but for some reason I can't get it to click on the delete button.
I've tried:
solo.clickOnActionBarItem(R.id.menu_delete);
solo.clickOnMenuItem("Delete");
solo.clickOnImageButton(1);
solo.clickOnImage(1);
So far nothing has worked. Is it possibly because I am clicking the button before the menu has popped up? How can I get Robotium to wait?
It's actually very easy, just click on the view by id:
solo.clickOnView(getActivity().findViewById(R.id.menu_edit));

How to create a nice add button to list view like in the Weather app?

Following these steps:
Open the Weather app.
Right click
Click on places
See that little item with the + symbol? I want to do something exactly like that, the looks and behaviour.
Assuming you are just trying to get some basic ideas about metro-ui controls and you are on Release Preview.
When you do right click, the control that's being triggered is called App Bar. The "place" button is a App Bar Command. Clicking on the button will take you to another page (HTML or XAML). This page contains a ListView control with GridLayout. You can dynamically change the ListView Template and assign different actions to the itemInvoke event.
Here is a quick tutorial for App Bar and commands:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465309.aspx
Here is a quick tutorial for List View control:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465496.aspx