[gedit/wip/loader-saver] GeditDocument: remove load_stream() and load_cancel()



commit 3698f35b0da80f49c5ffda1faba39f4b10e319bb
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Jun 23 16:43:10 2014 +0200

    GeditDocument: remove load_stream() and load_cancel()
    
    It has been replaced by GtkSourceFileLoader in GeditTab.

 gedit/gedit-document.c |   48 ------------------------------------------------
 gedit/gedit-document.h |    8 --------
 2 files changed, 0 insertions(+), 56 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 000172a..ebaafec 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1465,37 +1465,6 @@ gedit_document_load_real (GeditDocument       *doc,
        gedit_document_loader_load (doc->priv->loader);
 }
 
-void
-_gedit_document_load_stream (GeditDocument       *doc,
-                            GInputStream        *stream,
-                            const GeditEncoding *encoding,
-                            gint                 line_pos,
-                            gint                 column_pos)
-{
-       g_return_if_fail (GEDIT_IS_DOCUMENT (doc));
-       g_return_if_fail (G_IS_INPUT_STREAM (stream));
-       g_return_if_fail (doc->priv->loader == NULL);
-
-       gedit_debug_message (DEBUG_DOCUMENT, "load stream");
-
-       /* create a loader. It will be destroyed when loading is completed */
-       doc->priv->loader = gedit_document_loader_new_from_stream (doc, stream, encoding);
-
-       g_signal_connect (doc->priv->loader,
-                         "loading",
-                         G_CALLBACK (document_loader_loading),
-                         doc);
-
-       doc->priv->create = FALSE;
-       doc->priv->requested_encoding = encoding;
-       doc->priv->requested_line_pos = line_pos;
-       doc->priv->requested_column_pos = column_pos;
-
-       gedit_document_set_location (doc, NULL);
-
-       gedit_document_loader_load (doc->priv->loader);
-}
-
 /*
  * _gedit_document_load:
  * @doc: the #GeditDocument.
@@ -1523,23 +1492,6 @@ _gedit_document_load (GeditDocument       *doc,
                       line_pos, column_pos, create);
 }
 
-/*
- * _gedit_document_load_cancel:
- * @doc: the #GeditDocument.
- *
- * Cancel load of a document.
- */
-gboolean
-_gedit_document_load_cancel (GeditDocument *doc)
-{
-       g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), FALSE);
-
-       if (doc->priv->loader == NULL)
-               return FALSE;
-
-       return gedit_document_loader_cancel (doc->priv->loader);
-}
-
 static gboolean
 has_invalid_chars (GeditDocument *doc)
 {
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 6db609c..ef6f8ad 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -231,14 +231,6 @@ void                _gedit_document_load           (GeditDocument       *doc,
                                                 gint                 column_pos,
                                                 gboolean             create);
 
-void            _gedit_document_load_stream    (GeditDocument       *doc,
-                                                GInputStream        *stream,
-                                                const GeditEncoding *encoding,
-                                                gint                 line_pos,
-                                                gint                 column_pos);
-
-gboolean        _gedit_document_load_cancel    (GeditDocument       *doc);
-
 void            _gedit_document_save           (GeditDocument       *doc,
                                                 GeditDocumentSaveFlags flags);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]