Commit graph

196 commits

Author SHA1 Message Date
Michael Gratton
72b79ece60 po/POTFILES.skip: Skip translating internal plugin descriptors
These plugins are never presented in the UI, hence should not be
translated.
2020-08-19 10:48:40 +10:00
Michael Gratton
ad9ea210e0 po/POTFILES.skip: General cleanup 2020-08-19 10:45:48 +10:00
Michael Gratton
193aaa2281 po/POTFILES.in: Add missing plugin source files 2020-08-18 18:09:26 +10:00
Michael Gratton
7230ea4e69 Plugin.ActionBar: New class added for plugins that use action bars 2020-08-18 16:32:26 +10:00
Michael Gratton
ec44114612 Plugin.Button: Rename to Actionable
Make the name generic so it can be used for things other than buttons
(e.g. menu items).
2020-08-18 16:32:26 +10:00
Michael Gratton
c2a1bae025 Geary.Memory.OffsetBuffer: Remove now unused class 2020-07-30 12:53:11 +10:00
Michael Gratton
4a469d7898 po/POTFILES.in: Add missing lines for email templates files 2020-04-23 14:11:55 +10:00
Michael Gratton
5f2d40bed9 Plugin: Add new Composer object and Application.new_composer method
This allows plugins to create and show new composers for a specific
account.
2020-04-18 18:37:35 +10:00
Michael Gratton
c4b44b41f6 Application.FolderContext: New class for aggregating client folder state
Add new `FolderContext` class to encapsulate client state and policy
about a specific engine folder. Use it for display name, icon and email
count bubble policy for now.

Update AccountContext to maintain a set of folder-policy instances per
account, and convert the folder list over to using the new objects.
2020-04-17 12:28:38 +10:00
Michael Gratton
9952143b30 Application.AccountContext: Break out unto standalone source file 2020-04-17 12:28:38 +10:00
Michael Gratton
8b3e01f11d Application: Rename plugin context objects to make their use clear 2020-04-17 12:28:38 +10:00
Michael Gratton
00f0fb9665 Geary.Logging: Move remaining code from api source to util source
Now that the flags code is gone, move the remaining code from
`src/engine/api/geary-logging.vala` into
`src/engine/util/util-logging.vala`, and remove the former source file.
2020-04-15 17:31:16 +10:00
Michael Gratton
8dcab7f306 Geary.SpecialFolderType: Rename class and related properties, signals
The `SpecialFolderType` was somewhat mis-named, since the special use
does not (in most cases) confer any special type, rather it's simply
defines what a particular folder is used /for/.

As such, rename the enum to to `Geary.Folder.SpecialUse`, moving it in
to the `Folder` class, since it relates specifically to folders, also
rename `Folder::special_folder_type` and
`Folder::special_folder_type_changed` reflect the above and not
duplicate the type name, and similarly rename
`Account::folders_special_type`.

Update the many call sites.
2020-03-31 16:15:57 +11:00
Michael Gratton
d2eec63cfb Util.International: Rename package to I18n to make fn calls less verbose 2020-03-31 15:30:00 +11:00
Michael Gratton
297a59ca80 Merge branch 'mjog/imap-connection-fixes' into 'mainline'
IMAP connection fixes

See merge request GNOME/geary!479
2020-03-30 11:35:18 +00:00
Michael Gratton
9bb7b77f17 Plugin: Add EmailExtension plugin extension type
Add EmailExtension plugin extenion with context object and
Application.EmailContext implementing it. Check for plugins with
this type in PluginManager and init/deinit their contexts as needed.
2020-03-30 21:05:00 +11:00
Michael Gratton
016998359b src/client/plugin: Rename plugin data files so they get translated
Since xgettext doesn't recognise .plugin files as desktop files,
rename them to `….plugin.desktop.in`. Add missing plugins to POFILES.in.
2020-03-30 19:51:01 +11:00
Michael Gratton
b46838f100 Update Geary.Imap.Capabilities handling
Move Capabilities to the api directory and make immutable.

