[gedit/wip/loader-saver: 1/3] GeditDocument: remove the "loading" signal



commit 8f7d73f2fe60ceb82e52116fd6fcbc88c5a11586
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Jun 23 16:50:36 2014 +0200

    GeditDocument: remove the "loading" signal
    
    It was used to report progress information about a file loading. It has
    now been replaced by GtkSourceFileLoader.
    
    Normaly GeditTab was the only user of this signal, plugins don't need
    progress info.

 gedit/gedit-document.c |   36 ------------------------------------
 gedit/gedit-document.h |    4 ----
 2 files changed, 0 insertions(+), 40 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index ebaafec..c7f9f0d 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -135,7 +135,6 @@ enum
 {
        CURSOR_MOVED,
        LOAD,
-       LOADING,
        LOADED,
        SAVE,
        SAVING,
@@ -590,19 +589,6 @@ gedit_document_class_init (GeditDocumentClass *klass)
                              G_TYPE_INT,
                              G_TYPE_BOOLEAN);
 
-
-       document_signals[LOADING] =
-               g_signal_new ("loading",
-                             G_OBJECT_CLASS_TYPE (object_class),
-                             G_SIGNAL_RUN_LAST,
-                             G_STRUCT_OFFSET (GeditDocumentClass, loading),
-                             NULL, NULL,
-                             gedit_marshal_VOID__UINT64_UINT64,
-                             G_TYPE_NONE,
-                             2,
-                             G_TYPE_UINT64,
-                             G_TYPE_UINT64);
-
        document_signals[LOADED] =
                g_signal_new ("loaded",
                              G_OBJECT_CLASS_TYPE (object_class),
@@ -1407,28 +1393,6 @@ document_loader_loading (GeditDocumentLoader *loader,
        {
                document_loader_loaded (loader, error, doc);
        }
-       else
-       {
-               goffset size = 0;
-               goffset read;
-               GFileInfo *info;
-
-               info = gedit_document_loader_get_info (loader);
-
-               if (info && g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_STANDARD_SIZE))
-               {
-                       size = g_file_info_get_attribute_uint64 (info,
-                                                                G_FILE_ATTRIBUTE_STANDARD_SIZE);
-               }
-
-               read = gedit_document_loader_get_bytes_read (loader);
-
-               g_signal_emit (doc,
-                              document_signals[LOADING],
-                              0,
-                              read,
-                              size);
-       }
 }
 
 static void
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index ef6f8ad..1e2e035 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -118,10 +118,6 @@ struct _GeditDocumentClass
                                         gint                 column_pos,
                                         gboolean             create);
 
-       void (* loading)                (GeditDocument    *document,
-                                        goffset           size,
-                                        goffset           total_size);
-
        void (* loaded)                 (GeditDocument    *document,
                                         const GError     *error);
 


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