- Move the attachment button(s) out of the headerbar into the action bar
- Add a cancel button
- Adjust some margins
- Set popover positions to top
- Remove subject from headerbar title to save horizontal space
In ccb11359, the composer headerbar was set to have a close button by
default. This caused the reply composer to have a close button that
would close the entire window. This commit reverts that part of
ccb11359.
Now we have undo support for sending, saving and discarding composers,
don't prompt when closing in-main-window composers in most cases.
It retains prompting for detached composers, since it may not be obvious
how to undo that (although it is supported), also when closing the main
window completely (for the same reason), and when quitting the app.
Rather than scattering the composer's detached/paned/inline mode all
over the code base, make it settable only by the containers it is
embedded in, since in that's what actually determines it.
This also lets composers be re-added to the main window if needed.
Fixes Bug 793710.
* src/client/composer/composer-headerbar.vala (ComposerHeaderbar): Ensure
we actually get notified when the user changes their decoration prefs
and update detach button location correctly.
* ui/composer-headerbar.ui: Make start detach button's image visible by
default.
Don't rely ComposerState::state notify and property bindings firing when
the value hasn't actually changed to update the composer's UI. This is
works around Vala Bug 631267 landing.
* src/client/composer/composer-headerbar.vala (ComposerHeaderbar): Add
signal and methods to be called explicity on state changes, rather than
relying on being notified of ComposerWidget::state changing.
* src/client/composer/composer-widget.vala (ComposerWidget): Hook up new
ComposerHeaderbar signal and method. Remove notify and property
bindings on ::state property, move related code to new
::update_composer_view method and call that as needed. Remove
overridden ::show_all, because the UI state should now always be
consistent with ::state. Clean up various methods.
* src/client/composer/email-entry.vala (EmailEntry::EmailEntry): Make
widget visible by default, since we are no longer calling
ComposerWidget::show_all().
* src/client/application/geary-controller.vala: Don't call show all on
new composers, they now manage their visibility properly.
* ui/composer-headerbar.ui: Make toolbar icons visible by default.
* ui/composer-widget.ui: Make toolbar icons visible by default, set Send
button icon here rather than in the class.
* src/client/application/geary-controller.vala
(GearyController::archive_or_delete_selection_async): Don't modify the
focus after archiving/trashing/deleting.
* src/client/components/pill-toolbar.vala, ui/composer-headerbar.ui,
ui/composer-widget.ui: Ensure all toolbar buttons are focusable but
have focus-on-click disabled.
Now using these instead of the old composer's actions. This led to quite
some changes:
* Use GLib.ActionEntry instead of Gtk.ActionEntry in
composer-widget.vala
* Action names can now be specified in the UI files.
* Use templates for the ComposerHeaderBar. Remove
Pillbar as superclass, since that was no longer necessary.
* Merge ComposerToolbar into ComposerWidget.
* Since actions can now be parameterized, some methods could be
merged (e.g. font size methods).
* The menu button in the composer now automatically uses a popover.
* Some methods and classes really deserved more comments.
* necessary POTFILES.in changes
Signed-off-by: Niels De Graef <nielsdegraef@gmail.com>