Don't pass around out params to simply increment the revision and use a
field in ClientSession, just use the last capability instance. Ensure
after starting a TLS session capabilities are cleared. Add unit tests
for getting both implicit and explicity capaibilities when initiating
a client session.
2020-03-27 08:29:14 +11:00
Michael Gratton
f0c1dfe375 Application: Make Plugin.EmailStore impl usable by other cxts
Break out the plugin mail store implmeentation out of
NotificationContext into its own EmailStoreFactory class, so it can be
re-used by other plugin context types.
2020-03-21 17:02:08 +11:00
Michael Gratton
0c5c204d31 Plugin: Add new Button class to allow plugins to create buttons 2020-03-20 17:41:57 +11:00
Michael Gratton
0e7d30f8cb Plugins.FolderContext: Add support for showing folder info bars
Add Plugin.InfoBar to allow plugins to describe an info bar, add
methods to FolderContext to allow adding and removing them when
folders are displayed and implement them. Add a InfoBarStack to the
MainWindow for displaying folder info bars.
2020-03-20 17:41:57 +11:00
Michael Gratton
254d10782c plugins: Add support for folder plugins
Add new Plugin.FolderExtension plugin extenion interface, context
object and context object implementation. Populate the context object
when plugins implementing the extension are loaded, and destroy it
on unload.
2020-03-20 17:41:57 +11:00
Michael Gratton
feece66c6e MainWindowInfobar: Rename and derive from common InfoBar widget
Rename to Components.ProblemReportInfoBar to better describe what it
does, and to fit with the code convention for package and file names.

Derive from Components.InfoBar so we can drop the custom GTK Builder
file for it.
2020-03-20 17:08:46 +11:00
Michael Gratton
88516377ca Components.InfoBar: New subclass of Gtk InfoBars with labels 2020-03-20 17:08:46 +11:00
Michael Gratton
190c446499 Components.InfoBarStack: New class for stacking Gtk InfoBars 2020-03-20 17:08:46 +11:00
Piotr Drąg
1ec772ce7b Update POTFILES.in 2020-03-17 16:42:28 +01:00
Michael Gratton
c72ce8d8da Replace FolderList.Tree mail hooks with plugin
Using a plugin to manage folder new mail highlighting so it works in the
same way as for other notifications.
2020-03-17 19:23:24 +11:00
Michael Gratton
154bb2d2c5 Rework and clean up how plugin extensions work
Since libpeas doesn't allow a single plugin instance to have multiple
extensions, define a single libpeas extension as a base class for all
plugins and define extensions as non-libpeas interfaces shared by a
single plugin. Manage loading/unloading these ourselves.

This also defines a new trusted extension interface for plugins that
need access to Geary's internals, new error domain for plugis, and
made the notification context a plugin interface that is implemented by
the application object.
2020-03-17 19:23:24 +11:00
Michael Gratton
ee4bd117ee Convert plugins to use isolated context model
Convert the plugin implementation to use a model where each plugin
has its own context object instances and has limited/no access to the
client's and engine's objects.
2020-03-17 19:23:24 +11:00
Michael Gratton
f72b1354f8 Add stable public interfaces for plugins to use
These interfaces provide a stable, public API for plugins that can
provide API stability while the underlying client and engine APIs
change.
2020-03-17 19:23:24 +11:00
Michael James Gratton
cbe6e0ba9b Revert "Merge branch 'mjog/558-webkit-shared-process' into 'mainline'"
Revert merge request GNOME/geary!374 for now since the shared process
model breaks old-style WebProcess message handler IPC.

This can be un-reverted when out JS is ported to the new Messages API
that is landing in WebKitGTK 2.28.

This reverts commit e4a5b85698, reversing
changes made to 66f6525480.
2020-02-13 12:56:52 +11:00
Michael Gratton
b3fa1446c1 Clean up EmailEntry API
Move into composer namespace and rename to match. Update API for
consistency with style guide. Remove uneeded fields and clarify when
::modified is true. Fix call sites.
2020-02-02 18:15:53 +11:00
Michael Gratton
5eb6bb2a6d Update and simplify SearchBar component
Rename source file name and contents to match code convention, add
transation comments, remove extra API in favour of simply exposing the
search entry publically. Extend Hdy.Searchbar so that the width of the
entry grows as needed.
2019-12-18 09:25:07 +11:00
Michael Gratton
f025f6904d Move SearchFolder management into the client
Rename the search folder again to App.SearchFolder, move its id class
into it as an inner class. Remove search folder from the engine so the
application can manage it and it's policy in the future. Also remove
the outbox from the accout's list of local folders, so that code can
be removed altogether.
2019-12-18 09:25:07 +11:00
Michael Gratton
924104c282 Clean up search folder implementation
Move SearchFolder and search EmailIdentifier implementation out of
ImapDb and into its own package. Decouple both from ImapDB, and improve
the implementation, fixing a few inefficiencies. Merge search
FolderProperties into the SearchFoldern implementation as an inner
class.

