[gnome-autoar] AutoarExtract: properties related to progress will not be writable



commit 824048dc604f3b5be8c5099d4a30a09997743d3d
Author: Ting-Wei Lan <lantw44 gmail com>
Date:   Fri Sep 13 11:41:08 2013 +0800

    AutoarExtract: properties related to progress will not be writable

 .gitignore                    |    1 +
 gnome-autoar/autoar-extract.c |   54 +++-------------------------------------
 gnome-autoar/autoar-extract.h |    8 ------
 3 files changed, 5 insertions(+), 58 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9c9a95f..246772d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
 *.o
 *.lo
 *.la
+*.bak
 *.stamp
 .deps
 .libs
diff --git a/gnome-autoar/autoar-extract.c b/gnome-autoar/autoar-extract.c
index 0ff36f0..d398d34 100644
--- a/gnome-autoar/autoar-extract.c
+++ b/gnome-autoar/autoar-extract.c
@@ -233,18 +233,6 @@ autoar_extract_set_property (GObject      *object,
       g_clear_object (&(priv->output_file));
       priv->output_file = g_object_ref (g_value_get_object (value));
       break;
-    case PROP_SIZE:
-      autoar_extract_set_size (arextract, g_value_get_uint64 (value));
-      break;
-    case PROP_COMPLETED_SIZE:
-      autoar_extract_set_completed_size (arextract, g_value_get_uint64 (value));
-      break;
-    case PROP_FILES:
-      autoar_extract_set_files (arextract, g_value_get_uint (value));
-      break;
-    case PROP_COMPLETED_FILES:
-      autoar_extract_set_completed_files (arextract, g_value_get_uint (value));
-      break;
     case PROP_SOURCE_IS_MEM:
       priv->source_is_mem = g_value_get_boolean (value);
       break;
@@ -338,40 +326,6 @@ autoar_extract_get_notify_interval (AutoarExtract *arextract)
 }
 
 void
-autoar_extract_set_size (AutoarExtract *arextract,
-                         guint64 size)
-{
-  g_return_if_fail (AUTOAR_IS_EXTRACT (arextract));
-  arextract->priv->size = size;
-}
-
-void
-autoar_extract_set_completed_size (AutoarExtract *arextract,
-                                   guint64 completed_size)
-{
-  g_return_if_fail (AUTOAR_IS_EXTRACT (arextract));
-  g_return_if_fail (completed_size >= arextract->priv->completed_size);
-  arextract->priv->completed_size = completed_size;
-}
-
-void
-autoar_extract_set_files (AutoarExtract *arextract,
-                          guint files)
-{
-  g_return_if_fail (AUTOAR_IS_EXTRACT (arextract));
-  arextract->priv->files = files;
-}
-
-void
-autoar_extract_set_completed_files (AutoarExtract *arextract,
-                                    guint completed_files)
-{
-  g_return_if_fail (AUTOAR_IS_EXTRACT (arextract));
-  g_return_if_fail (completed_files >= arextract->priv->completed_files);
-  arextract->priv->completed_files = completed_files;
-}
-
-void
 autoar_extract_set_output_is_dest  (AutoarExtract *arextract,
                                     gboolean output_is_dest)
 {
@@ -1184,7 +1138,7 @@ autoar_extract_class_init (AutoarExtractClass *klass)
                                                         "File size",
                                                         "Size of the extracted files",
                                                         0, G_MAXUINT64, 0,
-                                                        G_PARAM_READWRITE |
+                                                        G_PARAM_READABLE |
                                                         G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (object_class, PROP_COMPLETED_SIZE,
@@ -1192,7 +1146,7 @@ autoar_extract_class_init (AutoarExtractClass *klass)
                                                         "Written file size",
                                                         "Bytes written to disk",
                                                         0, G_MAXUINT64, 0,
-                                                        G_PARAM_READWRITE |
+                                                        G_PARAM_READABLE |
                                                         G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (object_class, PROP_FILES,
@@ -1200,7 +1154,7 @@ autoar_extract_class_init (AutoarExtractClass *klass)
                                                       "Files",
                                                       "Number of files in the archive",
                                                       0, G_MAXUINT32, 0,
-                                                      G_PARAM_READWRITE |
+                                                      G_PARAM_READABLE |
                                                       G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (object_class, PROP_COMPLETED_FILES,
@@ -1208,7 +1162,7 @@ autoar_extract_class_init (AutoarExtractClass *klass)
                                                       "Written files",
                                                       "Number of files has been written",
                                                       0, G_MAXUINT32, 0,
-                                                      G_PARAM_READWRITE |
+                                                      G_PARAM_READABLE |
                                                       G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (object_class, PROP_SOURCE_IS_MEM,
diff --git a/gnome-autoar/autoar-extract.h b/gnome-autoar/autoar-extract.h
index ef6edd5..64911ec 100644
--- a/gnome-autoar/autoar-extract.h
+++ b/gnome-autoar/autoar-extract.h
@@ -110,14 +110,6 @@ gboolean        autoar_extract_get_source_is_mem   (AutoarExtract *arextract);
 gboolean        autoar_extract_get_output_is_dest  (AutoarExtract *arextract);
 gint64          autoar_extract_get_notify_interval (AutoarExtract *arextract);
 
-void            autoar_extract_set_size            (AutoarExtract *arextract,
-                                                    guint64 size);
-void            autoar_extract_set_completed_size  (AutoarExtract *arextract,
-                                                    guint64 completed_size);
-void            autoar_extract_set_files           (AutoarExtract *arextract,
-                                                    guint files);
-void            autoar_extract_set_completed_files (AutoarExtract *arextract,
-                                                    guint completed_files);
 void            autoar_extract_set_output_is_dest  (AutoarExtract *arextract,
                                                     gboolean output_is_dest);
 void            autoar_extract_set_notify_interval (AutoarExtract *arextract,


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