Commit e6131f4a authored by Christian Persch's avatar Christian Persch

widget: Improve API name

Synchronous functions should be named ..._sync.
parent 55364d00
......@@ -68,7 +68,7 @@ vte_terminal_set_cjk_ambiguous_width
vte_terminal_get_cjk_ambiguous_width
vte_terminal_set_encoding
vte_terminal_get_encoding
vte_terminal_write_contents
vte_terminal_write_contents_sync
vte_terminal_search_find_next
vte_terminal_search_find_previous
vte_terminal_search_get_gregex
......
......@@ -395,7 +395,7 @@ class Window : Gtk.ApplicationWindow
try {
var file = GLib.File.new_for_commandline_arg(App.Options.output_filename);
var stream = file.replace(null, false, GLib.FileCreateFlags.NONE, null);
terminal.write_contents(stream, Vte.WriteFlags.DEFAULT, null);
terminal.write_contents_sync(stream, Vte.WriteFlags.DEFAULT, null);
} catch (Error e) {
printerr("Failed to write output to \"%s\": %s\n",
App.Options.output_filename, e.message);
......
......@@ -13381,7 +13381,7 @@ update_timeout (gpointer data)
}
/**
* vte_terminal_write_contents:
* vte_terminal_write_contents_sync:
* @terminal: a #VteTerminal
* @stream: a #GOutputStream to write to
* @flags: a set of #VteWriteFlags
......@@ -13400,15 +13400,13 @@ update_timeout (gpointer data)
* depending on scrollback history and @stream availability for writing.
*
* Returns: %TRUE on success, %FALSE if there was an error
*
* Since: 0.24
*/
gboolean
vte_terminal_write_contents (VteTerminal *terminal,
GOutputStream *stream,
VteWriteFlags flags,
GCancellable *cancellable,
GError **error)
vte_terminal_write_contents_sync (VteTerminal *terminal,
GOutputStream *stream,
VteWriteFlags flags,
GCancellable *cancellable,
GError **error)
{
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
g_return_val_if_fail(G_IS_OUTPUT_STREAM(stream), FALSE);
......
......@@ -105,9 +105,9 @@ destroy_and_quit(VteTerminal *terminal, GtkWidget *window)
stream = G_OUTPUT_STREAM (g_file_replace (file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &error));
if (stream) {
vte_terminal_write_contents (terminal, stream,
VTE_WRITE_DEFAULT,
NULL, &error);
vte_terminal_write_contents_sync (terminal, stream,
VTE_WRITE_DEFAULT,
NULL, &error);
g_object_unref (stream);
}
......
......@@ -361,11 +361,11 @@ void vte_terminal_set_geometry_hints_for_window(VteTerminal *terminal,
GtkWindow *window) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
/* Writing contents out */
gboolean vte_terminal_write_contents (VteTerminal *terminal,
GOutputStream *stream,
VteWriteFlags flags,
GCancellable *cancellable,
GError **error) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
gboolean vte_terminal_write_contents_sync (VteTerminal *terminal,
GOutputStream *stream,
VteWriteFlags flags,
GCancellable *cancellable,
GError **error) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment