Commit Graph

378 Commits

Author SHA1 Message Date
Matthew Barnes 826372c351 Add e_web_view_cursor_image_save().
Prompts the user to choose a destination file and then asynchronously
saves the image under the cursor to the destination file.
2013-07-27 21:24:01 -04:00
Matthew Barnes 3eda7a50de Add e_web_view_cursor_image_copy().
Asynchronously copies the image under the cursor to the clipboard.

This replaces the "cursor-image" property, which attempts to match the
image URI to a subresource from WebKitWebDataSource.  The problem with
that approach is EMailDisplay redirects several URI schemes to its own
custom request handlers which further mutate the URI.  So for example,
a text/html message may use a "cid:" URI to refer to an embedded image,
which EMailDisplay transforms to a "mail:" URI and finally to a "data:"
URI.  The final image URI might not be derivable from the original URI
without retracing the SoupRequest.

The "image-copy" action now calls e_web_view_cursor_image_copy().

This also adds an explicit requirement on gdk-pixbuf-2.0 >= 2.24 for
gdk_pixbuf_new_from_stream_async() / finish().

New functions:

  e_web_view_cursor_image_copy()

Removed functions:

  e_web_view_get_cursor_image()
  e_web_view_set_cursor_image()
2013-07-27 21:24:01 -04:00
Matthew Barnes c71f615a7f Add e_web_view_new_activity().
Returns a new EActivity for an EWebView-related asynchronous operation,
and emits a "new-activity" signal.  By default the EActivity comes loaded
with a GCancellable and sets the EWebView itself as the alert sink (which
means alerts are displayed directly in the content area).  The signal
emission allows the EActivity to be further customized and/or tracked by
the application.
2013-07-27 15:27:13 -04:00
Matthew Barnes 26e659aa33 Add e_web_view_request().
Asynchronously requests data at a URI by way of a SoupRequest to WebKit's
default SoupSession, incorporating both e_web_view_redirect_uri() and the
custom request handlers installed via e_web_view_install_request_handler().

New functions:

  e_web_view_request()
  e_web_view_request_finish()
2013-07-27 15:27:13 -04:00
Matthew Barnes 69837f33cc Add e_web_view_suggest_filename().
Attempts to derive a suggested filename from the given URI for use in a
"Save As" dialog.

By default the suggested filename is the last path segment of the given
URI (the unless the given URI looks like a query), but subclasses can use
other mechanisms for custom URI schemes.  For example, "cid:" URIs in an
email message may refer to a MIME part with a suggested filename in its
Content-Disposition header.
2013-07-27 15:27:09 -04:00
Matthew Barnes 51b74eee72 Add e_web_view_redirect_uri().
Replaces the given URI with a redirected URI as necessary, primarily for
use with custom SoupRequest handlers.  Typically this function would be
called just prior to handing a request off to a SoupSession, such as
from a WebKitWebView "resource-request-starting" signal handler.

Case in point: EMailDisplay now implements the redirect_uri() method,
and calls it from its own "resource-request-starting" signal handler.
2013-07-27 02:16:53 -04:00
Matthew Barnes 14b4291ebd Remove e_web_view_get_uri().
Trivial wrapper for webkit_web_view_get_uri().

Probably made sense while we were transitioning from GtkHTML to WebKit,
but we don't need it anymore.
2013-07-27 02:16:53 -04:00
Matthew Barnes f8864692d1 Remove unused e_web_view_set_enable_frame_flattening(). 2013-07-27 02:16:53 -04:00
Matthew Barnes 785c41cb16 Remove unused e_web_view_get_enable_frame_flattening(). 2013-07-27 02:16:52 -04:00
Matthew Barnes 20d7939ca3 Remove unused e_web_view_frame_get_uri(). 2013-07-27 02:16:52 -04:00
Matthew Barnes b997e37bfc Remove unused e_web_view_frame_load_uri(). 2013-07-27 02:16:52 -04:00
Matthew Barnes 7ed095eefd Remove unused e_web_view_frame_load_string(). 2013-07-27 02:16:52 -04:00
Matthew Barnes c5c6c39c06 Remove unused e_web_view_extract_uri(). 2013-07-27 02:16:52 -04:00
Matthew Barnes 810242e4c9 EWebView: Initialize WebKitWebSettings internally.
Don't expose public API for this.

Even though it's still possible through the WebKitWebView API, we don't
want to encourage setting an arbitrary WebKitWebSettings on an EWebView.

Removed functions:

  e_web_view_set_settings()
  e_web_view_get_default_settings()
2013-07-27 02:16:51 -04:00
Matthew Barnes a87a779e0b ERuleEditor: Remove dead code.
Unfinished undo framework from ages past.

Nice idea I guess, but not worth the complexity.
2013-07-08 20:38:18 -04:00
Matthew Barnes 0ac936cfe3 Remove nautilus-sendto integration.
nautilus-sendto has been stripped of its usefulness in GNOME 3.8.

It no longer has a UI of its own, it just immediately spawns a mail
client with a set of files as attachment arguments for a new message.
There's no reason for Evolution to be invoking it anymore.
2013-07-08 07:44:46 -04:00
Matthew Barnes 5c866713c7 Remove ESEvent.
Nudging EPlugin closer to full removal.

