Commit graph

13 commits

Author SHA1 Message Date
Michael Gratton
f4d3c54110 ui: Remove can_focus from GTK builder file definitions
GTK widgets set the default for this as needed, and some incorrect
values for this have caused issues with keyboard focus.

Fixes #1059
2021-01-27 21:43:23 +11:00
Michael Gratton
5ab4838a77 ui/composer-headerbar.ui: Fix label not being marked as translatable
Fixes #959
2020-09-01 21:38:32 +10:00
James Westman
d5a5afcc78 composer: More tweaks to match mockups
- 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
2020-01-21 19:43:37 -06:00
James Westman
f6e4109c6e Fix close button in composer
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.
2020-01-03 23:45:25 -06:00
Michael Gratton
808f040a2f Remove shortcuts from composer tooltips
These are rendundant now that the shortcut overlay exists.
2019-11-18 18:31:59 +11:00
Michael Gratton
c5c36ee9b3 Don't prompt when closing in-main-window composers
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.
2019-11-17 20:00:02 +11:00
Michael Gratton
0128d760c0 Clean up how Composer.Widget's presentation mode is updated
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.
2019-11-17 20:00:02 +11:00
Michael James Gratton
67e8a8ab93 Fix composer detach button position & visibility on custom setups.
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.
2018-04-12 11:36:18 +10:00
Michael James Gratton
32f9f17d08 Remove icon from composer's send button her HIG recommendations. 2018-02-13 13:39:07 +11:00
Michael James Gratton
57ca408c53 Fix composer UI brokenness when compiled under vala 0.36.
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.
2017-03-04 13:45:17 +11:00
Michael James Gratton
478ab2d700 Use click-to-focus prop on toolbar buttons rather than other workarounds.
* 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.
2016-10-20 16:58:48 +11:00
Michael James Gratton
41f47bb187 Reverse the text order of Discard/Save and Close buttons in the composer.
c.f. Bug 747627
2016-10-15 18:08:58 +11:00
Niels De Graef
ebd788968b Use GLib.Actions in the composer. Bug 770356.
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>
2016-09-21 15:02:18 +10:00