firefox extension adding button to existing toolbar - button

I have this add-on bar at the button of my firefox window where several buttons from extensions are shown. How can I add my own button there?

you can open the source code of that bar and add your own button
example (I'm on Windows right now):
C:\%AppData%\Roaming\Mozilla\Firefox\Profiles\PROFILEID.default\extensions\EXTENSION-TO-EDIT-FOLDER\chrome\content

A good way to do this is with the Add-on SDK. You can find documentation on adding an Add-on bar button here.
An additional benefit of using the SDK is that your add-ons won't require a restart after they are installed.

hey it is called a status bar and u should consider putting a statusbar xul element
e.g
<?xml version="1.0"?>
<overlay id="sample"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<statusbar id="status-bar">
<statusbarpanel id="my-panel" label="Hello, World" />
</statusbar>
</overlay>
For more details check this link statusbar attributes, methods and properties

Related

How to change the cancel icon in Xamarin Forms Shell SearchHandler

I have a Xamarin Forms Shell app where I have implemented the Shell SearchHandler. The cancel button shows a book image.
This only occurs on iOS - on Android, there is no cancel button.
My xaml looks like this:
<Shell.SearchHandler>
<controls:RouteSearchHandler
x:Name="RouteSearch"
BackgroundColor="White"
ClearPlaceholderCommand="{Binding ClearSearch}"
ClearPlaceholderIcon="{StaticResource Cancel}"
DisplayMemberName="Street1"
SearchBoxVisibility="{Binding TopSearchVisibility, Converter={StaticResource visibleConvert}}"
ShowsResults="True" />
</Shell.SearchHandler>
How do I change the cancel icon from a book to another fonticon or image?
It seems a potential issue , the team set a default(book) icon on Clear button.
Workaround
You can prepare a small/transparent image and place it in Resources folder in iOS project , and set ClearPlaceholderIcon with it, then the problem should be solved .
And Feel free to file the feature request on github :https://github.com/xamarin/Xamarin.Forms/issues.

No Property of name Image found for Button on Windows Phone

I'm getting an issue I don't understand. I have a Button with an image defined with the following code :
<Button Image="SearchFilterIcon.png"
Grid.Row="0"
Grid.Column="1"
Clicked="OnButtonFilterClicked" />
This works well on Android. The image is displayed on my button but when I launch the Windows Phone application, I get a XamlParseException which says that : No Property of name Image found.
How is it possible? The Button widget isn't the same on Android and Windows Phone?
If you do the following:-
Button objButton1 = new Button();
objButton1.Image = (FileImageSource)ImageSource.FromFile("testImage1.png");
objStackLayout.Children.Add(objButton1);
this.Content = objStackLayout;
Then it will work (via code-behind).
The Button control always had the Image property, even in Xamarin.Forms v1.2.2x, so this is not a new property introduced and nothing to do with having the latest packages installed.
As a workaround perhaps you should consider giving the XAML Button a x:Name as in:-
<Button x:Name="myButton1"/>
And then assign the image from code-behind:-
myButton1.Image = (FileImageSource)ImageSource.FromFile("testImage1.png");
Update 1
This was a case of very old libraries being used (v1.0.6186). Once the project is reupdated to the latest binaries for v1.2.3x, then this works fine.
The Button.Image is available on WP, just as it is on iOS and Android. You probably don't have the latest nuget (1.2.3) installed for WP, or you have multiple versions installed.
The buttons in XAML for Windows Phone simply do not provide an Image property. Thus, you cannot add an image to the button as the API doesn't support this. What you have to do is to create a control template that contains the text and the image.
Button documentation
Try some like:
<Button Click="OnButtonFilterClicked">
<Button.Background>
<ImageBrush Stretch="Fill" ImageSource="/SearchFilterIcon.png"/>
</Button.Background>
</Button>
instead of "Clicked" and "image" properties.

Map Stops App from Loading

I have referenced Windows.Phone.Controls and Windows.Phone.Controls.Toolkit.
When adding a map to the screen with via XML:
<phone:PanoramaItem Header="Location">
<maps:Map x:Name="Map" />
</phone:PanoramaItem>
And adding the Capability in the App Manifest:
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Deployment.Parts>
<Capability Name="ID_CAP_MAP" />
</Deployment.Parts>
Whenever I launch the application, it just stays on the Loading screen. I have added the Capability tag in the AppManifest because it fixed the "First chance exception".
Where am I going wrong? Can anyone see an obvious fix?
Edit
if I take the map off, the app loads perfectly fine.
You don't add capabilities in AppManifest.xml. You add them in WMAppManifest.xml. Just open this file, it has a GUI window where you can tick the caps you want under Capabilities tab.

Icon Property on Button causes Compiler Error

When I attempt to add an icon to a button like this:
<s:Button icon="#Embed(source='assets/logo.jpg')"/>
I receive this error:
Multiple markers at this line:
-Button
-Cannot resolve attribute 'icon' for component type spark.components.Button.
The documentation specifies that you can add an icon like that. See Button Reference.
It is interesting because I can add other Common Styles with no trouble. For example this compiles fine:
<s:Button color="#998877" fontSize="16"/>
What am I goofing up here? Sure it is pretty simple.
Edit: There is also an example right here. The example uses version 4.6. I am on version 4.
I ran into this when I first started using the spark components. I was too was using the original Flex 4 version. They originally didn't support an icon property. You'd have to skin it to get it to work. See the following link:
http://www.flexer.info/2009/06/12/how-to-skin-a-button-with-icon-in-flex-4-sdk-spark/
However, rather than using skins to just add a image to the button, I'd also suggest moving up to flex 4.5 and up. Those include enhancements along with the addition of the icon property to the spark button.

Unstyling the contact-info popup in plone.app.theming on Plone 4.1

I am creating a new plone.app.theming (Diazo) theme for my site. My rules.xml has the rule:
<theme href="theme.html" css:if-content="#visual-portal-wrapper" />
This unstyles many popups, but not the contact-info AJAX popup box, which is empty. I can unstyle it using the following rule:
<notheme css:if-content="body.template-contact-info"/>
but this means that any user visiting that page, and not rendering it in a popup, will see it unstyled.
How can I successfully unstyle the contact-info popup box?
The login form popup is wrapped inside a <div class="pb-ajax">. Just look at the generated HTML that creates the popup and you will find a class or identifier that you can use to select that particular popup.
On the other hand you can also customize the Plone view that creates this piece of HTML. Though it will be much easier to try to get a class or identifier.

Resources