How to add a close button in a Atom Panel - panel

I'm developing a package for Atom, I have to show long text in a Panel:
this.modalPanel = atom.workspace.addBottomPanel({
item: boxMessage,
visible: true
});
The panel opens just fine but it's impossible for the user to close this panel, I don't know how to add buttons to the created Panel.

Related

Show Assistant Editor missing in Xcode 11?

In Xcode 10, the toolbar had an inter-locking ring icon which showed the assistant editor, it's missing in Xcode 11.
In Xcode 10, the toolbar had an inter-locking ring icon which showed the assistant editor, it's missing in Xcode 11.
The interface has changed a little, but the functionality is still there. The top right corner of the editor pane has two buttons:
Clicking the left button, which looks like lines of text, displays the popup menu, where you can choose various editor configuration options. Clicking the right button just narrows the existing editor and adds another one next to it.
Some of the same options are also available in the Editor menu in the main menu bar.
Update: This is from the Xcode 11 beta release notes, and perhaps more fully explains why the UI was changed:
Editors can be added to any window without needing the Assistant Editor. Editors are added using the “Add Editor” button in the jump bar or the File > New > Editor command. Each editor can now be in one of three modes: “Editor Only”, “Editor and Assistant” or “Editor and Canvas”. The latter two modes automatically show relevant content when available. When using multiple editors, the View > Editor > Focus command can be used to temporarily expand the active editor to fill the entire window, hiding other editors. For source control support, the Code Review button in the Toolbar replaces the Comparison Editor. The “Show Authors” command is now available from the Source Editor’s Editor menu. The SCM Log is now in the Inspector Area. (43806898)
With multiple editors possible in a window, you need editor-specific controls for showing the ancillary views like the assistant editor, author view, etc.
From SMGreenfield's comment:
Sometimes I want to look at a different part of the same darn document. There has always been a way to do this, but it involved jumping through hoops.
Just add another editor: click the Add Editor button in the upper right corner of the editor, or choose File > New > Editor. The new editor will default to showing the same file you were working on in the existing editor.
If new editors show up on the right of the existing editor and you'd prefer them to stack vertically, you can choose View > Change Editor Orientation. If you want them to stack horizontally most of the time (the default) but just want one to show up below, choose File > New > Editor Below.
Shortcuts :
control + option + command + return : Show Assistant Editor
command + return : Show Editor only (hide Assistant Editor)
Using Editor on the Toolbar
It has moved, to show it click on icon with horizontal lines and select Assistant.
In Xcode 11 we now have multiple editor panes. You can summon a second pane, a third pane, as many as you like.
When you have a second pane, it does not have to be an automatic assistant. In other words, the editor pane itself either is an assistant or it is not. So if it is not, it is manual. And if it is, it is automatic.
To toggle between being an assistant and being an ordinary pane, choose Assistant from the Editor menu:
If Assistant is checked, this is an assistant and is automatic. What it displays depends automatically on some other pane.
If Assistant is unchecked, this is an ordinary editor pane and is manual. You can display anything you like in this editor.
In case you can't use Add Editor button just use shortcut:
Cmd + Ctrl + Shift + Enter
Turn Assistant on by navigating to the following in Xcode 11:-
Xcode > Editor > Assistant
For Xcode 11.2.1
command + option + return
or
Main Menu -> Editor -> Line View
it is worth noting, that you can also open the assistant editor by alt-clicking the file

Can't move toolbar item into toolbar menu in Visual Studio customization

