Evolution is still occasionally getting stuck on shutdown, and although
the evolution-shell log domain shows debug messages for activities that
are preventing shutdown, they frequently look like this:
(evolution:13534): evolution-shell-DEBUG: 5 active 'mail' activities:
(evolution:13534): evolution-shell-DEBUG: * (no description)
(evolution:13534): evolution-shell-DEBUG: * (no description)
(evolution:13534): evolution-shell-DEBUG: * (no description)
(evolution:13534): evolution-shell-DEBUG: * (no description)
(evolution:13534): evolution-shell-DEBUG: * (no description)
I think the lack of descriptions is from CamelOperations popping all
their pushed messages, which is correct behavior but doesn't help us
debug the problem.
e_activity_get_last_known_text() returns the most recent _non-empty_
text value set on the EActivity. So our debug message can fall back
to that if the EActivity has no description at shutdown:
(evolution:13534): evolution-shell-DEBUG: * (was "blah, blah, blah")
gal_view_collection_new() now takes system and user directory arguments
and loads GalViews during instance initialization.
Removed functions:
gal_view_collection_set_storage_directories()
gal_view_collection_load()
gal_view_collection_loaded()
EShellView no longer needs help from subclasses other than getting
the needed GalView subclasses registered.
A nice side-effect of this is EShellView subclasses can now use the
G_DEFINE_DYNAMIC_TYPE macro.
No longer needed. Instead, use g_type_ensure() to ensure the necessary
GalView subclasses are registered in the GType system before loading a
GalViewCollection. Best place to ensure types is from GClassInitFunc.
Given a type code string from an XML file, find the appropriate GType by
traversing the GType hierarchy from GAL_TYPE_VIEW and checking the class
structures for a matching type code string.
This completely eliminates the need for what's left of GalViewFactory.
Now it's just a matter of cleaning up the remains.
GalViewInstance and EMailPanedView need access. Currently they're just
using the public GalViewCollection members directly, but those are about
to be sealed up.
Just readable for now, but I plan to make it also construct-only.
(Despite the precendence, I prefer "user" over "local" for the name.)
New functions:
gal_view_collection_get_user_directory()
This is the GType of the GalView instances the factory creates.
Having this information will allow GalViewFactoryClass to do more itself
and be less reliant on subclasses.
All GalView subclasses return a static string in their get_type_code()
methods, so replace the method with a static string pointer directly in
the class structure, and remove the "type-code" GalView property.
Instead, lazily load the state file once an ETable or ETree is attached,
since we need its ETableSpecification to create an ETableState instance.
This means GalViewFactoryEtable can lose its ETableSpecification too.
The "Define Views" dialog is nearly useless. Replace it with a "Delete
Current View" menu item which is only visible for custom views that have
been explicitly saved under a new name.
There's actually no loss of functionality with this commit. Although
some view management tasks now require more clicks, view management in
general is a seldom-used feature and I doubt the dialog's absence will
even be noticed by users, much less missed.
EShellView now holds a reference to the active GalViewInstance. Where
applicable, the EShellView subclass is responsible for keeping this up
to date when the sidebar selection changes.
Holding a reference allows EShellView to implement common actions like
"Save Current View" directly instead pushing it on to subclasses.
New functions:
e_shell_view_get_view_instance
e_shell_view_set_view_instance