Nothing in Evolution uses this anymore and 3rd-party plugins should be
using EShell's "event::ready-to-start" signal or else GApplication's
"startup" signal.
2013-07-07 20:37:43 -04:00
Matthew Barnes 90cacf75dd Update evolution-shell API documentation. 2013-07-07 11:04:25 -04:00
Matthew Barnes 682328cded Add e_activity_get_last_known_text().
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")
2013-07-06 11:57:57 -04:00
Matthew Barnes 427d93b3df Remove GalViewFactory.
No longer used.
2013-07-05 16:40:51 -04:00
Matthew Barnes cbc2818d65 Remove GalViewFactoryEtable.
No longer used.
2013-07-05 16:40:51 -04:00
Matthew Barnes 61a773db49 GalViewCollection: Load files during instance initialization.
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()
2013-07-05 16:40:51 -04:00
Matthew Barnes 7bb795b299 Remove gal_view_collection_add_factory().
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.
2013-07-05 16:40:50 -04:00
Matthew Barnes 25d2fab96e GalViewCollection: Add a private section. 2013-07-05 16:40:50 -04:00
Matthew Barnes 8445107974 GalViewCollection: Add a "user-directory" property.
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()
2013-07-05 16:40:50 -04:00
Matthew Barnes 695e0dba70 GalViewCollection: Add a "system-directory" property.
Just readable for now, but I plan to make it also construct-only.

New functions:

  gal_view_collection_get_system_directory()
2013-07-05 16:40:50 -04:00
Matthew Barnes 2ce22e2506 Remove unused gal_view_collection_set_default_view(). 2013-07-05 16:40:50 -04:00
Matthew Barnes 8fd95b78a4 Remove unused gal_view_collection_copy_view(). 2013-07-05 16:40:50 -04:00
Matthew Barnes 2996a0503b Remove unused gal_view_collection_append(). 2013-07-05 16:40:50 -04:00
Matthew Barnes 535084860b Remove unused gal_view_collection_get_view_id_by_index(). 2013-07-05 16:40:50 -04:00
Matthew Barnes 562c54612f GalViewCollection: Remove "title" member.
It's set by EShellView but not actually used for anything.

Removed functions:

  gal_view_collection_set_title()
2013-07-05 16:40:50 -04:00
Matthew Barnes 8abe1f3203 GalViewCollection: Remove unused "display-view" signal.
Removed functions:

  gal_view_collection_display_view()
2013-07-05 16:40:50 -04:00
Matthew Barnes 57a3b819e1 GalViewClass: Replace get_type_code() with "type_code" string.
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.
2013-07-05 16:40:49 -04:00
Matthew Barnes 2b9713656b GalViewFactoryEtable: Remove "specification" property.
No longer needed.

Removed functions:

  gal_view_factory_etable_get_specification()
2013-07-05 16:40:49 -04:00
Matthew Barnes 99f04cfe58 Remove gal_view_etable_set_state().
No longer used.
2013-07-05 16:40:49 -04:00
Matthew Barnes c6d3ced98a GalViewEtable: Remove ETableSpecification member.
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.
2013-07-05 16:40:49 -04:00
Matthew Barnes 1f84c2af98 GalViewEtable: Add a private section. 2013-07-05 16:40:49 -04:00
Matthew Barnes a2818bc4ea GalView: Add a private section. 2013-07-05 16:40:49 -04:00
Matthew Barnes c361af7396 GalViewFactory: Remove get_title() method.
No longer used.

Removed functions:

  gal_view_factory_get_title()
2013-07-05 16:40:49 -04:00
Matthew Barnes 7193739a13 GalView: Remove edit() method.
No longer used.

Removed functions:

  gal_view_edit()
2013-07-05 16:40:49 -04:00
Matthew Barnes af39ee96f0 Remove GalViewNewDialog.
No longer user.
2013-07-05 16:40:49 -04:00
Matthew Barnes 70bce028f7 Remove GalDefineViewsModel.
No longer used.
2013-07-05 16:40:49 -04:00
Matthew Barnes 031d11b437 Remove GalDefineViewsDialog.
No longer used.
2013-07-05 16:40:49 -04:00
Matthew Barnes 31b5261fdb EShellView: Add a "view-instance" property.
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
2013-07-05 16:40:48 -04:00
Matthew Barnes d7d08dc168 EShellContent: Remove dangling function declarations.
The e_shell_content_get_view_id() and e_shell_content_set_view_id()
header file declarations have no implementation.
2013-07-03 11:29:03 -04:00
Matthew Barnes b459f80f1f Update evolution-util API docs. 2013-07-02 10:34:12 -04:00
Matthew Barnes f267827d67 ETableSpecification: Implement GInitable.
e_table_specification_new() now takes a table specification filename and
a GError and parses the file as part of instance creation.  If a file or
parse error occurs, e_table_specification_new() returns NULL.

This replaces e_table_specification_load_from_file().

New functions:

  e_table_specification_get_filename()

Removed functions:

  e_table_specification_load_from_file()
2013-07-02 10:34:12 -04:00
Matthew Barnes dfc653bb43 Remove e_tree_set_state().
No longer used.
2013-07-02 10:34:12 -04:00
Matthew Barnes 4d5c0ce60e Remove e_tree_get_state().
No longer used.
2013-07-02 10:34:12 -04:00
Matthew Barnes 3d1514fb67 Remove e_table_set_state().
No longer used.
2013-07-02 10:34:12 -04:00