I'm using Visual Studio 2017, and I really need a menu with useful buttons in the toolbar, now when I got into the customization menu TOOLS -> Customize -> Commands.
I made a custom menu "MY_MENU" and menu item "Close Project", but for some reason I just can't move the menu item into the menu (see picture). How do I do this?
I believe I had the same problem as the questioner, and managed to solve it, details below.
Note: I use Visual Studio 2015 Professional, but this should apply to later versions as well.
Scenario
I created a new Toolbar FooToolBar, and placed to the toolbars like this:
Goal
To place the "Solution explorer" icon inside the menu.
Problem
Inside the Customize window you can't just drag&drop the item to the menu:
Solution
Inside the Toolbar combobox, a new item appeared, select that:
After this, you will see a new area where you should place the icon you wanted to.
Also, remove the previous icon from the previous, FooToolBar toolbar item.
After doing this, press OK and it will work.
Result
I hope I helped someone. :-)
Warning: After you customize a toolbar or menu, make sure that its check box remains selected in the Customize dialog box. Otherwise, your changes won't persist after you close and reopen Visual Studio.
Adding, removing, or moving a menu on the menu bar
On the menu bar, choose Tools, Customize.
The Customize dialog box opens.
On the Commands tab, leave the Menu bar option button selected, leave Menu Bar selected in the list next to that option, and then perform one of the following sets of steps:
Adding, removing, or moving a toolbar
On the menu bar, choose Tools, Customize.
The Customize dialog box opens.
On the Toolbar tab, perform one of the following sets of steps:
To add a toolbar, choose the New button, specify a name for the toolbar that you want to add, and then choose the OK button.
Customizing a menu or a toolbar
On the menu bar, choose Tools, Customize.
The Customize dialog box opens.
On the Commands tab, choose the option button for the type of element that you want to customize.
In the list for that type of element, choose the menu or toolbar that you want to customize, and then perform one of the following sets of steps:
To add a command, choose the Add Command button.
In the Add Command dialog box, choose an item in the Categories list, choose an item in the Commands list, and then choose the OK button.

Always show project navigator when opening a new window in xcode?

Are there some options somewhere where I can set the defaults, like the project navigator to show when I open a new window in xcode.
I have dual screens and I often double click on a file so I can keep the current file open in a new window, while moving to a new file int he current window.
However I want that new window to have the navigation bar, which I always has to add.
Can I set this by default ?
Xcode offers a way to use custom key bindings to perform several actions. You can find them in the Preferences pane.
You could use these bindings to display Project navigation, toolbar and more right after opening a new window.
As you can see, I added a new action called "Display nav and toolbar", which is binded on "cmd + opt + ctrl + N".
Now every time I use this combination keys, Xcode will show Editor, Navigation, and toolbar for the key window.

problem to pop up a window in firefox plugin

hi
I am creating firefox plugin.I have one button-1.png image and I have added it to customize toolbar.I have used one button.xul file to add button in toolbar.I have also used chrome.manifest, install.rdf,button.css,button.js.
It is showing button in toolbar,I dragged that button and dropped on toolbar.
Now my question is, when I click on that button, I want to pop up a small window.
so please tell me,what should I write in button.xul & button.js to pop up a small window.
How will I get a pop up window,when I click on a button?
What changes I need to do in button.xul & button.js?
You can use the window.open method to open a popup window. Take a look at this link. If you want to open a popup(and not a window) then you can use a panel. You can anchor a panel to an element (say button) when opening it using the openpopup method. Some examples are available here as well.

Is there a way in Safari to default a new tab's focus to the search box?

In the safari browser is there a tweak you can make so that when a new tab is created the main focus point jumps to the search box in the browser or at least to the address bar instead of focusing to the home page?
You can modify Safari like this:
Settings -> General -> New tabs open with: Empty page
This will make the cursor start in the address bar. Which in turn can be used to query a search engine or to directly enter an URL.
If you want the tab to become active immediately then you may want to do:
Settings -> Tabs -> Check: "When a new tab or window opens, make it active"
The default on my system was that the cursor was in the search box within the home page. The home page was: http://search.strtpoint.com/ and "open new tabs with" was "Homepage"
Glims can do this: "Sets the focus on the search field when opening a new window"
Link
I doubt it. That would be up to the browser.

Resources