Merge SearchTerm into ImapDB.SearchQuery as an inner class and move the
outer class's source down a level, since it was the only file left in
the imap-db/search dir.
2019-12-12 10:47:52 +11:00
Michael Gratton
978ff12810 Rename Geary.Loggable to Geary.Logging.Source
Rename the class because we need to distinguish between logging sources
and logging state, for cases when the logged object's state may change
between being logged and being displayed.

Rename util souce file to match new name space per source code
convernstion.
2019-12-01 19:37:15 +11:00
Piotr Drąg
70dee4794d Update POTFILES.in 2019-11-28 15:37:06 +01:00
Michael Gratton
ceb9c9764a Rename ClientWebView to Components.WebView per code style 2019-11-26 14:26:03 +11:00
Michael Gratton
e11e2bd279 Convert prefs dialog to a HdyPreferencesWindow
Move it to the Components package, use libhandy preferences widgets
for the UI.
2019-11-20 23:16:55 +11:00
Piotr Drąg
7797af7623 Update POTFILES.in 2019-11-18 13:57:50 +01:00
Michael Gratton
239fdce562 Move MainWindow to Application package
Move MainWindow out of the root namespace and add it to Application,
so it can privately share internal state with the Controller. Rename
the source and UI files to match.
2019-11-17 21:38:33 +11:00
Michael Gratton
56876365ba Rename GearyApplication class and source to match code style
Rename `GearyApplication` => `Application.Client` and
`geary-application.vala to `application-client.vala`. Update call sites
and test cases.
2019-11-17 21:38:29 +11:00
Michael Gratton
e426517b30 Rename Config class and source file to match code style
Rename `Configuration` => `Application.Configuration` and
`geary-config.vala to `application-config.vala`. Update call sites and
test cases.
2019-11-17 16:53:42 +11:00
Michael Gratton
a5d72891eb Rework action names groups across the client
Introduce a new standard edit action group "edt" for editing actions
such as copy and undo, separate from the "win" window action group, so
that editing actions can be scoped to specific widgets and overridden
by children. Add new Action namespace with sub-namespaces for the
app, win and edt namespaces and move consts from GearyApplication there.
Update call sites and UI files, use consistent approach to setting up
action groups across all classes that use them.
2019-11-08 10:06:48 +11:00
Michael Gratton
ce1630e09d Add Components.EntryUndo class to manage undo for GTK Entries 2019-11-07 13:01:16 +11:00
Michael Gratton
2d47e4802b Re-select folder, conversation and email on EmailCommand undo
When an EmailCommand is undone, select the folder, conversation and if
relevant scroll to the email in question so as to provide better
context.

This isn't 100% bulletproof, but is about 80% of the way there. The
remainer requires some major Engine rework to decouple local and remote
actions.
2019-11-07 11:58:56 +11:00
Michael Gratton
de6ef699de Clean up attachment save code
Create new Application.AttachmentManager class and move code for saving
attachments there from both Application.Controller and MainWindow since
aside from needing the latter for dialogs it is independent of both.

Create new Components.AttachmentPane widget for diplaying attachents
for an email in the ConversationViewer.

Update ConversationEmail and ConversationMessage to use these two new
classes directly, rather than implementing save management itself or
requiring the MainWindow to wire up signals on these classes.
2019-11-07 11:58:55 +11:00
Michael Gratton
d5e7c05cba Move InAppNotification class to components package
It was the last class left in notifications, so not much point keeping
it there. Also take the opportunity to add it to a package proper.
2019-09-27 19:37:33 +10:00
Michael Gratton
2637b6cabe Convert Libmessagingmenu to MessagingMenu plugin 2019-09-27 19:37:08 +10:00
Michael Gratton
b54bbd42b5 Convert UnityLauncher to NotificationBadge plugin 2019-09-27 19:37:07 +10:00